creek-jekyll-theme 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +81 -0
- data/_config.yml +306 -0
- data/_data/README.md +3 -0
- data/_data/navigation/docs.yml +56 -0
- data/_data/navigation/main.yml +12 -0
- data/_data/navigation.yml +68 -0
- data/_data/ui-text.yml +2024 -0
- data/_includes/analytics-providers/custom.html +3 -0
- data/_includes/analytics-providers/google-gtag.html +9 -0
- data/_includes/analytics-providers/google-universal.html +7 -0
- data/_includes/analytics-providers/google.html +14 -0
- data/_includes/analytics.html +14 -0
- data/_includes/archive-single.html +30 -0
- data/_includes/author-profile-custom-links.html +7 -0
- data/_includes/author-profile.html +246 -0
- data/_includes/breadcrumbs.html +40 -0
- data/_includes/browser-upgrade.html +2 -0
- data/_includes/category-list.html +19 -0
- data/_includes/comment.html +22 -0
- data/_includes/comments-providers/custom.html +3 -0
- data/_includes/comments-providers/custom_scripts.html +3 -0
- data/_includes/comments-providers/discourse.html +13 -0
- data/_includes/comments-providers/disqus.html +15 -0
- data/_includes/comments-providers/facebook.html +8 -0
- data/_includes/comments-providers/giscus.html +24 -0
- data/_includes/comments-providers/scripts.html +20 -0
- data/_includes/comments-providers/staticman.html +40 -0
- data/_includes/comments-providers/staticman_v2.html +40 -0
- data/_includes/comments-providers/utterances.html +21 -0
- data/_includes/comments.html +180 -0
- data/_includes/documents-collection.html +15 -0
- data/_includes/feature_row +41 -0
- data/_includes/figure +9 -0
- data/_includes/footer/custom.html +3 -0
- data/_includes/footer.html +21 -0
- data/_includes/gallery +35 -0
- data/_includes/group-by-array +47 -0
- data/_includes/head/custom.html +15 -0
- data/_includes/head.html +25 -0
- data/_includes/masthead.html +35 -0
- data/_includes/nav_list +26 -0
- data/_includes/page__date.html +6 -0
- data/_includes/page__hero.html +55 -0
- data/_includes/page__hero_video.html +2 -0
- data/_includes/page__meta.html +31 -0
- data/_includes/page__taxonomy.html +7 -0
- data/_includes/paginator.html +69 -0
- data/_includes/post_pagination.html +14 -0
- data/_includes/posts-category.html +5 -0
- data/_includes/posts-tag.html +5 -0
- data/_includes/scripts.html +28 -0
- data/_includes/search/algolia-search-scripts.html +62 -0
- data/_includes/search/google-search-scripts.html +30 -0
- data/_includes/search/lunr-search-scripts.html +10 -0
- data/_includes/search/search_form.html +26 -0
- data/_includes/seo.html +158 -0
- data/_includes/sidebar.html +19 -0
- data/_includes/skip-links.html +7 -0
- data/_includes/social-share.html +11 -0
- data/_includes/tag-list.html +19 -0
- data/_includes/toc +7 -0
- data/_includes/toc.html +182 -0
- data/_includes/video +24 -0
- data/_layouts/archive-taxonomy.html +29 -0
- data/_layouts/archive.html +26 -0
- data/_layouts/categories.html +43 -0
- data/_layouts/category.html +10 -0
- data/_layouts/collection.html +10 -0
- data/_layouts/compress.html +10 -0
- data/_layouts/default.html +41 -0
- data/_layouts/home.html +22 -0
- data/_layouts/posts.html +30 -0
- data/_layouts/search.html +42 -0
- data/_layouts/single.html +95 -0
- data/_layouts/splash.html +22 -0
- data/_layouts/tag.html +10 -0
- data/_layouts/tags.html +43 -0
- data/_pages/404.html +26 -0
- data/_sass/minimal-mistakes/_animations.scss +21 -0
- data/_sass/minimal-mistakes/_archive.scss +463 -0
- data/_sass/minimal-mistakes/_base.scss +339 -0
- data/_sass/minimal-mistakes/_buttons.scss +97 -0
- data/_sass/minimal-mistakes/_footer.scss +85 -0
- data/_sass/minimal-mistakes/_forms.scss +359 -0
- data/_sass/minimal-mistakes/_masthead.scss +93 -0
- data/_sass/minimal-mistakes/_mixins.scss +92 -0
- data/_sass/minimal-mistakes/_navigation.scss +573 -0
- data/_sass/minimal-mistakes/_notices.scss +109 -0
- data/_sass/minimal-mistakes/_page.scss +578 -0
- data/_sass/minimal-mistakes/_print.scss +252 -0
- data/_sass/minimal-mistakes/_reset.scss +187 -0
- data/_sass/minimal-mistakes/_search.scss +132 -0
- data/_sass/minimal-mistakes/_sidebar.scss +353 -0
- data/_sass/minimal-mistakes/_syntax.scss +324 -0
- data/_sass/minimal-mistakes/_tables.scss +39 -0
- data/_sass/minimal-mistakes/_utilities.scss +593 -0
- data/_sass/minimal-mistakes/_variables.scss +173 -0
- data/_sass/minimal-mistakes/skins/_air.scss +23 -0
- data/_sass/minimal-mistakes/skins/_aqua.scss +34 -0
- data/_sass/minimal-mistakes/skins/_contrast.scss +52 -0
- data/_sass/minimal-mistakes/skins/_dark.scss +30 -0
- data/_sass/minimal-mistakes/skins/_default.scss +5 -0
- data/_sass/minimal-mistakes/skins/_dirt.scss +33 -0
- data/_sass/minimal-mistakes/skins/_mint.scss +24 -0
- data/_sass/minimal-mistakes/skins/_neon.scss +63 -0
- data/_sass/minimal-mistakes/skins/_plum.scss +70 -0
- data/_sass/minimal-mistakes/skins/_sunrise.scss +49 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_breakpoint.scss +114 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_context.scss +95 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_helpers.scss +151 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_legacy-settings.scss +50 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_no-query.scss +15 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_parsers.scss +215 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_respond-to.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/_settings.scss +71 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_double.scss +33 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_query.scss +82 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_resolution.scss +31 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_single.scss +26 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/_triple.scss +36 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default-pair.scss +21 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_default.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/double/_double-string.scss +22 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/resolution/_resolution.scss +60 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/single/_default.scss +13 -0
- data/_sass/minimal-mistakes/vendor/breakpoint/parsers/triple/_default.scss +18 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_magnific-popup.scss +649 -0
- data/_sass/minimal-mistakes/vendor/magnific-popup/_settings.scss +46 -0
- data/_sass/minimal-mistakes/vendor/susy/_su.scss +4 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy-prefix.scss +13 -0
- data/_sass/minimal-mistakes/vendor/susy/_susy.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/_svg-grid.scss +5 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_prefix.scss +7 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-api.scss +114 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-grid-math.scss +67 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-settings.scss +14 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-unprefix.scss +18 -0
- data/_sass/minimal-mistakes/vendor/susy/plugins/svg-grid/_svg-utilities.scss +133 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_api.scss +318 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_normalize.scss +261 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_parse.scss +163 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_settings.scss +329 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-math.scss +441 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_su-validate.scss +213 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_syntax-helpers.scss +191 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_unprefix.scss +56 -0
- data/_sass/minimal-mistakes/vendor/susy/susy/_utilities.scss +167 -0
- data/_sass/minimal-mistakes.scss +40 -0
- data/assets/css/main.scss +9 -0
- data/assets/images/android-chrome-192x192.png +0 -0
- data/assets/images/android-chrome-512x512.png +0 -0
- data/assets/images/apple-touch-icon.png +0 -0
- data/assets/images/browserconfig.xml +9 -0
- data/assets/images/creek-logo.png +0 -0
- data/assets/images/favicon-16x16.png +0 -0
- data/assets/images/favicon-32x32.png +0 -0
- data/assets/images/favicon.ico +0 -0
- data/assets/images/mstile-150x150.png +0 -0
- data/assets/images/safari-pinned-tab.svg +48 -0
- data/assets/images/site-under-construction.png +0 -0
- data/assets/images/site.webmanifest +19 -0
- data/assets/js/_main.js +136 -0
- data/assets/js/lunr/lunr-en.js +73 -0
- data/assets/js/lunr/lunr-gr.js +526 -0
- data/assets/js/lunr/lunr-store.js +84 -0
- data/assets/js/lunr/lunr.js +3475 -0
- data/assets/js/lunr/lunr.min.js +6 -0
- data/assets/js/main.min.js +6 -0
- data/assets/js/plugins/gumshoe.js +484 -0
- data/assets/js/plugins/jquery.ba-throttle-debounce.js +252 -0
- data/assets/js/plugins/jquery.fitvids.js +82 -0
- data/assets/js/plugins/jquery.greedy-navigation.js +127 -0
- data/assets/js/plugins/jquery.magnific-popup.js +1860 -0
- data/assets/js/plugins/smooth-scroll.js +650 -0
- data/assets/js/vendor/jquery/jquery-3.6.0.js +10881 -0
- metadata +233 -0
@@ -0,0 +1,252 @@
|
|
1
|
+
/*!
|
2
|
+
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
3
|
+
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
4
|
+
*
|
5
|
+
* Copyright (c) 2010 "Cowboy" Ben Alman
|
6
|
+
* Dual licensed under the MIT and GPL licenses.
|
7
|
+
* http://benalman.com/about/license/
|
8
|
+
*/
|
9
|
+
|
10
|
+
// Script: jQuery throttle / debounce: Sometimes, less is more!
|
11
|
+
//
|
12
|
+
// *Version: 1.1, Last updated: 3/7/2010*
|
13
|
+
//
|
14
|
+
// Project Home - http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
15
|
+
// GitHub - http://github.com/cowboy/jquery-throttle-debounce/
|
16
|
+
// Source - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.js
|
17
|
+
// (Minified) - http://github.com/cowboy/jquery-throttle-debounce/raw/master/jquery.ba-throttle-debounce.min.js (0.7kb)
|
18
|
+
//
|
19
|
+
// About: License
|
20
|
+
//
|
21
|
+
// Copyright (c) 2010 "Cowboy" Ben Alman,
|
22
|
+
// Dual licensed under the MIT and GPL licenses.
|
23
|
+
// http://benalman.com/about/license/
|
24
|
+
//
|
25
|
+
// About: Examples
|
26
|
+
//
|
27
|
+
// These working examples, complete with fully commented code, illustrate a few
|
28
|
+
// ways in which this plugin can be used.
|
29
|
+
//
|
30
|
+
// Throttle - http://benalman.com/code/projects/jquery-throttle-debounce/examples/throttle/
|
31
|
+
// Debounce - http://benalman.com/code/projects/jquery-throttle-debounce/examples/debounce/
|
32
|
+
//
|
33
|
+
// About: Support and Testing
|
34
|
+
//
|
35
|
+
// Information about what version or versions of jQuery this plugin has been
|
36
|
+
// tested with, what browsers it has been tested in, and where the unit tests
|
37
|
+
// reside (so you can test it yourself).
|
38
|
+
//
|
39
|
+
// jQuery Versions - none, 1.3.2, 1.4.2
|
40
|
+
// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.6, Safari 3-4, Chrome 4-5, Opera 9.6-10.1.
|
41
|
+
// Unit Tests - http://benalman.com/code/projects/jquery-throttle-debounce/unit/
|
42
|
+
//
|
43
|
+
// About: Release History
|
44
|
+
//
|
45
|
+
// 1.1 - (3/7/2010) Fixed a bug in <jQuery.throttle> where trailing callbacks
|
46
|
+
// executed later than they should. Reworked a fair amount of internal
|
47
|
+
// logic as well.
|
48
|
+
// 1.0 - (3/6/2010) Initial release as a stand-alone project. Migrated over
|
49
|
+
// from jquery-misc repo v0.4 to jquery-throttle repo v1.0, added the
|
50
|
+
// no_trailing throttle parameter and debounce functionality.
|
51
|
+
//
|
52
|
+
// Topic: Note for non-jQuery users
|
53
|
+
//
|
54
|
+
// jQuery isn't actually required for this plugin, because nothing internal
|
55
|
+
// uses any jQuery methods or properties. jQuery is just used as a namespace
|
56
|
+
// under which these methods can exist.
|
57
|
+
//
|
58
|
+
// Since jQuery isn't actually required for this plugin, if jQuery doesn't exist
|
59
|
+
// when this plugin is loaded, the method described below will be created in
|
60
|
+
// the `Cowboy` namespace. Usage will be exactly the same, but instead of
|
61
|
+
// $.method() or jQuery.method(), you'll need to use Cowboy.method().
|
62
|
+
|
63
|
+
(function(window,undefined){
|
64
|
+
'$:nomunge'; // Used by YUI compressor.
|
65
|
+
|
66
|
+
// Since jQuery really isn't required for this plugin, use `jQuery` as the
|
67
|
+
// namespace only if it already exists, otherwise use the `Cowboy` namespace,
|
68
|
+
// creating it if necessary.
|
69
|
+
var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ),
|
70
|
+
|
71
|
+
// Internal method reference.
|
72
|
+
jq_throttle;
|
73
|
+
|
74
|
+
// Method: jQuery.throttle
|
75
|
+
//
|
76
|
+
// Throttle execution of a function. Especially useful for rate limiting
|
77
|
+
// execution of handlers on events like resize and scroll. If you want to
|
78
|
+
// rate-limit execution of a function to a single time, see the
|
79
|
+
// <jQuery.debounce> method.
|
80
|
+
//
|
81
|
+
// In this visualization, | is a throttled-function call and X is the actual
|
82
|
+
// callback execution:
|
83
|
+
//
|
84
|
+
// > Throttled with `no_trailing` specified as false or unspecified:
|
85
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
86
|
+
// > X X X X X X X X X X X X
|
87
|
+
// >
|
88
|
+
// > Throttled with `no_trailing` specified as true:
|
89
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
90
|
+
// > X X X X X X X X X X
|
91
|
+
//
|
92
|
+
// Usage:
|
93
|
+
//
|
94
|
+
// > var throttled = jQuery.throttle( delay, [ no_trailing, ] callback );
|
95
|
+
// >
|
96
|
+
// > jQuery('selector').bind( 'someevent', throttled );
|
97
|
+
// > jQuery('selector').unbind( 'someevent', throttled );
|
98
|
+
//
|
99
|
+
// This also works in jQuery 1.4+:
|
100
|
+
//
|
101
|
+
// > jQuery('selector').bind( 'someevent', jQuery.throttle( delay, [ no_trailing, ] callback ) );
|
102
|
+
// > jQuery('selector').unbind( 'someevent', callback );
|
103
|
+
//
|
104
|
+
// Arguments:
|
105
|
+
//
|
106
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
107
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
108
|
+
// no_trailing - (Boolean) Optional, defaults to false. If no_trailing is
|
109
|
+
// true, callback will only execute every `delay` milliseconds while the
|
110
|
+
// throttled-function is being called. If no_trailing is false or
|
111
|
+
// unspecified, callback will be executed one final time after the last
|
112
|
+
// throttled-function call. (After the throttled-function has not been
|
113
|
+
// called for `delay` milliseconds, the internal counter is reset)
|
114
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
115
|
+
// The `this` context and all arguments are passed through, as-is, to
|
116
|
+
// `callback` when the throttled-function is executed.
|
117
|
+
//
|
118
|
+
// Returns:
|
119
|
+
//
|
120
|
+
// (Function) A new, throttled, function.
|
121
|
+
|
122
|
+
$.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) {
|
123
|
+
// After wrapper has stopped being called, this timeout ensures that
|
124
|
+
// `callback` is executed at the proper times in `throttle` and `end`
|
125
|
+
// debounce modes.
|
126
|
+
var timeout_id,
|
127
|
+
|
128
|
+
// Keep track of the last time `callback` was executed.
|
129
|
+
last_exec = 0;
|
130
|
+
|
131
|
+
// `no_trailing` defaults to falsy.
|
132
|
+
if ( typeof no_trailing !== 'boolean' ) {
|
133
|
+
debounce_mode = callback;
|
134
|
+
callback = no_trailing;
|
135
|
+
no_trailing = undefined;
|
136
|
+
}
|
137
|
+
|
138
|
+
// The `wrapper` function encapsulates all of the throttling / debouncing
|
139
|
+
// functionality and when executed will limit the rate at which `callback`
|
140
|
+
// is executed.
|
141
|
+
function wrapper() {
|
142
|
+
var that = this,
|
143
|
+
elapsed = +new Date() - last_exec,
|
144
|
+
args = arguments;
|
145
|
+
|
146
|
+
// Execute `callback` and update the `last_exec` timestamp.
|
147
|
+
function exec() {
|
148
|
+
last_exec = +new Date();
|
149
|
+
callback.apply( that, args );
|
150
|
+
};
|
151
|
+
|
152
|
+
// If `debounce_mode` is true (at_begin) this is used to clear the flag
|
153
|
+
// to allow future `callback` executions.
|
154
|
+
function clear() {
|
155
|
+
timeout_id = undefined;
|
156
|
+
};
|
157
|
+
|
158
|
+
if ( debounce_mode && !timeout_id ) {
|
159
|
+
// Since `wrapper` is being called for the first time and
|
160
|
+
// `debounce_mode` is true (at_begin), execute `callback`.
|
161
|
+
exec();
|
162
|
+
}
|
163
|
+
|
164
|
+
// Clear any existing timeout.
|
165
|
+
timeout_id && clearTimeout( timeout_id );
|
166
|
+
|
167
|
+
if ( debounce_mode === undefined && elapsed > delay ) {
|
168
|
+
// In throttle mode, if `delay` time has been exceeded, execute
|
169
|
+
// `callback`.
|
170
|
+
exec();
|
171
|
+
|
172
|
+
} else if ( no_trailing !== true ) {
|
173
|
+
// In trailing throttle mode, since `delay` time has not been
|
174
|
+
// exceeded, schedule `callback` to execute `delay` ms after most
|
175
|
+
// recent execution.
|
176
|
+
//
|
177
|
+
// If `debounce_mode` is true (at_begin), schedule `clear` to execute
|
178
|
+
// after `delay` ms.
|
179
|
+
//
|
180
|
+
// If `debounce_mode` is false (at end), schedule `callback` to
|
181
|
+
// execute after `delay` ms.
|
182
|
+
timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay );
|
183
|
+
}
|
184
|
+
};
|
185
|
+
|
186
|
+
// Set the guid of `wrapper` function to the same of original callback, so
|
187
|
+
// it can be removed in jQuery 1.4+ .unbind or .die by using the original
|
188
|
+
// callback as a reference.
|
189
|
+
if ( $.guid ) {
|
190
|
+
wrapper.guid = callback.guid = callback.guid || $.guid++;
|
191
|
+
}
|
192
|
+
|
193
|
+
// Return the wrapper function.
|
194
|
+
return wrapper;
|
195
|
+
};
|
196
|
+
|
197
|
+
// Method: jQuery.debounce
|
198
|
+
//
|
199
|
+
// Debounce execution of a function. Debouncing, unlike throttling,
|
200
|
+
// guarantees that a function is only executed a single time, either at the
|
201
|
+
// very beginning of a series of calls, or at the very end. If you want to
|
202
|
+
// simply rate-limit execution of a function, see the <jQuery.throttle>
|
203
|
+
// method.
|
204
|
+
//
|
205
|
+
// In this visualization, | is a debounced-function call and X is the actual
|
206
|
+
// callback execution:
|
207
|
+
//
|
208
|
+
// > Debounced with `at_begin` specified as false or unspecified:
|
209
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
210
|
+
// > X X
|
211
|
+
// >
|
212
|
+
// > Debounced with `at_begin` specified as true:
|
213
|
+
// > ||||||||||||||||||||||||| (pause) |||||||||||||||||||||||||
|
214
|
+
// > X X
|
215
|
+
//
|
216
|
+
// Usage:
|
217
|
+
//
|
218
|
+
// > var debounced = jQuery.debounce( delay, [ at_begin, ] callback );
|
219
|
+
// >
|
220
|
+
// > jQuery('selector').bind( 'someevent', debounced );
|
221
|
+
// > jQuery('selector').unbind( 'someevent', debounced );
|
222
|
+
//
|
223
|
+
// This also works in jQuery 1.4+:
|
224
|
+
//
|
225
|
+
// > jQuery('selector').bind( 'someevent', jQuery.debounce( delay, [ at_begin, ] callback ) );
|
226
|
+
// > jQuery('selector').unbind( 'someevent', callback );
|
227
|
+
//
|
228
|
+
// Arguments:
|
229
|
+
//
|
230
|
+
// delay - (Number) A zero-or-greater delay in milliseconds. For event
|
231
|
+
// callbacks, values around 100 or 250 (or even higher) are most useful.
|
232
|
+
// at_begin - (Boolean) Optional, defaults to false. If at_begin is false or
|
233
|
+
// unspecified, callback will only be executed `delay` milliseconds after
|
234
|
+
// the last debounced-function call. If at_begin is true, callback will be
|
235
|
+
// executed only at the first debounced-function call. (After the
|
236
|
+
// throttled-function has not been called for `delay` milliseconds, the
|
237
|
+
// internal counter is reset)
|
238
|
+
// callback - (Function) A function to be executed after delay milliseconds.
|
239
|
+
// The `this` context and all arguments are passed through, as-is, to
|
240
|
+
// `callback` when the debounced-function is executed.
|
241
|
+
//
|
242
|
+
// Returns:
|
243
|
+
//
|
244
|
+
// (Function) A new, debounced, function.
|
245
|
+
|
246
|
+
$.debounce = function( delay, at_begin, callback ) {
|
247
|
+
return callback === undefined
|
248
|
+
? jq_throttle( delay, at_begin, false )
|
249
|
+
: jq_throttle( delay, callback, at_begin !== false );
|
250
|
+
};
|
251
|
+
|
252
|
+
})(this);
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/*jshint browser:true */
|
2
|
+
/*!
|
3
|
+
* FitVids 1.1
|
4
|
+
*
|
5
|
+
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
|
6
|
+
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
|
7
|
+
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
|
8
|
+
*
|
9
|
+
*/
|
10
|
+
|
11
|
+
;(function( $ ){
|
12
|
+
|
13
|
+
'use strict';
|
14
|
+
|
15
|
+
$.fn.fitVids = function( options ) {
|
16
|
+
var settings = {
|
17
|
+
customSelector: null,
|
18
|
+
ignore: null
|
19
|
+
};
|
20
|
+
|
21
|
+
if(!document.getElementById('fit-vids-style')) {
|
22
|
+
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
|
23
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
24
|
+
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
|
25
|
+
var div = document.createElement("div");
|
26
|
+
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
|
27
|
+
head.appendChild(div.childNodes[1]);
|
28
|
+
}
|
29
|
+
|
30
|
+
if ( options ) {
|
31
|
+
$.extend( settings, options );
|
32
|
+
}
|
33
|
+
|
34
|
+
return this.each(function(){
|
35
|
+
var selectors = [
|
36
|
+
'iframe[src*="player.vimeo.com"]',
|
37
|
+
'iframe[src*="youtube.com"]',
|
38
|
+
'iframe[src*="youtube-nocookie.com"]',
|
39
|
+
'iframe[src*="kickstarter.com"][src*="video.html"]',
|
40
|
+
'object',
|
41
|
+
'embed'
|
42
|
+
];
|
43
|
+
|
44
|
+
if (settings.customSelector) {
|
45
|
+
selectors.push(settings.customSelector);
|
46
|
+
}
|
47
|
+
|
48
|
+
var ignoreList = '.fitvidsignore';
|
49
|
+
|
50
|
+
if(settings.ignore) {
|
51
|
+
ignoreList = ignoreList + ', ' + settings.ignore;
|
52
|
+
}
|
53
|
+
|
54
|
+
var $allVideos = $(this).find(selectors.join(','));
|
55
|
+
$allVideos = $allVideos.not('object object'); // SwfObj conflict patch
|
56
|
+
$allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video.
|
57
|
+
|
58
|
+
$allVideos.each(function(count){
|
59
|
+
var $this = $(this);
|
60
|
+
if($this.parents(ignoreList).length > 0) {
|
61
|
+
return; // Disable FitVids on this video.
|
62
|
+
}
|
63
|
+
if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; }
|
64
|
+
if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width'))))
|
65
|
+
{
|
66
|
+
$this.attr('height', 9);
|
67
|
+
$this.attr('width', 16);
|
68
|
+
}
|
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' + count;
|
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
|
+
// Works with either jQuery or Zepto
|
82
|
+
})( window.jQuery || window.Zepto );
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/*
|
2
|
+
GreedyNav.js - https://github.com/lukejacksonn/GreedyNav
|
3
|
+
Licensed under the MIT license - http://opensource.org/licenses/MIT
|
4
|
+
Copyright (c) 2015 Luke Jackson http://lukejacksonn.com
|
5
|
+
*/
|
6
|
+
|
7
|
+
$(function() {
|
8
|
+
|
9
|
+
var $btn = $("nav.greedy-nav .greedy-nav__toggle");
|
10
|
+
var $vlinks = $("nav.greedy-nav .visible-links");
|
11
|
+
var $hlinks = $("nav.greedy-nav .hidden-links");
|
12
|
+
var $nav = $("nav.greedy-nav");
|
13
|
+
var $logo = $('nav.greedy-nav .site-logo');
|
14
|
+
var $logoImg = $('nav.greedy-nav .site-logo img');
|
15
|
+
var $title = $("nav.greedy-nav .site-title");
|
16
|
+
var $search = $('nav.greedy-nav button.search__toggle');
|
17
|
+
|
18
|
+
var numOfItems, totalSpace, closingTime, breakWidths;
|
19
|
+
|
20
|
+
// This function measures both hidden and visible links and sets the navbar breakpoints
|
21
|
+
// This is called the first time the script runs and everytime the "check()" function detects a change of window width that reached a different CSS width breakpoint, which affects the size of navbar Items
|
22
|
+
// Please note that "CSS width breakpoints" (which are only 4) !== "navbar breakpoints" (which are as many as the number of items on the navbar)
|
23
|
+
function measureLinks(){
|
24
|
+
numOfItems = 0;
|
25
|
+
totalSpace = 0;
|
26
|
+
closingTime = 1000;
|
27
|
+
breakWidths = [];
|
28
|
+
|
29
|
+
// Adds the width of a navItem in order to create breakpoints for the navbar
|
30
|
+
function addWidth(i, w) {
|
31
|
+
totalSpace += w;
|
32
|
+
numOfItems += 1;
|
33
|
+
breakWidths.push(totalSpace);
|
34
|
+
}
|
35
|
+
|
36
|
+
// Measures the width of hidden links by making a temporary clone of them and positioning under visible links
|
37
|
+
function hiddenWidth(obj){
|
38
|
+
var clone = obj.clone();
|
39
|
+
clone.css("visibility","hidden");
|
40
|
+
$vlinks.append(clone);
|
41
|
+
addWidth(0, clone.outerWidth());
|
42
|
+
clone.remove();
|
43
|
+
}
|
44
|
+
// Measure both visible and hidden links widths
|
45
|
+
$vlinks.children().outerWidth(addWidth);
|
46
|
+
$hlinks.children().each(function(){hiddenWidth($(this))});
|
47
|
+
}
|
48
|
+
// Get initial state
|
49
|
+
measureLinks();
|
50
|
+
|
51
|
+
var winWidth = $( window ).width();
|
52
|
+
// Set the last measured CSS width breakpoint: 0: <768px, 1: <1024px, 2: < 1280px, 3: >= 1280px.
|
53
|
+
var lastBreakpoint = winWidth < 768 ? 0 : winWidth < 1024 ? 1 : winWidth < 1280 ? 2 : 3;
|
54
|
+
|
55
|
+
var availableSpace, numOfVisibleItems, requiredSpace, timer;
|
56
|
+
|
57
|
+
function check() {
|
58
|
+
|
59
|
+
winWidth = $( window ).width();
|
60
|
+
// Set the current CSS width breakpoint: 0: <768px, 1: <1024px, 2: < 1280px, 3: >= 1280px.
|
61
|
+
var curBreakpoint = winWidth < 768 ? 0 : winWidth < 1024 ? 1 : winWidth < 1280 ? 2 : 3;
|
62
|
+
// If current breakpoint is different from last measured breakpoint, measureLinks again
|
63
|
+
if(curBreakpoint !== lastBreakpoint) measureLinks();
|
64
|
+
// Set the last measured CSS width breakpoint with the current breakpoint
|
65
|
+
lastBreakpoint = curBreakpoint;
|
66
|
+
|
67
|
+
// Get instant state
|
68
|
+
numOfVisibleItems = $vlinks.children().length;
|
69
|
+
// Decrease the width of visible elements from the nav innerWidth to find out the available space for navItems
|
70
|
+
availableSpace = /* nav */ $nav.innerWidth()
|
71
|
+
- /* logo */ ($logo.length !== 0 ? $logo.outerWidth(true) : 0)
|
72
|
+
- /* title */ $title.outerWidth(true)
|
73
|
+
- /* search */ ($search.length !== 0 ? $search.outerWidth(true) : 0)
|
74
|
+
- /* toggle */ (numOfVisibleItems !== breakWidths.length ? $btn.outerWidth(true) : 0);
|
75
|
+
requiredSpace = breakWidths[numOfVisibleItems - 1];
|
76
|
+
|
77
|
+
// There is not enought space
|
78
|
+
if (requiredSpace > availableSpace) {
|
79
|
+
$vlinks.children().last().prependTo($hlinks);
|
80
|
+
numOfVisibleItems -= 1;
|
81
|
+
check();
|
82
|
+
// There is more than enough space. If only one element is hidden, add the toggle width to the available space
|
83
|
+
} else if (availableSpace + (numOfVisibleItems === breakWidths.length - 1?$btn.outerWidth(true):0) > breakWidths[numOfVisibleItems]) {
|
84
|
+
$hlinks.children().first().appendTo($vlinks);
|
85
|
+
numOfVisibleItems += 1;
|
86
|
+
check();
|
87
|
+
}
|
88
|
+
// Update the button accordingly
|
89
|
+
$btn.attr("count", numOfItems - numOfVisibleItems);
|
90
|
+
if (numOfVisibleItems === numOfItems) {
|
91
|
+
$btn.addClass('hidden');
|
92
|
+
} else $btn.removeClass('hidden');
|
93
|
+
}
|
94
|
+
|
95
|
+
// Window listeners
|
96
|
+
$(window).resize(function() {
|
97
|
+
check();
|
98
|
+
});
|
99
|
+
|
100
|
+
$btn.on('click', function() {
|
101
|
+
$hlinks.toggleClass('hidden');
|
102
|
+
$(this).toggleClass('close');
|
103
|
+
clearTimeout(timer);
|
104
|
+
});
|
105
|
+
|
106
|
+
$hlinks.on('mouseleave', function() {
|
107
|
+
// Mouse has left, start the timer
|
108
|
+
timer = setTimeout(function() {
|
109
|
+
$hlinks.addClass('hidden');
|
110
|
+
}, closingTime);
|
111
|
+
}).on('mouseenter', function() {
|
112
|
+
// Mouse is back, cancel the timer
|
113
|
+
clearTimeout(timer);
|
114
|
+
})
|
115
|
+
|
116
|
+
// check if page has a logo
|
117
|
+
if($logoImg.length !== 0){
|
118
|
+
// check if logo is not loaded
|
119
|
+
if(!($logoImg[0].complete || $logoImg[0].naturalWidth !== 0)){
|
120
|
+
// if logo is not loaded wait for logo to load or fail to check
|
121
|
+
$logoImg.one("load error", check);
|
122
|
+
// if logo is already loaded just check
|
123
|
+
} else check();
|
124
|
+
// if page does not have a logo just check
|
125
|
+
} else check();
|
126
|
+
|
127
|
+
});
|