neo-hpstr-jekyll-theme 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +247 -0
- data/_includes/author.html +26 -0
- data/_includes/browser-upgrade.html +1 -0
- data/_includes/disqus_comments.html +23 -0
- data/_includes/feed-footer.html +1 -0
- data/_includes/footer.html +1 -0
- data/_includes/gallery +21 -0
- data/_includes/head.html +52 -0
- data/_includes/header.html +104 -0
- data/_includes/icons.html +13 -0
- data/_includes/pagination.html +66 -0
- data/_includes/read-more.html +19 -0
- data/_includes/scripts.html +28 -0
- data/_includes/social-share.html +7 -0
- data/_layouts/dark-post.html +49 -0
- data/_layouts/home.html +28 -0
- data/_layouts/page.html +38 -0
- data/_layouts/post.html +49 -0
- data/_sass/_animations.scss +327 -0
- data/_sass/_coderay.scss +66 -0
- data/_sass/_dl-menu.scss +370 -0
- data/_sass/_elements.scss +156 -0
- data/_sass/_grid.scss +47 -0
- data/_sass/_mixins.scss +315 -0
- data/_sass/_page.scss +674 -0
- data/_sass/_reset.scss +156 -0
- data/_sass/_rouge.scss +73 -0
- data/_sass/_site.scss +56 -0
- data/_sass/_typography.scss +125 -0
- data/_sass/_variables.scss +49 -0
- data/_sass/vendor/font-awesome/_animated.scss +34 -0
- data/_sass/vendor/font-awesome/_bordered-pulled.scss +25 -0
- data/_sass/vendor/font-awesome/_core.scss +12 -0
- data/_sass/vendor/font-awesome/_fixed-width.scss +6 -0
- data/_sass/vendor/font-awesome/_icons.scss +697 -0
- data/_sass/vendor/font-awesome/_larger.scss +13 -0
- data/_sass/vendor/font-awesome/_list.scss +19 -0
- data/_sass/vendor/font-awesome/_mixins.scss +26 -0
- data/_sass/vendor/font-awesome/_path.scss +15 -0
- data/_sass/vendor/font-awesome/_rotated-flipped.scss +20 -0
- data/_sass/vendor/font-awesome/_stacked.scss +20 -0
- data/_sass/vendor/font-awesome/_variables.scss +708 -0
- data/_sass/vendor/font-awesome/font-awesome.scss +17 -0
- data/_sass/vendor/magnific-popup/_settings.scss +46 -0
- data/_sass/vendor/magnific-popup/magnific-popup.scss +645 -0
- data/assets/css/jquery.floating-social-share.min.css +7 -0
- data/assets/css/jquery.mmenu.all.css +1504 -0
- data/assets/css/main.scss +28 -0
- data/assets/fonts/FontAwesome.otf +0 -0
- data/assets/fonts/fontawesome-webfont.eot +0 -0
- data/assets/fonts/fontawesome-webfont.svg +655 -0
- data/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/assets/fonts/fontawesome-webfont.woff +0 -0
- data/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/assets/js/_main.js +97 -0
- data/assets/js/plugins/jekyll-search.js +1 -0
- data/assets/js/plugins/jquery.dlmenu.js +255 -0
- data/assets/js/plugins/jquery.fitvids.js +81 -0
- data/assets/js/plugins/jquery.floating-social-share.min.js +8 -0
- data/assets/js/plugins/jquery.magnific-popup.js +2026 -0
- data/assets/js/plugins/jquery.mmenu.min.all.js +133 -0
- data/assets/js/plugins/respond.js +342 -0
- data/assets/js/scripts.min.js +3 -0
- data/assets/js/vendor/jquery-1.9.1.min.js +5 -0
- data/assets/js/vendor/modernizr-2.6.2.custom.min.js +4 -0
- metadata +152 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/assets/js/_main.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*! Plugin options and other jQuery stuff */
|
|
2
|
+
|
|
3
|
+
// dl-menu options
|
|
4
|
+
$(function() {
|
|
5
|
+
$( '#dl-menu' ).dlmenu({
|
|
6
|
+
animationClasses : { classin : 'dl-animate-in', classout : 'dl-animate-out' }
|
|
7
|
+
});
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
// FitVids options
|
|
11
|
+
$(function() {
|
|
12
|
+
$("article").fitVids();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
$(".close-menu").click(function () {
|
|
16
|
+
$(".menu").toggleClass("disabled");
|
|
17
|
+
$(".links").toggleClass("enabled");
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
$(".about").click(function () {
|
|
21
|
+
$("#about").css('display','block');
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
$(".close-about").click(function () {
|
|
25
|
+
$("#about").css('display','');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// Add lightbox class to all image links
|
|
29
|
+
$("a[href$='.jpg'],a[href$='.jpeg'],a[href$='.JPG'],a[href$='.png'],a[href$='.gif']").addClass("image-popup");
|
|
30
|
+
|
|
31
|
+
// Magnific-Popup options
|
|
32
|
+
$(document).ready(function() {
|
|
33
|
+
$('.image-popup').magnificPopup({
|
|
34
|
+
type: 'image',
|
|
35
|
+
tLoading: 'Loading image #%curr%...',
|
|
36
|
+
gallery: {
|
|
37
|
+
enabled: true,
|
|
38
|
+
navigateByImgClick: true,
|
|
39
|
+
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
|
|
40
|
+
},
|
|
41
|
+
image: {
|
|
42
|
+
tError: '<a href="%url%">Image #%curr%</a> could not be loaded.',
|
|
43
|
+
},
|
|
44
|
+
removalDelay: 300, // Delay in milliseconds before popup is removed
|
|
45
|
+
// Class that is added to body when popup is open.
|
|
46
|
+
// make it unique to apply your CSS animations just to this exact popup
|
|
47
|
+
mainClass: 'mfp-fade'
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// header
|
|
52
|
+
$(document).ready(function(e) {
|
|
53
|
+
$(window).scroll(function(){
|
|
54
|
+
var header = $('.header-menu');
|
|
55
|
+
var scroll = $(window).scrollTop();
|
|
56
|
+
if(scroll > 300){
|
|
57
|
+
header.attr('class', 'header-menu header-menu-overflow');
|
|
58
|
+
} else {
|
|
59
|
+
header.attr('class', 'header-menu header-menu-top');
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//mobile menu
|
|
65
|
+
$(document).ready(function(){
|
|
66
|
+
$("#menu").attr('style', '');
|
|
67
|
+
$("#menu").mmenu({
|
|
68
|
+
"extensions": [
|
|
69
|
+
"border-full",
|
|
70
|
+
"effect-zoom-menu",
|
|
71
|
+
"effect-zoom-panels",
|
|
72
|
+
"pageshadow",
|
|
73
|
+
"theme-dark"
|
|
74
|
+
],
|
|
75
|
+
"counters": true,
|
|
76
|
+
"navbars": [
|
|
77
|
+
{
|
|
78
|
+
"position": "bottom",
|
|
79
|
+
"content": [
|
|
80
|
+
"<a class='fa fa-search' href='/search'></a>",
|
|
81
|
+
"<a class='fa fa-envelope' href='#/'></a>",
|
|
82
|
+
"<a class='fa fa-twitter' href='#/'></a>",
|
|
83
|
+
"<a class='fa fa-facebook' href='#/'></a>"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
var sharing = function(){
|
|
91
|
+
$(document).ready(function(){
|
|
92
|
+
$("body").floatingSocialShare({
|
|
93
|
+
buttons: ["facebook","twitter","google-plus", "linkedin", "pinterest"],
|
|
94
|
+
text: "Share with "
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};//sharing
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a="function"==typeof require&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o<r.length;o++)s(r[o]);return s}({1:[function(require,module,exports){"use strict";function load(location,callback){var xhr;xhr=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xhr.open("GET",location,!0),xhr.onreadystatechange=function(){if(200===xhr.status&&4===xhr.readyState)try{callback(null,JSON.parse(xhr.responseText))}catch(err){callback(err,null)}},xhr.send()}module.exports={load:load}},{}],2:[function(require,module,exports){"use strict";module.exports=function OptionsValidator(params){function validateParams(params){return params?void 0!==params.required&¶ms.required instanceof Array:!1}if(!validateParams(params))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof OptionsValidator))return new OptionsValidator(params);var requiredOptions=params.required;this.getRequiredOptions=function(){return requiredOptions},this.validate=function(parameters){var errors=[];return requiredOptions.forEach(function(requiredOptionName){void 0===parameters[requiredOptionName]&&errors.push(requiredOptionName)}),errors}}},{}],3:[function(require,module,exports){"use strict";function put(data){return isObject(data)?addObject(data):isArray(data)?addArray(data):void 0}function clear(){return data.length=0,data}function get(){return data}function isObject(obj){return!!obj&&"[object Object]"===Object.prototype.toString.call(obj)}function isArray(obj){return!!obj&&"[object Array]"===Object.prototype.toString.call(obj)}function addObject(_data){return data.push(_data),data}function addArray(_data){for(var added=[],i=0;i<_data.length;i++)isObject(_data[i])&&added.push(addObject(_data[i]));return added}function search(crit){return crit?findMatches(data,crit,opt.searchStrategy,opt):[]}function setOptions(_opt){opt=_opt||{},opt.fuzzy=_opt.fuzzy||!1,opt.limit=_opt.limit||10,opt.searchStrategy=_opt.fuzzy?FuzzySearchStrategy:LiteralSearchStrategy}function findMatches(data,crit,strategy,opt){for(var matches=[],i=0;i<data.length&&matches.length<opt.limit;i++){var match=findMatchesInObject(data[i],crit,strategy,opt);match&&matches.push(match)}return matches}function findMatchesInObject(obj,crit,strategy,opt){for(var key in obj)if(!isExcluded(obj[key],opt.exclude)&&strategy.matches(obj[key],crit))return obj}function isExcluded(term,excludedTerms){var excluded=!1;excludedTerms=excludedTerms||[];for(var i=0;i<excludedTerms.length;i++){var excludedTerm=excludedTerms[i];!excluded&&new RegExp(term).test(excludedTerm)&&(excluded=!0)}return excluded}module.exports={put:put,clear:clear,get:get,search:search,setOptions:setOptions};var FuzzySearchStrategy=require("./SearchStrategies/FuzzySearchStrategy"),LiteralSearchStrategy=require("./SearchStrategies/LiteralSearchStrategy"),data=[],opt={};opt.fuzzy=!1,opt.limit=10,opt.searchStrategy=opt.fuzzy?FuzzySearchStrategy:LiteralSearchStrategy},{"./SearchStrategies/FuzzySearchStrategy":4,"./SearchStrategies/LiteralSearchStrategy":5}],4:[function(require,module,exports){"use strict";function FuzzySearchStrategy(){function fuzzyRegexFromString(string){return new RegExp(string.split("").join(".*?"),"gi")}this.matches=function(string,crit){return"string"!=typeof string?!1:(string=string.trim(),!!fuzzyRegexFromString(crit).test(string))}}module.exports=new FuzzySearchStrategy},{}],5:[function(require,module,exports){"use strict";function LiteralSearchStrategy(){function matchesString(string,crit){return string.toLowerCase().indexOf(crit.toLowerCase())>=0}this.matches=function(string,crit){return"string"!=typeof string?!1:(string=string.trim(),matchesString(string,crit))}}module.exports=new LiteralSearchStrategy},{}],6:[function(require,module,exports){"use strict";function setOptions(_options){options.pattern=_options.pattern||options.pattern,options.template=_options.template||options.template,"function"==typeof _options.middleware&&(options.middleware=_options.middleware)}function compile(data){return options.template.replace(options.pattern,function(match,prop){var value=options.middleware(prop,data[prop],options.template);return void 0!==value?value:data[prop]||match})}module.exports={compile:compile,setOptions:setOptions};var options={};options.pattern=/\{(.*?)\}/g,options.template="",options.middleware=function(){}},{}],7:[function(require,module,exports){!function(window,document,undefined){"use strict";function initWithJSON(json){repository.put(json),registerInput()}function initWithURL(url){jsonLoader.load(url,function(err,json){err&&throwError("failed to get JSON ("+url+")"),initWithJSON(json)})}function emptyResultsContainer(){options.resultsContainer.innerHTML=""}function appendToResultsContainer(text){options.resultsContainer.innerHTML+=text}function registerInput(){options.searchInput.addEventListener("keyup",function(e){emptyResultsContainer(),e.target.value.length>0&&render(repository.search(e.target.value))})}function render(results){if(0===results.length)return appendToResultsContainer(options.noResultsText);for(var i=0;i<results.length;i++)appendToResultsContainer(templater.compile(results[i]))}function throwError(message){throw new Error("SimpleJekyllSearch --- "+message)}var options={searchInput:null,resultsContainer:null,json:[],searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:function(){},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},requiredOptions=["searchInput","resultsContainer","json"],templater=require("./Templater"),repository=require("./Repository"),jsonLoader=require("./JSONLoader"),optionsValidator=require("./OptionsValidator")({required:requiredOptions}),utils=require("./utils");window.SimpleJekyllSearch=function(_options){var errors=optionsValidator.validate(_options);errors.length>0&&throwError("You must specify the following required options: "+requiredOptions),options=utils.merge(options,_options),templater.setOptions({template:options.searchResultTemplate,middleware:options.templateMiddleware}),repository.setOptions({fuzzy:options.fuzzy,limit:options.limit}),utils.isJSON(options.json)?initWithJSON(options.json):initWithURL(options.json)},window.SimpleJekyllSearch.init=window.SimpleJekyllSearch}(window,document)},{"./JSONLoader":1,"./OptionsValidator":2,"./Repository":3,"./Templater":6,"./utils":8}],8:[function(require,module,exports){"use strict";function merge(defaultParams,mergeParams){var mergedOptions={};for(var option in defaultParams)mergedOptions[option]=defaultParams[option],void 0!==mergeParams[option]&&(mergedOptions[option]=mergeParams[option]);return mergedOptions}function isJSON(json){try{return json instanceof Object&&JSON.parse(JSON.stringify(json))?!0:!1}catch(e){return!1}}module.exports={merge:merge,isJSON:isJSON}},{}]},{},[7]);
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* jquery.dlmenu.js v1.0.1
|
|
3
|
+
* http://www.codrops.com
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the MIT license.
|
|
6
|
+
* http://www.opensource.org/licenses/mit-license.php
|
|
7
|
+
*
|
|
8
|
+
* Copyright 2013, Codrops
|
|
9
|
+
* http://www.codrops.com
|
|
10
|
+
*/
|
|
11
|
+
;( function( $, window, undefined ) {
|
|
12
|
+
|
|
13
|
+
'use strict';
|
|
14
|
+
|
|
15
|
+
// global
|
|
16
|
+
var Modernizr = window.Modernizr, $body = $( 'body' );
|
|
17
|
+
|
|
18
|
+
$.DLMenu = function( options, element ) {
|
|
19
|
+
this.$el = $( element );
|
|
20
|
+
this._init( options );
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// the options
|
|
24
|
+
$.DLMenu.defaults = {
|
|
25
|
+
// classes for the animation effects
|
|
26
|
+
animationClasses : { classin : 'dl-animate-in-1', classout : 'dl-animate-out-1' },
|
|
27
|
+
// callback: click a link that has a sub menu
|
|
28
|
+
// el is the link element (li); name is the level name
|
|
29
|
+
onLevelClick : function( el, name ) { return false; },
|
|
30
|
+
// callback: click a link that does not have a sub menu
|
|
31
|
+
// el is the link element (li); ev is the event obj
|
|
32
|
+
onLinkClick : function( el, ev ) { return false; }
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
$.DLMenu.prototype = {
|
|
36
|
+
_init : function( options ) {
|
|
37
|
+
|
|
38
|
+
// options
|
|
39
|
+
this.options = $.extend( true, {}, $.DLMenu.defaults, options );
|
|
40
|
+
// cache some elements and initialize some variables
|
|
41
|
+
this._config();
|
|
42
|
+
|
|
43
|
+
var animEndEventNames = {
|
|
44
|
+
'WebkitAnimation' : 'webkitAnimationEnd',
|
|
45
|
+
'OAnimation' : 'oAnimationEnd',
|
|
46
|
+
'msAnimation' : 'MSAnimationEnd',
|
|
47
|
+
'animation' : 'animationend'
|
|
48
|
+
},
|
|
49
|
+
transEndEventNames = {
|
|
50
|
+
'WebkitTransition' : 'webkitTransitionEnd',
|
|
51
|
+
'MozTransition' : 'transitionend',
|
|
52
|
+
'OTransition' : 'oTransitionEnd',
|
|
53
|
+
'msTransition' : 'MSTransitionEnd',
|
|
54
|
+
'transition' : 'transitionend'
|
|
55
|
+
};
|
|
56
|
+
// animation end event name
|
|
57
|
+
this.animEndEventName = animEndEventNames[ Modernizr.prefixed( 'animation' ) ] + '.dlmenu';
|
|
58
|
+
// transition end event name
|
|
59
|
+
this.transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ] + '.dlmenu',
|
|
60
|
+
// support for css animations and css transitions
|
|
61
|
+
this.supportAnimations = Modernizr.cssanimations,
|
|
62
|
+
this.supportTransitions = Modernizr.csstransitions;
|
|
63
|
+
|
|
64
|
+
this._initEvents();
|
|
65
|
+
|
|
66
|
+
},
|
|
67
|
+
_config : function() {
|
|
68
|
+
this.open = false;
|
|
69
|
+
this.$trigger = this.$el.children( '.dl-trigger' );
|
|
70
|
+
this.$menu = this.$el.children( 'ul.dl-menu' );
|
|
71
|
+
this.$menuitems = this.$menu.find( 'li:not(.dl-back)' );
|
|
72
|
+
this.$el.find( 'ul.dl-submenu' ).prepend( '<li class="dl-back"><a href="#">back</a></li>' );
|
|
73
|
+
this.$back = this.$menu.find( 'li.dl-back' );
|
|
74
|
+
},
|
|
75
|
+
_initEvents : function() {
|
|
76
|
+
|
|
77
|
+
var self = this;
|
|
78
|
+
|
|
79
|
+
this.$trigger.on( 'click.dlmenu', function() {
|
|
80
|
+
|
|
81
|
+
if( self.open ) {
|
|
82
|
+
self._closeMenu();
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
self._openMenu();
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
|
|
89
|
+
} );
|
|
90
|
+
|
|
91
|
+
this.$menuitems.on( 'click.dlmenu', function( event ) {
|
|
92
|
+
|
|
93
|
+
event.stopPropagation();
|
|
94
|
+
|
|
95
|
+
var $item = $(this),
|
|
96
|
+
$submenu = $item.children( 'ul.dl-submenu' );
|
|
97
|
+
|
|
98
|
+
if( $submenu.length > 0 ) {
|
|
99
|
+
|
|
100
|
+
var $flyin = $submenu.clone().css({
|
|
101
|
+
opacity: 0,
|
|
102
|
+
margin: 0
|
|
103
|
+
}).insertAfter( self.$menu ),
|
|
104
|
+
onAnimationEndFn = function() {
|
|
105
|
+
self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classout ).addClass( 'dl-subview' );
|
|
106
|
+
$item.addClass( 'dl-subviewopen' ).parents( '.dl-subviewopen:first' ).removeClass( 'dl-subviewopen' ).addClass( 'dl-subview' );
|
|
107
|
+
$flyin.remove();
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
setTimeout( function() {
|
|
111
|
+
$flyin.addClass( self.options.animationClasses.classin );
|
|
112
|
+
self.$menu.addClass( self.options.animationClasses.classout );
|
|
113
|
+
if( self.supportAnimations ) {
|
|
114
|
+
self.$menu.on( self.animEndEventName, onAnimationEndFn );
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
onAnimationEndFn.call();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
self.options.onLevelClick( $item, $item.children( 'a:first' ).text() );
|
|
121
|
+
} );
|
|
122
|
+
|
|
123
|
+
return false;
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
self.options.onLinkClick( $item, event );
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
} );
|
|
131
|
+
|
|
132
|
+
this.$back.on( 'click.dlmenu', function( event ) {
|
|
133
|
+
|
|
134
|
+
var $this = $( this ),
|
|
135
|
+
$submenu = $this.parents( 'ul.dl-submenu:first' ),
|
|
136
|
+
$item = $submenu.parent(),
|
|
137
|
+
|
|
138
|
+
$flyin = $submenu.clone().insertAfter( self.$menu );
|
|
139
|
+
|
|
140
|
+
var onAnimationEndFn = function() {
|
|
141
|
+
self.$menu.off( self.animEndEventName ).removeClass( self.options.animationClasses.classin );
|
|
142
|
+
$flyin.remove();
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
setTimeout( function() {
|
|
146
|
+
$flyin.addClass( self.options.animationClasses.classout );
|
|
147
|
+
self.$menu.addClass( self.options.animationClasses.classin );
|
|
148
|
+
if( self.supportAnimations ) {
|
|
149
|
+
self.$menu.on( self.animEndEventName, onAnimationEndFn );
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
onAnimationEndFn.call();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
$item.removeClass( 'dl-subviewopen' );
|
|
156
|
+
|
|
157
|
+
var $subview = $this.parents( '.dl-subview:first' );
|
|
158
|
+
if( $subview.is( 'li' ) ) {
|
|
159
|
+
$subview.addClass( 'dl-subviewopen' );
|
|
160
|
+
}
|
|
161
|
+
$subview.removeClass( 'dl-subview' );
|
|
162
|
+
} );
|
|
163
|
+
|
|
164
|
+
return false;
|
|
165
|
+
|
|
166
|
+
} );
|
|
167
|
+
|
|
168
|
+
},
|
|
169
|
+
closeMenu : function() {
|
|
170
|
+
if( this.open ) {
|
|
171
|
+
this._closeMenu();
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
_closeMenu : function() {
|
|
175
|
+
var self = this,
|
|
176
|
+
onTransitionEndFn = function() {
|
|
177
|
+
self.$menu.off( self.transEndEventName );
|
|
178
|
+
self._resetMenu();
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
this.$menu.removeClass( 'dl-menuopen' );
|
|
182
|
+
this.$menu.addClass( 'dl-menu-toggle' );
|
|
183
|
+
this.$trigger.removeClass( 'dl-active' );
|
|
184
|
+
|
|
185
|
+
if( this.supportTransitions ) {
|
|
186
|
+
this.$menu.on( this.transEndEventName, onTransitionEndFn );
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
onTransitionEndFn.call();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
this.open = false;
|
|
193
|
+
},
|
|
194
|
+
openMenu : function() {
|
|
195
|
+
if( !this.open ) {
|
|
196
|
+
this._openMenu();
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
_openMenu : function() {
|
|
200
|
+
var self = this;
|
|
201
|
+
// clicking somewhere else makes the menu close
|
|
202
|
+
$body.off( 'click' ).on( 'click.dlmenu', function() {
|
|
203
|
+
self._closeMenu() ;
|
|
204
|
+
} );
|
|
205
|
+
this.$menu.addClass( 'dl-menuopen dl-menu-toggle' ).on( this.transEndEventName, function() {
|
|
206
|
+
$( this ).removeClass( 'dl-menu-toggle' );
|
|
207
|
+
} );
|
|
208
|
+
this.$trigger.addClass( 'dl-active' );
|
|
209
|
+
this.open = true;
|
|
210
|
+
},
|
|
211
|
+
// resets the menu to its original state (first level of options)
|
|
212
|
+
_resetMenu : function() {
|
|
213
|
+
this.$menu.removeClass( 'dl-subview' );
|
|
214
|
+
this.$menuitems.removeClass( 'dl-subview dl-subviewopen' );
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
var logError = function( message ) {
|
|
219
|
+
if ( window.console ) {
|
|
220
|
+
window.console.error( message );
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
$.fn.dlmenu = function( options ) {
|
|
225
|
+
if ( typeof options === 'string' ) {
|
|
226
|
+
var args = Array.prototype.slice.call( arguments, 1 );
|
|
227
|
+
this.each(function() {
|
|
228
|
+
var instance = $.data( this, 'dlmenu' );
|
|
229
|
+
if ( !instance ) {
|
|
230
|
+
logError( "cannot call methods on dlmenu prior to initialization; " +
|
|
231
|
+
"attempted to call method '" + options + "'" );
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
if ( !$.isFunction( instance[options] ) || options.charAt(0) === "_" ) {
|
|
235
|
+
logError( "no such method '" + options + "' for dlmenu instance" );
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
instance[ options ].apply( instance, args );
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
this.each(function() {
|
|
243
|
+
var instance = $.data( this, 'dlmenu' );
|
|
244
|
+
if ( instance ) {
|
|
245
|
+
instance._init();
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
instance = $.data( this, 'dlmenu', new $.DLMenu( options, this ) );
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
return this;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
} )( jQuery, window );
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/*global jQuery */
|
|
2
|
+
/*jshint multistr:true, browser:true */
|
|
3
|
+
/*!
|
|
4
|
+
* FitVids 1.0
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
|
|
7
|
+
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
|
8
|
+
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
|
|
9
|
+
*
|
|
10
|
+
* Date: Thu Sept 01 18:00:00 2011 -0500
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
(function( $ ){
|
|
14
|
+
|
|
15
|
+
"use strict";
|
|
16
|
+
|
|
17
|
+
$.fn.fitVids = function( options ) {
|
|
18
|
+
var settings = {
|
|
19
|
+
customSelector: null
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var div = document.createElement('div'),
|
|
23
|
+
ref = document.getElementsByTagName('base')[0] || document.getElementsByTagName('script')[0];
|
|
24
|
+
|
|
25
|
+
div.className = 'fit-vids-style';
|
|
26
|
+
div.innerHTML = '­<style> \
|
|
27
|
+
.fluid-width-video-wrapper { \
|
|
28
|
+
width: 100%; \
|
|
29
|
+
position: relative; \
|
|
30
|
+
padding: 0; \
|
|
31
|
+
} \
|
|
32
|
+
\
|
|
33
|
+
.fluid-width-video-wrapper iframe, \
|
|
34
|
+
.fluid-width-video-wrapper object, \
|
|
35
|
+
.fluid-width-video-wrapper embed { \
|
|
36
|
+
position: absolute; \
|
|
37
|
+
top: 0; \
|
|
38
|
+
left: 0; \
|
|
39
|
+
width: 100%; \
|
|
40
|
+
height: 100%; \
|
|
41
|
+
} \
|
|
42
|
+
</style>';
|
|
43
|
+
|
|
44
|
+
ref.parentNode.insertBefore(div,ref);
|
|
45
|
+
|
|
46
|
+
if ( options ) {
|
|
47
|
+
$.extend( settings, options );
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return this.each(function(){
|
|
51
|
+
var selectors = [
|
|
52
|
+
"iframe[src*='player.vimeo.com']",
|
|
53
|
+
"iframe[src*='www.youtube.com']",
|
|
54
|
+
"iframe[src*='www.youtube-nocookie.com']",
|
|
55
|
+
"iframe[src*='www.kickstarter.com']",
|
|
56
|
+
"object",
|
|
57
|
+
"embed"
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
if (settings.customSelector) {
|
|
61
|
+
selectors.push(settings.customSelector);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
var $allVideos = $(this).find(selectors.join(','));
|
|
65
|
+
|
|
66
|
+
$allVideos.each(function(){
|
|
67
|
+
var $this = $(this);
|
|
68
|
+
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
|
69
|
+
var height = ( this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10))) ) ? parseInt($this.attr('height'), 10) : $this.height(),
|
|
70
|
+
width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(),
|
|
71
|
+
aspectRatio = height / width;
|
|
72
|
+
if(!$this.attr('id')){
|
|
73
|
+
var videoID = 'fitvid' + Math.floor(Math.random()*999999);
|
|
74
|
+
$this.attr('id', videoID);
|
|
75
|
+
}
|
|
76
|
+
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+"%");
|
|
77
|
+
$this.removeAttr('height').removeAttr('width');
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
})( jQuery );
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jQuery Floating Social Share Plugin v1.0.1
|
|
3
|
+
* http://www.burakozdemir.co.uk
|
|
4
|
+
*
|
|
5
|
+
* Copyright 2015 Burak Özdemir - <https://github.com/ozdemirburak>
|
|
6
|
+
* Released under the MIT license
|
|
7
|
+
*/
|
|
8
|
+
!function(t,e,n){function s(e,n){this.element=e,this.settings=t.extend({},c,n),this._defaults=c,this._name=o,this.init()}function i(t,s,i,a){var r=e.innerWidth?e.innerWidth:n.documentElement.clientWidth?n.documentElement.clientWidth:screen.width,l=e.innerHeight?e.innerHeight:n.documentElement.clientHeight?n.documentElement.clientHeight:screen.height,o=r/2-i/2+10,c=l/2-a/2+50,p=e.open(t,s,"scrollbars=yes, width="+i+", height="+a+", top="+c+", left="+o);p.focus()}function a(t){return t>=1e9?(t/1e9).toFixed(1).replace(/\.0$/,"")+"G":t>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":t>=1e3?(t/1e3).toFixed(1).replace(/\.0$/,"")+"K":t}function r(s){var i=e.innerWidth?e.innerWidth:n.documentElement.clientWidth?n.documentElement.clientWidth:screen.width;961>i?t.each(s,function(){t(this).css("width",100/s.length+"%")}):t.each(s,function(){t(this).removeAttr("style")})}function l(n,s,i){switch(s=encodeURI(s),n){case"facebook":t.get("https://graph.facebook.com/"+s,function(e){if(e.shares&&e.shares>0){var n=t("<span>",{"class":"shareCount"});n.append(a(e.shares)),i.append(n),i.find("i").removeClass("m-top5")}},"jsonp");break;case"twitter":t.get("https://urls.api.twitter.com/1/urls/count.json?url="+s+"&callback=?",function(e){if(e.count&&e.count>0){var n=t("<span>",{"class":"shareCount"});n.append(a(e.count)),i.append(n),i.find("i").removeClass("m-top5")}},"jsonp");break;case"linkedin":t.get("https://www.linkedin.com/countserv/count/share?url="+s+"&callback=?",function(e){if(e.count&&e.count>0){var n=t("<span>",{"class":"shareCount"});n.append(a(e.count)),i.append(n),i.find("i").removeClass("m-top5")}},"jsonp");break;case"pinterest":t.get("https://api.pinterest.com/v1/urls/count.json?url="+s+"&callback=?",function(e){if(e.count&&e.count>0){var n=t("<span>",{"class":"shareCount"});n.append(a(e.count)),i.append(n),i.find("i").removeClass("m-top5")}},"jsonp");break;case"google-plus":e.services||(e.services={},e.services.gplus={}),e.services.gplus.cb=function(t){e.gplusShares=t},t.getScript("http://share.yandex.ru/gpp.xml?url="+s+"&callback=?",function(){if(e.gplusShares>0){var n=t("<span>",{"class":"shareCount"});n.append(a(e.gplusShares)),i.append(n),i.find("i").removeClass("m-top5")}});break;default:return-1}}var o="floatingSocialShare",c={place:"top-left",counter:!0,buttons:["facebook","twitter","google-plus","linkedin"],title:n.title,url:e.location.href,text:"share with ",description:t("meta[name='description']").attr("content"),popup_width:400,popup_height:300};t.extend(s.prototype,{init:function(){var n=this;-1==t.inArray(this.settings.place,u)&&(this.settings.place=this._defaults.place);var s=t("<div>",{id:"floatingSocialShare"}),a=t("<div>",{"class":this.settings.place});a.appendTo(s),t.each(this.settings.buttons,function(e,s){t.each(p,function(e,i){if(s==e){var r=t("<a>",{title:n.settings.title,"class":""+i.className+" pop-upper"}),o=t("<i>",{"class":"m-top5 fa fa-"+s}),c=i.url;return c=c.replace("{url}",n.settings.url).replace("{title}",n.settings.title).replace("{description}",n.settings.description),r.attr("href",c).attr("title",n.settings.text+s).append(o),n.settings.counter===!0&&l(s,n.settings.url,r),a.append(r),!1}})}),s.appendTo(this.element);var o=t(this.element).find(".pop-upper");o.on("click",function(e){e.preventDefault(),i(t(this).attr("href"),t(this).attr("title"),n.settings.popup_width,n.settings.popup_height)}),r(o),t(e).resize(function(){r(o)})}});var p={facebook:{className:"facebook",url:"https://www.facebook.com/sharer/sharer.php?u={url}&t={title}"},twitter:{className:"twitter",url:"https://twitter.com/home?status={url}"},"google-plus":{className:"google-plus",url:"https://plus.google.com/share?url={url}"},linkedin:{className:"linkedin",url:"https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={description}&source="},envelope:{className:"envelope",url:"mailto:asd@asd.com?subject={url}"},pinterest:{className:"pinterest",url:"https://pinterest.com/pin/create%2Fbutton/?url={url}"},stumbleupon:{className:"stumbleupon",url:"https://www.stumbleupon.com/submit?url={url}&title={title}"}},u=["top-left","top-right"];t.fn[o]=function(e){return this.each(function(){t.data(this,"plugin_"+o)||t.data(this,"plugin_"+o,new s(this,e))}),this}}(jQuery,window,document);
|