foundation6-jekyll-base 0.0.1
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 +21 -0
- data/README.md +2 -0
- data/_includes/footer.html +1 -0
- data/_includes/head.html +16 -0
- data/_includes/header.html +1 -0
- data/_includes/javascripts.html +4 -0
- data/_layouts/default.html +18 -0
- data/_layouts/home.html +26 -0
- data/_layouts/page.html +15 -0
- data/_layouts/post.html +25 -0
- data/_sass/_vendor/normalize-scss/sass/_normalize.scss +3 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_import-now.scss +11 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_normalize-mixin.scss +676 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_variables.scss +36 -0
- data/_sass/_vendor/normalize-scss/sass/normalize/_vertical-rhythm.scss +61 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/_sass/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/_sass/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/_sass/foundation/_global.scss +219 -0
- data/_sass/foundation/components/_accordion-menu.scss +36 -0
- data/_sass/foundation/components/_accordion.scss +150 -0
- data/_sass/foundation/components/_badge.scss +63 -0
- data/_sass/foundation/components/_breadcrumbs.scss +97 -0
- data/_sass/foundation/components/_button-group.scss +249 -0
- data/_sass/foundation/components/_button.scss +303 -0
- data/_sass/foundation/components/_callout.scss +106 -0
- data/_sass/foundation/components/_card.scss +121 -0
- data/_sass/foundation/components/_close-button.scss +102 -0
- data/_sass/foundation/components/_drilldown.scss +93 -0
- data/_sass/foundation/components/_dropdown-menu.scss +226 -0
- data/_sass/foundation/components/_dropdown.scss +72 -0
- data/_sass/foundation/components/_flex-video.scss +1 -0
- data/_sass/foundation/components/_flex.scss +28 -0
- data/_sass/foundation/components/_float.scss +27 -0
- data/_sass/foundation/components/_label.scss +64 -0
- data/_sass/foundation/components/_media-object.scss +114 -0
- data/_sass/foundation/components/_menu-icon.scss +9 -0
- data/_sass/foundation/components/_menu.scss +371 -0
- data/_sass/foundation/components/_off-canvas.scss +329 -0
- data/_sass/foundation/components/_orbit.scss +196 -0
- data/_sass/foundation/components/_pagination.scss +193 -0
- data/_sass/foundation/components/_progress-bar.scss +64 -0
- data/_sass/foundation/components/_responsive-embed.scss +67 -0
- data/_sass/foundation/components/_reveal.scss +178 -0
- data/_sass/foundation/components/_slider.scss +138 -0
- data/_sass/foundation/components/_sticky.scss +38 -0
- data/_sass/foundation/components/_switch.scss +247 -0
- data/_sass/foundation/components/_table.scss +329 -0
- data/_sass/foundation/components/_tabs.scss +196 -0
- data/_sass/foundation/components/_thumbnail.scss +67 -0
- data/_sass/foundation/components/_title-bar.scss +84 -0
- data/_sass/foundation/components/_tooltip.scss +107 -0
- data/_sass/foundation/components/_top-bar.scss +173 -0
- data/_sass/foundation/components/_visibility.scss +132 -0
- data/_sass/foundation/forms/_checkbox.scss +41 -0
- data/_sass/foundation/forms/_error.scss +88 -0
- data/_sass/foundation/forms/_fieldset.scss +54 -0
- data/_sass/foundation/forms/_forms.scss +34 -0
- data/_sass/foundation/forms/_help-text.scss +30 -0
- data/_sass/foundation/forms/_input-group.scss +135 -0
- data/_sass/foundation/forms/_label.scss +50 -0
- data/_sass/foundation/forms/_meter.scss +110 -0
- data/_sass/foundation/forms/_progress.scss +94 -0
- data/_sass/foundation/forms/_range.scss +149 -0
- data/_sass/foundation/forms/_select.scss +85 -0
- data/_sass/foundation/forms/_text.scss +170 -0
- data/_sass/foundation/foundation.scss +118 -0
- data/_sass/foundation/grid/_classes.scss +176 -0
- data/_sass/foundation/grid/_column.scss +112 -0
- data/_sass/foundation/grid/_flex-grid.scss +307 -0
- data/_sass/foundation/grid/_grid.scss +44 -0
- data/_sass/foundation/grid/_gutter.scss +82 -0
- data/_sass/foundation/grid/_layout.scss +76 -0
- data/_sass/foundation/grid/_position.scss +76 -0
- data/_sass/foundation/grid/_row.scss +99 -0
- data/_sass/foundation/grid/_size.scss +24 -0
- data/_sass/foundation/settings/_settings.scss +621 -0
- data/_sass/foundation/typography/_alignment.scss +22 -0
- data/_sass/foundation/typography/_base.scss +509 -0
- data/_sass/foundation/typography/_helpers.scss +78 -0
- data/_sass/foundation/typography/_print.scss +81 -0
- data/_sass/foundation/typography/_typography.scss +26 -0
- data/_sass/foundation/util/_breakpoint.scss +281 -0
- data/_sass/foundation/util/_color.scss +126 -0
- data/_sass/foundation/util/_direction.scss +31 -0
- data/_sass/foundation/util/_flex.scss +85 -0
- data/_sass/foundation/util/_math.scss +72 -0
- data/_sass/foundation/util/_mixins.scss +276 -0
- data/_sass/foundation/util/_selector.scss +41 -0
- data/_sass/foundation/util/_unit.scss +152 -0
- data/_sass/foundation/util/_util.scss +13 -0
- data/_sass/foundation/util/_value.scss +140 -0
- data/assets/js/app.js +1 -0
- data/assets/js/vendor/foundation/foundation.d.ts +496 -0
- data/assets/js/vendor/foundation/foundation.js +10207 -0
- data/assets/js/vendor/foundation/foundation.min.js +4 -0
- data/assets/js/vendor/foundation/plugins/foundation.abide.js +637 -0
- data/assets/js/vendor/foundation/plugins/foundation.abide.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.accordion.js +252 -0
- data/assets/js/vendor/foundation/plugins/foundation.accordion.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.accordionMenu.js +318 -0
- data/assets/js/vendor/foundation/plugins/foundation.accordionMenu.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.core.js +386 -0
- data/assets/js/vendor/foundation/plugins/foundation.core.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.drilldown.js +565 -0
- data/assets/js/vendor/foundation/plugins/foundation.drilldown.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.dropdown.js +465 -0
- data/assets/js/vendor/foundation/plugins/foundation.dropdown.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.dropdownMenu.js +486 -0
- data/assets/js/vendor/foundation/plugins/foundation.dropdownMenu.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.equalizer.js +374 -0
- data/assets/js/vendor/foundation/plugins/foundation.equalizer.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.interchange.js +233 -0
- data/assets/js/vendor/foundation/plugins/foundation.interchange.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.magellan.js +285 -0
- data/assets/js/vendor/foundation/plugins/foundation.magellan.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.offcanvas.js +474 -0
- data/assets/js/vendor/foundation/plugins/foundation.offcanvas.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.orbit.js +566 -0
- data/assets/js/vendor/foundation/plugins/foundation.orbit.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.responsiveMenu.js +169 -0
- data/assets/js/vendor/foundation/plugins/foundation.responsiveMenu.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.responsiveToggle.js +177 -0
- data/assets/js/vendor/foundation/plugins/foundation.responsiveToggle.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.reveal.js +633 -0
- data/assets/js/vendor/foundation/plugins/foundation.reveal.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.slider.js +762 -0
- data/assets/js/vendor/foundation/plugins/foundation.slider.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.sticky.js +518 -0
- data/assets/js/vendor/foundation/plugins/foundation.sticky.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.tabs.js +512 -0
- data/assets/js/vendor/foundation/plugins/foundation.tabs.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.toggler.js +169 -0
- data/assets/js/vendor/foundation/plugins/foundation.toggler.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.tooltip.js +492 -0
- data/assets/js/vendor/foundation/plugins/foundation.tooltip.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.box.js +196 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.box.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.keyboard.js +163 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.keyboard.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.mediaQuery.js +233 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.mediaQuery.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.motion.js +103 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.motion.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.nest.js +74 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.nest.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.timerAndImageLoader.js +90 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.timerAndImageLoader.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.touch.js +352 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.touch.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.triggers.js +261 -0
- data/assets/js/vendor/foundation/plugins/foundation.util.triggers.min.js +1 -0
- data/assets/js/vendor/foundation/plugins/foundation.zf.responsiveAccordionTabs.js +262 -0
- data/assets/js/vendor/foundation/plugins/foundation.zf.responsiveAccordionTabs.min.js +1 -0
- data/assets/main.scss +6 -0
- metadata +232 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e){function t(){this.removeEventListener("touchmove",n),this.removeEventListener("touchend",t),r=!1}function n(n){if(e.spotSwipe.preventDefault&&n.preventDefault(),r){var o,i=n.touches[0].pageX,c=(n.touches[0].pageY,s-i);h=(new Date).getTime()-u,Math.abs(c)>=e.spotSwipe.moveThreshold&&h<=e.spotSwipe.timeThreshold&&(o=c>0?"left":"right"),o&&(n.preventDefault(),t.call(this),e(this).trigger("swipe",o).trigger("swipe"+o))}}function o(e){1==e.touches.length&&(s=e.touches[0].pageX,c=e.touches[0].pageY,r=!0,u=(new Date).getTime(),this.addEventListener("touchmove",n,!1),this.addEventListener("touchend",t,!1))}function i(){this.addEventListener&&this.addEventListener("touchstart",o,!1)}e.spotSwipe={version:"1.0.0",enabled:"ontouchstart"in document.documentElement,preventDefault:!1,moveThreshold:75,timeThreshold:200};var s,c,u,h,r=!1;e.event.special.swipe={setup:i},e.each(["left","up","down","right"],function(){e.event.special["swipe"+this]={setup:function(){e(this).on("swipe",e.noop)}}})}(jQuery),!function(e){e.fn.addTouch=function(){this.each(function(n,o){e(o).bind("touchstart touchmove touchend touchcancel",function(){t(event)})});var t=function(e){var t,n=e.changedTouches,o=n[0],i={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"},s=i[e.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?t=new window.MouseEvent(s,{bubbles:!0,cancelable:!0,screenX:o.screenX,screenY:o.screenY,clientX:o.clientX,clientY:o.clientY}):(t=document.createEvent("MouseEvent"),t.initMouseEvent(s,!0,!0,window,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null)),o.target.dispatchEvent(t)}}}(jQuery);
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
!function ($) {
|
|
4
|
+
|
|
5
|
+
var MutationObserver = function () {
|
|
6
|
+
var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
|
|
7
|
+
for (var i = 0; i < prefixes.length; i++) {
|
|
8
|
+
if (prefixes[i] + 'MutationObserver' in window) {
|
|
9
|
+
return window[prefixes[i] + 'MutationObserver'];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return false;
|
|
13
|
+
}();
|
|
14
|
+
|
|
15
|
+
var triggers = function (el, type) {
|
|
16
|
+
el.data(type).split(' ').forEach(function (id) {
|
|
17
|
+
$('#' + id)[type === 'close' ? 'trigger' : 'triggerHandler'](type + '.zf.trigger', [el]);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
// Elements with [data-open] will reveal a plugin that supports it when clicked.
|
|
21
|
+
$(document).on('click.zf.trigger', '[data-open]', function () {
|
|
22
|
+
triggers($(this), 'open');
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Elements with [data-close] will close a plugin that supports it when clicked.
|
|
26
|
+
// If used without a value on [data-close], the event will bubble, allowing it to close a parent component.
|
|
27
|
+
$(document).on('click.zf.trigger', '[data-close]', function () {
|
|
28
|
+
var id = $(this).data('close');
|
|
29
|
+
if (id) {
|
|
30
|
+
triggers($(this), 'close');
|
|
31
|
+
} else {
|
|
32
|
+
$(this).trigger('close.zf.trigger');
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Elements with [data-toggle] will toggle a plugin that supports it when clicked.
|
|
37
|
+
$(document).on('click.zf.trigger', '[data-toggle]', function () {
|
|
38
|
+
var id = $(this).data('toggle');
|
|
39
|
+
if (id) {
|
|
40
|
+
triggers($(this), 'toggle');
|
|
41
|
+
} else {
|
|
42
|
+
$(this).trigger('toggle.zf.trigger');
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Elements with [data-closable] will respond to close.zf.trigger events.
|
|
47
|
+
$(document).on('close.zf.trigger', '[data-closable]', function (e) {
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
var animation = $(this).data('closable');
|
|
50
|
+
|
|
51
|
+
if (animation !== '') {
|
|
52
|
+
Foundation.Motion.animateOut($(this), animation, function () {
|
|
53
|
+
$(this).trigger('closed.zf');
|
|
54
|
+
});
|
|
55
|
+
} else {
|
|
56
|
+
$(this).fadeOut().trigger('closed.zf');
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
$(document).on('focus.zf.trigger blur.zf.trigger', '[data-toggle-focus]', function () {
|
|
61
|
+
var id = $(this).data('toggle-focus');
|
|
62
|
+
$('#' + id).triggerHandler('toggle.zf.trigger', [$(this)]);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Fires once after all other scripts have loaded
|
|
67
|
+
* @function
|
|
68
|
+
* @private
|
|
69
|
+
*/
|
|
70
|
+
$(window).on('load', function () {
|
|
71
|
+
checkListeners();
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
function checkListeners() {
|
|
75
|
+
eventsListener();
|
|
76
|
+
resizeListener();
|
|
77
|
+
scrollListener();
|
|
78
|
+
mutateListener();
|
|
79
|
+
closemeListener();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//******** only fires this function once on load, if there's something to watch ********
|
|
83
|
+
function closemeListener(pluginName) {
|
|
84
|
+
var yetiBoxes = $('[data-yeti-box]'),
|
|
85
|
+
plugNames = ['dropdown', 'tooltip', 'reveal'];
|
|
86
|
+
|
|
87
|
+
if (pluginName) {
|
|
88
|
+
if (typeof pluginName === 'string') {
|
|
89
|
+
plugNames.push(pluginName);
|
|
90
|
+
} else if (typeof pluginName === 'object' && typeof pluginName[0] === 'string') {
|
|
91
|
+
plugNames.concat(pluginName);
|
|
92
|
+
} else {
|
|
93
|
+
console.error('Plugin names must be strings');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (yetiBoxes.length) {
|
|
97
|
+
var listeners = plugNames.map(function (name) {
|
|
98
|
+
return 'closeme.zf.' + name;
|
|
99
|
+
}).join(' ');
|
|
100
|
+
|
|
101
|
+
$(window).off(listeners).on(listeners, function (e, pluginId) {
|
|
102
|
+
var plugin = e.namespace.split('.')[0];
|
|
103
|
+
var plugins = $('[data-' + plugin + ']').not('[data-yeti-box="' + pluginId + '"]');
|
|
104
|
+
|
|
105
|
+
plugins.each(function () {
|
|
106
|
+
var _this = $(this);
|
|
107
|
+
|
|
108
|
+
_this.triggerHandler('close.zf.trigger', [_this]);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function resizeListener(debounce) {
|
|
115
|
+
var timer = void 0,
|
|
116
|
+
$nodes = $('[data-resize]');
|
|
117
|
+
if ($nodes.length) {
|
|
118
|
+
$(window).off('resize.zf.trigger').on('resize.zf.trigger', function (e) {
|
|
119
|
+
if (timer) {
|
|
120
|
+
clearTimeout(timer);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
timer = setTimeout(function () {
|
|
124
|
+
|
|
125
|
+
if (!MutationObserver) {
|
|
126
|
+
//fallback for IE 9
|
|
127
|
+
$nodes.each(function () {
|
|
128
|
+
$(this).triggerHandler('resizeme.zf.trigger');
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
//trigger all listening elements and signal a resize event
|
|
132
|
+
$nodes.attr('data-events', "resize");
|
|
133
|
+
}, debounce || 10); //default time to emit resize event
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function scrollListener(debounce) {
|
|
139
|
+
var timer = void 0,
|
|
140
|
+
$nodes = $('[data-scroll]');
|
|
141
|
+
if ($nodes.length) {
|
|
142
|
+
$(window).off('scroll.zf.trigger').on('scroll.zf.trigger', function (e) {
|
|
143
|
+
if (timer) {
|
|
144
|
+
clearTimeout(timer);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
timer = setTimeout(function () {
|
|
148
|
+
|
|
149
|
+
if (!MutationObserver) {
|
|
150
|
+
//fallback for IE 9
|
|
151
|
+
$nodes.each(function () {
|
|
152
|
+
$(this).triggerHandler('scrollme.zf.trigger');
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
//trigger all listening elements and signal a scroll event
|
|
156
|
+
$nodes.attr('data-events', "scroll");
|
|
157
|
+
}, debounce || 10); //default time to emit scroll event
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function mutateListener(debounce) {
|
|
163
|
+
var $nodes = $('[data-mutate]');
|
|
164
|
+
if ($nodes.length && MutationObserver) {
|
|
165
|
+
//trigger all listening elements and signal a mutate event
|
|
166
|
+
//no IE 9 or 10
|
|
167
|
+
$nodes.each(function () {
|
|
168
|
+
$(this).triggerHandler('mutateme.zf.trigger');
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function eventsListener() {
|
|
174
|
+
if (!MutationObserver) {
|
|
175
|
+
return false;
|
|
176
|
+
}
|
|
177
|
+
var nodes = document.querySelectorAll('[data-resize], [data-scroll], [data-mutate]');
|
|
178
|
+
|
|
179
|
+
//element callback
|
|
180
|
+
var listeningElementsMutation = function (mutationRecordsList) {
|
|
181
|
+
var $target = $(mutationRecordsList[0].target);
|
|
182
|
+
|
|
183
|
+
//trigger the event handler for the element depending on type
|
|
184
|
+
switch (mutationRecordsList[0].type) {
|
|
185
|
+
|
|
186
|
+
case "attributes":
|
|
187
|
+
if ($target.attr("data-events") === "scroll" && mutationRecordsList[0].attributeName === "data-events") {
|
|
188
|
+
$target.triggerHandler('scrollme.zf.trigger', [$target, window.pageYOffset]);
|
|
189
|
+
}
|
|
190
|
+
if ($target.attr("data-events") === "resize" && mutationRecordsList[0].attributeName === "data-events") {
|
|
191
|
+
$target.triggerHandler('resizeme.zf.trigger', [$target]);
|
|
192
|
+
}
|
|
193
|
+
if (mutationRecordsList[0].attributeName === "style") {
|
|
194
|
+
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
|
195
|
+
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
|
196
|
+
}
|
|
197
|
+
break;
|
|
198
|
+
|
|
199
|
+
case "childList":
|
|
200
|
+
$target.closest("[data-mutate]").attr("data-events", "mutate");
|
|
201
|
+
$target.closest("[data-mutate]").triggerHandler('mutateme.zf.trigger', [$target.closest("[data-mutate]")]);
|
|
202
|
+
break;
|
|
203
|
+
|
|
204
|
+
default:
|
|
205
|
+
return false;
|
|
206
|
+
//nothing
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
if (nodes.length) {
|
|
211
|
+
//for each element that needs to listen for resizing, scrolling, or mutation add a single observer
|
|
212
|
+
for (var i = 0; i <= nodes.length - 1; i++) {
|
|
213
|
+
var elementObserver = new MutationObserver(listeningElementsMutation);
|
|
214
|
+
elementObserver.observe(nodes[i], { attributes: true, childList: true, characterData: false, subtree: true, attributeFilter: ["data-events", "style"] });
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
// ------------------------------------
|
|
220
|
+
|
|
221
|
+
// [PH]
|
|
222
|
+
// Foundation.CheckWatchers = checkWatchers;
|
|
223
|
+
Foundation.IHearYou = checkListeners;
|
|
224
|
+
// Foundation.ISeeYou = scrollListener;
|
|
225
|
+
// Foundation.IFeelYou = closemeListener;
|
|
226
|
+
}(jQuery);
|
|
227
|
+
|
|
228
|
+
// function domMutationObserver(debounce) {
|
|
229
|
+
// // !!! This is coming soon and needs more work; not active !!! //
|
|
230
|
+
// var timer,
|
|
231
|
+
// nodes = document.querySelectorAll('[data-mutate]');
|
|
232
|
+
// //
|
|
233
|
+
// if (nodes.length) {
|
|
234
|
+
// // var MutationObserver = (function () {
|
|
235
|
+
// // var prefixes = ['WebKit', 'Moz', 'O', 'Ms', ''];
|
|
236
|
+
// // for (var i=0; i < prefixes.length; i++) {
|
|
237
|
+
// // if (prefixes[i] + 'MutationObserver' in window) {
|
|
238
|
+
// // return window[prefixes[i] + 'MutationObserver'];
|
|
239
|
+
// // }
|
|
240
|
+
// // }
|
|
241
|
+
// // return false;
|
|
242
|
+
// // }());
|
|
243
|
+
//
|
|
244
|
+
//
|
|
245
|
+
// //for the body, we need to listen for all changes effecting the style and class attributes
|
|
246
|
+
// var bodyObserver = new MutationObserver(bodyMutation);
|
|
247
|
+
// bodyObserver.observe(document.body, { attributes: true, childList: true, characterData: false, subtree:true, attributeFilter:["style", "class"]});
|
|
248
|
+
//
|
|
249
|
+
//
|
|
250
|
+
// //body callback
|
|
251
|
+
// function bodyMutation(mutate) {
|
|
252
|
+
// //trigger all listening elements and signal a mutation event
|
|
253
|
+
// if (timer) { clearTimeout(timer); }
|
|
254
|
+
//
|
|
255
|
+
// timer = setTimeout(function() {
|
|
256
|
+
// bodyObserver.disconnect();
|
|
257
|
+
// $('[data-mutate]').attr('data-events',"mutate");
|
|
258
|
+
// }, debounce || 150);
|
|
259
|
+
// }
|
|
260
|
+
// }
|
|
261
|
+
// }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";!function(t){function e(){o(),a(),i(),n(),r()}function r(e){var r=t("[data-yeti-box]"),a=["dropdown","tooltip","reveal"];if(e&&("string"==typeof e?a.push(e):"object"==typeof e&&"string"==typeof e[0]?a.concat(e):console.error("Plugin names must be strings")),r.length){var i=a.map(function(t){return"closeme.zf."+t}).join(" ");t(window).off(i).on(i,function(e,r){var a=e.namespace.split(".")[0],i=t("[data-"+a+"]").not('[data-yeti-box="'+r+'"]');i.each(function(){var e=t(this);e.triggerHandler("close.zf.trigger",[e])})})}}function a(e){var r=void 0,a=t("[data-resize]");a.length&&t(window).off("resize.zf.trigger").on("resize.zf.trigger",function(i){r&&clearTimeout(r),r=setTimeout(function(){g||a.each(function(){t(this).triggerHandler("resizeme.zf.trigger")}),a.attr("data-events","resize")},e||10)})}function i(e){var r=void 0,a=t("[data-scroll]");a.length&&t(window).off("scroll.zf.trigger").on("scroll.zf.trigger",function(i){r&&clearTimeout(r),r=setTimeout(function(){g||a.each(function(){t(this).triggerHandler("scrollme.zf.trigger")}),a.attr("data-events","scroll")},e||10)})}function n(e){var r=t("[data-mutate]");r.length&&g&&r.each(function(){t(this).triggerHandler("mutateme.zf.trigger")})}function o(){if(!g)return!1;var e=document.querySelectorAll("[data-resize], [data-scroll], [data-mutate]"),r=function(e){var r=t(e[0].target);switch(e[0].type){case"attributes":"scroll"===r.attr("data-events")&&"data-events"===e[0].attributeName&&r.triggerHandler("scrollme.zf.trigger",[r,window.pageYOffset]),"resize"===r.attr("data-events")&&"data-events"===e[0].attributeName&&r.triggerHandler("resizeme.zf.trigger",[r]),"style"===e[0].attributeName&&(r.closest("[data-mutate]").attr("data-events","mutate"),r.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[r.closest("[data-mutate]")]));break;case"childList":r.closest("[data-mutate]").attr("data-events","mutate"),r.closest("[data-mutate]").triggerHandler("mutateme.zf.trigger",[r.closest("[data-mutate]")]);break;default:return!1}};if(e.length)for(var a=0;a<=e.length-1;a++){var i=new g(r);i.observe(e[a],{attributes:!0,childList:!0,characterData:!1,subtree:!0,attributeFilter:["data-events","style"]})}}var g=function(){for(var t=["WebKit","Moz","O","Ms",""],e=0;e<t.length;e++)if(t[e]+"MutationObserver"in window)return window[t[e]+"MutationObserver"];return!1}(),s=function(e,r){e.data(r).split(" ").forEach(function(a){t("#"+a)["close"===r?"trigger":"triggerHandler"](r+".zf.trigger",[e])})};t(document).on("click.zf.trigger","[data-open]",function(){s(t(this),"open")}),t(document).on("click.zf.trigger","[data-close]",function(){var e=t(this).data("close");e?s(t(this),"close"):t(this).trigger("close.zf.trigger")}),t(document).on("click.zf.trigger","[data-toggle]",function(){var e=t(this).data("toggle");e?s(t(this),"toggle"):t(this).trigger("toggle.zf.trigger")}),t(document).on("close.zf.trigger","[data-closable]",function(e){e.stopPropagation();var r=t(this).data("closable");""!==r?Foundation.Motion.animateOut(t(this),r,function(){t(this).trigger("closed.zf")}):t(this).fadeOut().trigger("closed.zf")}),t(document).on("focus.zf.trigger blur.zf.trigger","[data-toggle-focus]",function(){var e=t(this).data("toggle-focus");t("#"+e).triggerHandler("toggle.zf.trigger",[t(this)])}),t(window).on("load",function(){e()}),Foundation.IHearYou=e}(jQuery);
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
4
|
+
|
|
5
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
6
|
+
|
|
7
|
+
!function ($) {
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* ResponsiveAccordionTabs module.
|
|
11
|
+
* @module foundation.responsiveAccordionTabs
|
|
12
|
+
* @requires foundation.util.keyboard
|
|
13
|
+
* @requires foundation.util.timerAndImageLoader
|
|
14
|
+
* @requires foundation.util.motion
|
|
15
|
+
* @requires foundation.accordion
|
|
16
|
+
* @requires foundation.tabs
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
var ResponsiveAccordionTabs = function () {
|
|
20
|
+
/**
|
|
21
|
+
* Creates a new instance of a responsive accordion tabs.
|
|
22
|
+
* @class
|
|
23
|
+
* @fires ResponsiveAccordionTabs#init
|
|
24
|
+
* @param {jQuery} element - jQuery object to make into a dropdown menu.
|
|
25
|
+
* @param {Object} options - Overrides to the default plugin settings.
|
|
26
|
+
*/
|
|
27
|
+
function ResponsiveAccordionTabs(element, options) {
|
|
28
|
+
_classCallCheck(this, ResponsiveAccordionTabs);
|
|
29
|
+
|
|
30
|
+
this.$element = $(element);
|
|
31
|
+
this.options = $.extend({}, this.$element.data(), options);
|
|
32
|
+
this.rules = this.$element.data('responsive-accordion-tabs');
|
|
33
|
+
this.currentMq = null;
|
|
34
|
+
this.currentPlugin = null;
|
|
35
|
+
if (!this.$element.attr('id')) {
|
|
36
|
+
this.$element.attr('id', Foundation.GetYoDigits(6, 'responsiveaccordiontabs'));
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
this._init();
|
|
40
|
+
this._events();
|
|
41
|
+
|
|
42
|
+
Foundation.registerPlugin(this, 'ResponsiveAccordionTabs');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Initializes the Menu by parsing the classes from the 'data-responsive-accordion-tabs' attribute on the element.
|
|
47
|
+
* @function
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
_createClass(ResponsiveAccordionTabs, [{
|
|
53
|
+
key: '_init',
|
|
54
|
+
value: function _init() {
|
|
55
|
+
// The first time an Interchange plugin is initialized, this.rules is converted from a string of "classes" to an object of rules
|
|
56
|
+
if (typeof this.rules === 'string') {
|
|
57
|
+
var rulesTree = {};
|
|
58
|
+
|
|
59
|
+
// Parse rules from "classes" pulled from data attribute
|
|
60
|
+
var rules = this.rules.split(' ');
|
|
61
|
+
|
|
62
|
+
// Iterate through every rule found
|
|
63
|
+
for (var i = 0; i < rules.length; i++) {
|
|
64
|
+
var rule = rules[i].split('-');
|
|
65
|
+
var ruleSize = rule.length > 1 ? rule[0] : 'small';
|
|
66
|
+
var rulePlugin = rule.length > 1 ? rule[1] : rule[0];
|
|
67
|
+
|
|
68
|
+
if (MenuPlugins[rulePlugin] !== null) {
|
|
69
|
+
rulesTree[ruleSize] = MenuPlugins[rulePlugin];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
this.rules = rulesTree;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
this._getAllOptions();
|
|
77
|
+
|
|
78
|
+
if (!$.isEmptyObject(this.rules)) {
|
|
79
|
+
this._checkMediaQueries();
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
key: '_getAllOptions',
|
|
84
|
+
value: function _getAllOptions() {
|
|
85
|
+
//get all defaults and options
|
|
86
|
+
var _this = this;
|
|
87
|
+
_this.allOptions = {};
|
|
88
|
+
for (var key in MenuPlugins) {
|
|
89
|
+
if (MenuPlugins.hasOwnProperty(key)) {
|
|
90
|
+
var obj = MenuPlugins[key];
|
|
91
|
+
try {
|
|
92
|
+
var dummyPlugin = $('<ul></ul>');
|
|
93
|
+
var tmpPlugin = new obj.plugin(dummyPlugin, _this.options);
|
|
94
|
+
for (var keyKey in tmpPlugin.options) {
|
|
95
|
+
if (tmpPlugin.options.hasOwnProperty(keyKey) && keyKey !== 'zfPlugin') {
|
|
96
|
+
var objObj = tmpPlugin.options[keyKey];
|
|
97
|
+
_this.allOptions[keyKey] = objObj;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
tmpPlugin.destroy();
|
|
101
|
+
} catch (e) {}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Initializes events for the Menu.
|
|
108
|
+
* @function
|
|
109
|
+
* @private
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
}, {
|
|
113
|
+
key: '_events',
|
|
114
|
+
value: function _events() {
|
|
115
|
+
var _this = this;
|
|
116
|
+
|
|
117
|
+
$(window).on('changed.zf.mediaquery', function () {
|
|
118
|
+
_this._checkMediaQueries();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Checks the current screen width against available media queries. If the media query has changed, and the plugin needed has changed, the plugins will swap out.
|
|
124
|
+
* @function
|
|
125
|
+
* @private
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
}, {
|
|
129
|
+
key: '_checkMediaQueries',
|
|
130
|
+
value: function _checkMediaQueries() {
|
|
131
|
+
var matchedMq,
|
|
132
|
+
_this = this;
|
|
133
|
+
// Iterate through each rule and find the last matching rule
|
|
134
|
+
$.each(this.rules, function (key) {
|
|
135
|
+
if (Foundation.MediaQuery.atLeast(key)) {
|
|
136
|
+
matchedMq = key;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
// No match? No dice
|
|
141
|
+
if (!matchedMq) return;
|
|
142
|
+
|
|
143
|
+
// Plugin already initialized? We good
|
|
144
|
+
if (this.currentPlugin instanceof this.rules[matchedMq].plugin) return;
|
|
145
|
+
|
|
146
|
+
// Remove existing plugin-specific CSS classes
|
|
147
|
+
$.each(MenuPlugins, function (key, value) {
|
|
148
|
+
_this.$element.removeClass(value.cssClass);
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
// Add the CSS class for the new plugin
|
|
152
|
+
this.$element.addClass(this.rules[matchedMq].cssClass);
|
|
153
|
+
|
|
154
|
+
// Create an instance of the new plugin
|
|
155
|
+
if (this.currentPlugin) {
|
|
156
|
+
//don't know why but on nested elements data zfPlugin get's lost
|
|
157
|
+
if (!this.currentPlugin.$element.data('zfPlugin') && this.storezfData) this.currentPlugin.$element.data('zfPlugin', this.storezfData);
|
|
158
|
+
this.currentPlugin.destroy();
|
|
159
|
+
}
|
|
160
|
+
this._handleMarkup(this.rules[matchedMq].cssClass);
|
|
161
|
+
this.currentPlugin = new this.rules[matchedMq].plugin(this.$element, {});
|
|
162
|
+
this.storezfData = this.currentPlugin.$element.data('zfPlugin');
|
|
163
|
+
}
|
|
164
|
+
}, {
|
|
165
|
+
key: '_handleMarkup',
|
|
166
|
+
value: function _handleMarkup(toSet) {
|
|
167
|
+
var _this = this,
|
|
168
|
+
fromString = 'accordion';
|
|
169
|
+
var $panels = $('[data-tabs-content=' + this.$element.attr('id') + ']');
|
|
170
|
+
if ($panels.length) fromString = 'tabs';
|
|
171
|
+
if (fromString === toSet) {
|
|
172
|
+
return;
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
var tabsTitle = _this.allOptions.linkClass ? _this.allOptions.linkClass : 'tabs-title';
|
|
176
|
+
var tabsPanel = _this.allOptions.panelClass ? _this.allOptions.panelClass : 'tabs-panel';
|
|
177
|
+
|
|
178
|
+
this.$element.removeAttr('role');
|
|
179
|
+
var $liHeads = this.$element.children('.' + tabsTitle + ',[data-accordion-item]').removeClass(tabsTitle).removeClass('accordion-item').removeAttr('data-accordion-item');
|
|
180
|
+
var $liHeadsA = $liHeads.children('a').removeClass('accordion-title');
|
|
181
|
+
|
|
182
|
+
if (fromString === 'tabs') {
|
|
183
|
+
$panels = $panels.children('.' + tabsPanel).removeClass(tabsPanel).removeAttr('role').removeAttr('aria-hidden').removeAttr('aria-labelledby');
|
|
184
|
+
$panels.children('a').removeAttr('role').removeAttr('aria-controls').removeAttr('aria-selected');
|
|
185
|
+
} else {
|
|
186
|
+
$panels = $liHeads.children('[data-tab-content]').removeClass('accordion-content');
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
$panels.css({ display: '', visibility: '' });
|
|
190
|
+
$liHeads.css({ display: '', visibility: '' });
|
|
191
|
+
if (toSet === 'accordion') {
|
|
192
|
+
$panels.each(function (key, value) {
|
|
193
|
+
$(value).appendTo($liHeads.get(key)).addClass('accordion-content').attr('data-tab-content', '').removeClass('is-active').css({ height: '' });
|
|
194
|
+
$('[data-tabs-content=' + _this.$element.attr('id') + ']').after('<div id="tabs-placeholder-' + _this.$element.attr('id') + '"></div>').remove();
|
|
195
|
+
$liHeads.addClass('accordion-item').attr('data-accordion-item', '');
|
|
196
|
+
$liHeadsA.addClass('accordion-title');
|
|
197
|
+
});
|
|
198
|
+
} else if (toSet === 'tabs') {
|
|
199
|
+
var $tabsContent = $('[data-tabs-content=' + _this.$element.attr('id') + ']');
|
|
200
|
+
var $placeholder = $('#tabs-placeholder-' + _this.$element.attr('id'));
|
|
201
|
+
if ($placeholder.length) {
|
|
202
|
+
$tabsContent = $('<div class="tabs-content"></div>').insertAfter($placeholder).attr('data-tabs-content', _this.$element.attr('id'));
|
|
203
|
+
$placeholder.remove();
|
|
204
|
+
} else {
|
|
205
|
+
$tabsContent = $('<div class="tabs-content"></div>').insertAfter(_this.$element).attr('data-tabs-content', _this.$element.attr('id'));
|
|
206
|
+
};
|
|
207
|
+
$panels.each(function (key, value) {
|
|
208
|
+
var tempValue = $(value).appendTo($tabsContent).addClass(tabsPanel);
|
|
209
|
+
var hash = $liHeadsA.get(key).hash.slice(1);
|
|
210
|
+
var id = $(value).attr('id') || Foundation.GetYoDigits(6, 'accordion');
|
|
211
|
+
if (hash !== id) {
|
|
212
|
+
if (hash !== '') {
|
|
213
|
+
$(value).attr('id', hash);
|
|
214
|
+
} else {
|
|
215
|
+
hash = id;
|
|
216
|
+
$(value).attr('id', hash);
|
|
217
|
+
$($liHeadsA.get(key)).attr('href', $($liHeadsA.get(key)).attr('href').replace('#', '') + '#' + hash);
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
var isActive = $($liHeads.get(key)).hasClass('is-active');
|
|
221
|
+
if (isActive) {
|
|
222
|
+
tempValue.addClass('is-active');
|
|
223
|
+
};
|
|
224
|
+
});
|
|
225
|
+
$liHeads.addClass(tabsTitle);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Destroys the instance of the current plugin on this element, as well as the window resize handler that switches the plugins out.
|
|
231
|
+
* @function
|
|
232
|
+
*/
|
|
233
|
+
|
|
234
|
+
}, {
|
|
235
|
+
key: 'destroy',
|
|
236
|
+
value: function destroy() {
|
|
237
|
+
if (this.currentPlugin) this.currentPlugin.destroy();
|
|
238
|
+
$(window).off('.zf.ResponsiveAccordionTabs');
|
|
239
|
+
Foundation.unregisterPlugin(this);
|
|
240
|
+
}
|
|
241
|
+
}]);
|
|
242
|
+
|
|
243
|
+
return ResponsiveAccordionTabs;
|
|
244
|
+
}();
|
|
245
|
+
|
|
246
|
+
ResponsiveAccordionTabs.defaults = {};
|
|
247
|
+
|
|
248
|
+
// The plugin matches the plugin classes with these plugin instances.
|
|
249
|
+
var MenuPlugins = {
|
|
250
|
+
tabs: {
|
|
251
|
+
cssClass: 'tabs',
|
|
252
|
+
plugin: Foundation._plugins.tabs || null
|
|
253
|
+
},
|
|
254
|
+
accordion: {
|
|
255
|
+
cssClass: 'accordion',
|
|
256
|
+
plugin: Foundation._plugins.accordion || null
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
// Window exports
|
|
261
|
+
Foundation.plugin(ResponsiveAccordionTabs, 'ResponsiveAccordionTabs');
|
|
262
|
+
}(jQuery);
|