foundation-rails 5.0.1.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/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/app/controllers/foundation/rails/styleguide_controller.rb +10 -0
- data/app/views/foundation/rails/styleguide/show.html.erb +134 -0
- data/config/routes.rb +3 -0
- data/foundation-rails.gemspec +25 -0
- data/lib/foundation-rails.rb +1 -0
- data/lib/foundation/rails.rb +3 -0
- data/lib/foundation/rails/engine.rb +7 -0
- data/lib/foundation/rails/generators/install_generator.rb +56 -0
- data/lib/foundation/rails/templates/application.html.erb +19 -0
- data/lib/foundation/rails/templates/application.html.haml +18 -0
- data/lib/foundation/rails/templates/application.html.slim +17 -0
- data/lib/foundation/rails/version.rb +5 -0
- data/test/dummy/.gitignore +16 -0
- data/test/dummy/Gemfile +47 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/.keep +0 -0
- data/test/dummy/app/assets/javascripts/application.js +8 -0
- data/test/dummy/app/assets/stylesheets/application.css +4 -0
- data/test/dummy/app/assets/stylesheets/foundation_and_overrides.scss +4 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/concerns/.keep +0 -0
- data/test/dummy/app/controllers/styleguide_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/helpers/styleguide_helper.rb +2 -0
- data/test/dummy/app/mailers/.keep +0 -0
- data/test/dummy/app/models/.keep +0 -0
- data/test/dummy/app/models/concerns/.keep +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +19 -0
- data/test/dummy/app/views/styleguide/show.html.erb +109 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +4 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +29 -0
- data/test/dummy/config/environments/production.rb +80 -0
- data/test/dummy/config/environments/test.rb +36 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +3 -0
- data/test/dummy/db/seeds.rb +7 -0
- data/test/dummy/lib/assets/.keep +0 -0
- data/test/dummy/lib/tasks/.keep +0 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/public/404.html +58 -0
- data/test/dummy/public/422.html +58 -0
- data/test/dummy/public/500.html +57 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/robots.txt +5 -0
- data/test/dummy/test/controllers/.keep +0 -0
- data/test/dummy/test/controllers/styleguide_controller_test.rb +9 -0
- data/test/dummy/test/fixtures/.keep +0 -0
- data/test/dummy/test/helpers/.keep +0 -0
- data/test/dummy/test/helpers/styleguide_helper_test.rb +4 -0
- data/test/dummy/test/integration/.keep +0 -0
- data/test/dummy/test/mailers/.keep +0 -0
- data/test/dummy/test/models/.keep +0 -0
- data/test/dummy/test/test_helper.rb +15 -0
- data/test/dummy/vendor/assets/javascripts/.keep +0 -0
- data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
- data/vendor/_settings.scss +992 -0
- data/vendor/assets/javascripts/foundation.js +15 -0
- data/vendor/assets/javascripts/foundation/foundation.abide.js +201 -0
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +41 -0
- data/vendor/assets/javascripts/foundation/foundation.alert.js +34 -0
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +450 -0
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +184 -0
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +304 -0
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +839 -0
- data/vendor/assets/javascripts/foundation/foundation.js +416 -0
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +118 -0
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +434 -0
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +347 -0
- data/vendor/assets/javascripts/foundation/foundation.tab.js +37 -0
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +202 -0
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +380 -0
- data/vendor/assets/javascripts/vendor/modernizr.js +4 -0
- data/vendor/assets/stylesheets/foundation.scss +38 -0
- data/vendor/assets/stylesheets/foundation/_functions.scss +75 -0
- data/vendor/assets/stylesheets/foundation/_settings.scss +992 -0
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +49 -0
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +113 -0
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +83 -0
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +123 -0
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +97 -0
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +234 -0
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +233 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +125 -0
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +159 -0
- data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +47 -0
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +472 -0
- data/vendor/assets/stylesheets/foundation/components/_functions.scss +70 -0
- data/vendor/assets/stylesheets/foundation/components/_global.scss +387 -0
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +234 -0
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +52 -0
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +220 -0
- data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +57 -0
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +100 -0
- data/vendor/assets/stylesheets/foundation/components/_magellan.scss +30 -0
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +360 -0
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +353 -0
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +145 -0
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +87 -0
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +146 -0
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +75 -0
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +165 -0
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +83 -0
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +187 -0
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +118 -0
- data/vendor/assets/stylesheets/foundation/components/_switch.scss +314 -0
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +93 -0
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +95 -0
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +71 -0
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +121 -0
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +590 -0
- data/vendor/assets/stylesheets/foundation/components/_type.scss +447 -0
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +661 -0
- data/vendor/assets/stylesheets/normalize.scss +410 -0
- metadata +292 -0
@@ -0,0 +1,380 @@
|
|
1
|
+
;(function ($, window, document, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
Foundation.libs.topbar = {
|
5
|
+
name : 'topbar',
|
6
|
+
|
7
|
+
version: '5.0.1',
|
8
|
+
|
9
|
+
settings : {
|
10
|
+
index : 0,
|
11
|
+
sticky_class : 'sticky',
|
12
|
+
custom_back_text: true,
|
13
|
+
back_text: 'Back',
|
14
|
+
is_hover: true,
|
15
|
+
mobile_show_parent_link: false,
|
16
|
+
scrolltop : true // jump to top when sticky nav menu toggle is clicked
|
17
|
+
},
|
18
|
+
|
19
|
+
init : function (section, method, options) {
|
20
|
+
Foundation.inherit(this, 'addCustomRule register_media throttle');
|
21
|
+
var self = this;
|
22
|
+
|
23
|
+
self.register_media('topbar', 'foundation-mq-topbar');
|
24
|
+
|
25
|
+
this.bindings(method, options);
|
26
|
+
|
27
|
+
$('[data-topbar]', this.scope).each(function () {
|
28
|
+
var topbar = $(this),
|
29
|
+
settings = topbar.data('topbar-init'),
|
30
|
+
section = $('section', this),
|
31
|
+
titlebar = $('> ul', this).first();
|
32
|
+
|
33
|
+
topbar.data('index', 0);
|
34
|
+
|
35
|
+
var topbarContainer = topbar.parent();
|
36
|
+
if(topbarContainer.hasClass('fixed') || topbarContainer.hasClass(settings.sticky_class)) {
|
37
|
+
self.settings.sticky_class = settings.sticky_class;
|
38
|
+
self.settings.stick_topbar = topbar;
|
39
|
+
topbar.data('height', topbarContainer.outerHeight());
|
40
|
+
topbar.data('stickyoffset', topbarContainer.offset().top);
|
41
|
+
} else {
|
42
|
+
topbar.data('height', topbar.outerHeight());
|
43
|
+
}
|
44
|
+
|
45
|
+
if (!settings.assembled) self.assemble(topbar);
|
46
|
+
|
47
|
+
if (settings.is_hover) {
|
48
|
+
$('.has-dropdown', topbar).addClass('not-click');
|
49
|
+
} else {
|
50
|
+
$('.has-dropdown', topbar).removeClass('not-click');
|
51
|
+
}
|
52
|
+
|
53
|
+
// Pad body when sticky (scrolled) or fixed.
|
54
|
+
self.addCustomRule('.f-topbar-fixed { padding-top: ' + topbar.data('height') + 'px }');
|
55
|
+
|
56
|
+
if (topbarContainer.hasClass('fixed')) {
|
57
|
+
$('body').addClass('f-topbar-fixed');
|
58
|
+
}
|
59
|
+
});
|
60
|
+
|
61
|
+
},
|
62
|
+
|
63
|
+
toggle: function (toggleEl) {
|
64
|
+
var self = this;
|
65
|
+
|
66
|
+
if (toggleEl) {
|
67
|
+
var topbar = $(toggleEl).closest('[data-topbar]');
|
68
|
+
} else {
|
69
|
+
var topbar = $('[data-topbar]');
|
70
|
+
}
|
71
|
+
|
72
|
+
var settings = topbar.data('topbar-init');
|
73
|
+
|
74
|
+
var section = $('section, .section', topbar);
|
75
|
+
|
76
|
+
if (self.breakpoint()) {
|
77
|
+
if (!self.rtl) {
|
78
|
+
section.css({left: '0%'});
|
79
|
+
$('>.name', section).css({left: '100%'});
|
80
|
+
} else {
|
81
|
+
section.css({right: '0%'});
|
82
|
+
$('>.name', section).css({right: '100%'});
|
83
|
+
}
|
84
|
+
|
85
|
+
$('li.moved', section).removeClass('moved');
|
86
|
+
topbar.data('index', 0);
|
87
|
+
|
88
|
+
topbar
|
89
|
+
.toggleClass('expanded')
|
90
|
+
.css('height', '');
|
91
|
+
}
|
92
|
+
|
93
|
+
if (settings.scrolltop) {
|
94
|
+
if (!topbar.hasClass('expanded')) {
|
95
|
+
if (topbar.hasClass('fixed')) {
|
96
|
+
topbar.parent().addClass('fixed');
|
97
|
+
topbar.removeClass('fixed');
|
98
|
+
$('body').addClass('f-topbar-fixed');
|
99
|
+
}
|
100
|
+
} else if (topbar.parent().hasClass('fixed')) {
|
101
|
+
if (settings.scrolltop) {
|
102
|
+
topbar.parent().removeClass('fixed');
|
103
|
+
topbar.addClass('fixed');
|
104
|
+
$('body').removeClass('f-topbar-fixed');
|
105
|
+
|
106
|
+
window.scrollTo(0,0);
|
107
|
+
} else {
|
108
|
+
topbar.parent().removeClass('expanded');
|
109
|
+
}
|
110
|
+
}
|
111
|
+
} else {
|
112
|
+
if(topbar.parent().hasClass(self.settings.sticky_class)) {
|
113
|
+
topbar.parent().addClass('fixed');
|
114
|
+
}
|
115
|
+
|
116
|
+
if(topbar.parent().hasClass('fixed')) {
|
117
|
+
if (!topbar.hasClass('expanded')) {
|
118
|
+
topbar.removeClass('fixed');
|
119
|
+
topbar.parent().removeClass('expanded');
|
120
|
+
self.update_sticky_positioning();
|
121
|
+
} else {
|
122
|
+
topbar.addClass('fixed');
|
123
|
+
topbar.parent().addClass('expanded');
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
},
|
128
|
+
|
129
|
+
timer : null,
|
130
|
+
|
131
|
+
events : function (bar) {
|
132
|
+
var self = this;
|
133
|
+
$(this.scope)
|
134
|
+
.off('.topbar')
|
135
|
+
.on('click.fndtn.topbar', '[data-topbar] .toggle-topbar', function (e) {
|
136
|
+
e.preventDefault();
|
137
|
+
self.toggle(this);
|
138
|
+
})
|
139
|
+
.on('click.fndtn.topbar', '[data-topbar] li.has-dropdown', function (e) {
|
140
|
+
var li = $(this),
|
141
|
+
target = $(e.target),
|
142
|
+
topbar = li.closest('[data-topbar]'),
|
143
|
+
settings = topbar.data('topbar-init');
|
144
|
+
|
145
|
+
if(target.data('revealId')) {
|
146
|
+
self.toggle();
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
|
150
|
+
if (self.breakpoint()) return;
|
151
|
+
if (settings.is_hover && !Modernizr.touch) return;
|
152
|
+
|
153
|
+
e.stopImmediatePropagation();
|
154
|
+
|
155
|
+
if (li.hasClass('hover')) {
|
156
|
+
li
|
157
|
+
.removeClass('hover')
|
158
|
+
.find('li')
|
159
|
+
.removeClass('hover');
|
160
|
+
|
161
|
+
li.parents('li.hover')
|
162
|
+
.removeClass('hover');
|
163
|
+
} else {
|
164
|
+
li.addClass('hover');
|
165
|
+
|
166
|
+
if (target[0].nodeName === 'A' && target.parent().hasClass('has-dropdown')) {
|
167
|
+
e.preventDefault();
|
168
|
+
}
|
169
|
+
}
|
170
|
+
})
|
171
|
+
.on('click.fndtn.topbar', '[data-topbar] .has-dropdown>a', function (e) {
|
172
|
+
if (self.breakpoint()) {
|
173
|
+
|
174
|
+
e.preventDefault();
|
175
|
+
|
176
|
+
var $this = $(this),
|
177
|
+
topbar = $this.closest('[data-topbar]'),
|
178
|
+
section = topbar.find('section, .section'),
|
179
|
+
dropdownHeight = $this.next('.dropdown').outerHeight(),
|
180
|
+
$selectedLi = $this.closest('li');
|
181
|
+
|
182
|
+
topbar.data('index', topbar.data('index') + 1);
|
183
|
+
$selectedLi.addClass('moved');
|
184
|
+
|
185
|
+
if (!self.rtl) {
|
186
|
+
section.css({left: -(100 * topbar.data('index')) + '%'});
|
187
|
+
section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
|
188
|
+
} else {
|
189
|
+
section.css({right: -(100 * topbar.data('index')) + '%'});
|
190
|
+
section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
|
191
|
+
}
|
192
|
+
|
193
|
+
topbar.css('height', $this.siblings('ul').outerHeight(true) + topbar.data('height'));
|
194
|
+
}
|
195
|
+
});
|
196
|
+
|
197
|
+
$(window).off('.topbar').on('resize.fndtn.topbar', self.throttle(function () {
|
198
|
+
self.resize.call(self);
|
199
|
+
}, 50)).trigger('resize');
|
200
|
+
|
201
|
+
$('body').off('.topbar').on('click.fndtn.topbar touchstart.fndtn.topbar', function (e) {
|
202
|
+
var parent = $(e.target).closest('li').closest('li.hover');
|
203
|
+
|
204
|
+
if (parent.length > 0) {
|
205
|
+
return;
|
206
|
+
}
|
207
|
+
|
208
|
+
$('[data-topbar] li').removeClass('hover');
|
209
|
+
});
|
210
|
+
|
211
|
+
// Go up a level on Click
|
212
|
+
$(this.scope).on('click.fndtn.topbar', '[data-topbar] .has-dropdown .back', function (e) {
|
213
|
+
e.preventDefault();
|
214
|
+
|
215
|
+
var $this = $(this),
|
216
|
+
topbar = $this.closest('[data-topbar]'),
|
217
|
+
section = topbar.find('section, .section'),
|
218
|
+
settings = topbar.data('topbar-init'),
|
219
|
+
$movedLi = $this.closest('li.moved'),
|
220
|
+
$previousLevelUl = $movedLi.parent();
|
221
|
+
|
222
|
+
topbar.data('index', topbar.data('index') - 1);
|
223
|
+
|
224
|
+
if (!self.rtl) {
|
225
|
+
section.css({left: -(100 * topbar.data('index')) + '%'});
|
226
|
+
section.find('>.name').css({left: 100 * topbar.data('index') + '%'});
|
227
|
+
} else {
|
228
|
+
section.css({right: -(100 * topbar.data('index')) + '%'});
|
229
|
+
section.find('>.name').css({right: 100 * topbar.data('index') + '%'});
|
230
|
+
}
|
231
|
+
|
232
|
+
if (topbar.data('index') === 0) {
|
233
|
+
topbar.css('height', '');
|
234
|
+
} else {
|
235
|
+
topbar.css('height', $previousLevelUl.outerHeight(true) + topbar.data('height'));
|
236
|
+
}
|
237
|
+
|
238
|
+
setTimeout(function () {
|
239
|
+
$movedLi.removeClass('moved');
|
240
|
+
}, 300);
|
241
|
+
});
|
242
|
+
},
|
243
|
+
|
244
|
+
resize : function () {
|
245
|
+
var self = this;
|
246
|
+
$('[data-topbar]').each(function () {
|
247
|
+
var topbar = $(this),
|
248
|
+
settings = topbar.data('topbar-init');
|
249
|
+
|
250
|
+
var stickyContainer = topbar.parent('.' + self.settings.sticky_class);
|
251
|
+
var stickyOffset;
|
252
|
+
|
253
|
+
if (!self.breakpoint()) {
|
254
|
+
var doToggle = topbar.hasClass('expanded');
|
255
|
+
topbar
|
256
|
+
.css('height', '')
|
257
|
+
.removeClass('expanded')
|
258
|
+
.find('li')
|
259
|
+
.removeClass('hover');
|
260
|
+
|
261
|
+
if(doToggle) {
|
262
|
+
self.toggle(topbar);
|
263
|
+
}
|
264
|
+
}
|
265
|
+
|
266
|
+
if(stickyContainer.length > 0) {
|
267
|
+
if(stickyContainer.hasClass('fixed')) {
|
268
|
+
// Remove the fixed to allow for correct calculation of the offset.
|
269
|
+
stickyContainer.removeClass('fixed');
|
270
|
+
|
271
|
+
stickyOffset = stickyContainer.offset().top;
|
272
|
+
if($(document.body).hasClass('f-topbar-fixed')) {
|
273
|
+
stickyOffset -= topbar.data('height');
|
274
|
+
}
|
275
|
+
|
276
|
+
topbar.data('stickyoffset', stickyOffset);
|
277
|
+
stickyContainer.addClass('fixed');
|
278
|
+
} else {
|
279
|
+
stickyOffset = stickyContainer.offset().top;
|
280
|
+
topbar.data('stickyoffset', stickyOffset);
|
281
|
+
}
|
282
|
+
}
|
283
|
+
|
284
|
+
});
|
285
|
+
},
|
286
|
+
|
287
|
+
breakpoint : function () {
|
288
|
+
return !matchMedia(Foundation.media_queries['topbar']).matches;
|
289
|
+
},
|
290
|
+
|
291
|
+
assemble : function (topbar) {
|
292
|
+
var self = this,
|
293
|
+
settings = topbar.data('topbar-init'),
|
294
|
+
section = $('section', topbar),
|
295
|
+
titlebar = $('> ul', topbar).first();
|
296
|
+
|
297
|
+
// Pull element out of the DOM for manipulation
|
298
|
+
section.detach();
|
299
|
+
|
300
|
+
$('.has-dropdown>a', section).each(function () {
|
301
|
+
var $link = $(this),
|
302
|
+
$dropdown = $link.siblings('.dropdown'),
|
303
|
+
url = $link.attr('href');
|
304
|
+
|
305
|
+
if (settings.mobile_show_parent_link && url && url.length > 1) {
|
306
|
+
var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li><li><a class="parent-link js-generated" href="' + url + '">' + $link.text() +'</a></li>');
|
307
|
+
} else {
|
308
|
+
var $titleLi = $('<li class="title back js-generated"><h5><a href="#"></a></h5></li>');
|
309
|
+
}
|
310
|
+
|
311
|
+
// Copy link to subnav
|
312
|
+
if (settings.custom_back_text == true) {
|
313
|
+
$('h5>a', $titleLi).html(settings.back_text);
|
314
|
+
} else {
|
315
|
+
$('h5>a', $titleLi).html('« ' + $link.html());
|
316
|
+
}
|
317
|
+
$dropdown.prepend($titleLi);
|
318
|
+
});
|
319
|
+
|
320
|
+
// Put element back in the DOM
|
321
|
+
section.appendTo(topbar);
|
322
|
+
|
323
|
+
// check for sticky
|
324
|
+
this.sticky();
|
325
|
+
|
326
|
+
this.assembled(topbar);
|
327
|
+
},
|
328
|
+
|
329
|
+
assembled : function (topbar) {
|
330
|
+
topbar.data('topbar-init', $.extend({}, topbar.data('topbar-init'), {assembled: true}));
|
331
|
+
},
|
332
|
+
|
333
|
+
height : function (ul) {
|
334
|
+
var total = 0,
|
335
|
+
self = this;
|
336
|
+
|
337
|
+
$('> li', ul).each(function () { total += $(this).outerHeight(true); });
|
338
|
+
|
339
|
+
return total;
|
340
|
+
},
|
341
|
+
|
342
|
+
sticky : function () {
|
343
|
+
var $window = $(window),
|
344
|
+
self = this;
|
345
|
+
|
346
|
+
$(window).on('scroll', function() {
|
347
|
+
self.update_sticky_positioning();
|
348
|
+
});
|
349
|
+
},
|
350
|
+
|
351
|
+
update_sticky_positioning: function() {
|
352
|
+
var klass = '.' + this.settings.sticky_class;
|
353
|
+
var $window = $(window);
|
354
|
+
|
355
|
+
if ($(klass).length > 0) {
|
356
|
+
var distance = this.settings.sticky_topbar.data('stickyoffset');
|
357
|
+
if (!$(klass).hasClass('expanded')) {
|
358
|
+
if ($window.scrollTop() > (distance)) {
|
359
|
+
if (!$(klass).hasClass('fixed')) {
|
360
|
+
$(klass).addClass('fixed');
|
361
|
+
$('body').addClass('f-topbar-fixed');
|
362
|
+
}
|
363
|
+
} else if ($window.scrollTop() <= distance) {
|
364
|
+
if ($(klass).hasClass('fixed')) {
|
365
|
+
$(klass).removeClass('fixed');
|
366
|
+
$('body').removeClass('f-topbar-fixed');
|
367
|
+
}
|
368
|
+
}
|
369
|
+
}
|
370
|
+
}
|
371
|
+
},
|
372
|
+
|
373
|
+
off : function () {
|
374
|
+
$(this.scope).off('.fndtn.topbar');
|
375
|
+
$(window).off('.fndtn.topbar');
|
376
|
+
},
|
377
|
+
|
378
|
+
reflow : function () {}
|
379
|
+
};
|
380
|
+
}(jQuery, this, this.document));
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Modernizr 2.6.2 (Custom Build) | MIT & BSD
|
2
|
+
* Build: http://modernizr.com/download/#-inlinesvg-svg-svgclippaths-touch-shiv-mq-cssclasses-teststyles-prefixes-ie8compat-load
|
3
|
+
*/
|
4
|
+
;window.Modernizr=function(a,b,c){function y(a){j.cssText=a}function z(a,b){return y(m.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}var d="2.6.2",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={svg:"http://www.w3.org/2000/svg"},o={},p={},q={},r=[],s=r.slice,t,u=function(a,c,d,e){var f,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:h+(d+1),l.appendChild(j);return f=["­",'<style id="s',h,'">',a,"</style>"].join(""),l.id=h,(m?l:n).innerHTML+=f,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=g.style.overflow,g.style.overflow="hidden",g.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),g.style.overflow=k),!!i},v=function(b){var c=a.matchMedia||a.msMatchMedia;if(c)return c(b).matches;var d;return u("@media "+b+" { #"+h+" { position: absolute; } }",function(b){d=(a.getComputedStyle?getComputedStyle(b,null):b.currentStyle)["position"]=="absolute"}),d},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=s.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(s.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(s.call(arguments)))};return e}),o.touch=function(){var c;return"ontouchstart"in a||a.DocumentTouch&&b instanceof DocumentTouch?c=!0:u(["@media (",m.join("touch-enabled),("),h,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(a){c=a.offsetTop===9}),c},o.svg=function(){return!!b.createElementNS&&!!b.createElementNS(n.svg,"svg").createSVGRect},o.inlinesvg=function(){var a=b.createElement("div");return a.innerHTML="<svg/>",(a.firstChild&&a.firstChild.namespaceURI)==n.svg},o.svgclippaths=function(){return!!b.createElementNS&&/SVGClipPath/.test(l.call(b.createElementNS(n.svg,"clipPath")))};for(var D in o)x(o,D)&&(t=D.toLowerCase(),e[t]=o[D](),r.push((e[t]?"":"no-")+t));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof f!="undefined"&&f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.mq=v,e.testStyles=u,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+r.join(" "):""),e}(this,this.document),function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i<a.length;i++)j=a[i],e(j)?g(j,0,l,0):w(j)?B(j):Object(j)===j&&h(j,l);else Object(a)===a&&h(a,l)},B.addPrefix=function(a,b){z[a]=b},B.addFilter=function(a){x.push(a)},B.errorTimeout=1e4,null==b.readyState&&b.addEventListener&&(b.readyState="loading",b.addEventListener("DOMContentLoaded",A=function(){b.removeEventListener("DOMContentLoaded",A,0),b.readyState="complete"},0)),a.yepnope=k(),a.yepnope.executeStack=h,a.yepnope.injectJs=function(a,c,d,e,i,j){var k=b.createElement("script"),l,o,e=e||B.errorTimeout;k.src=a;for(o in d)k.setAttribute(o,d[o]);c=j?h:c||f,k.onreadystatechange=k.onload=function(){!l&&g(k.readyState)&&(l=1,c(),k.onload=k.onreadystatechange=null)},m(function(){l||(l=1,c(1))},e),i?k.onload():n.parentNode.insertBefore(k,n)},a.yepnope.injectCss=function(a,c,d,e,g,i){var e=b.createElement("link"),j,c=i?h:c||f;e.href=a,e.rel="stylesheet",e.type="text/css";for(j in d)e.setAttribute(j,d[j]);g||(n.parentNode.insertBefore(e,n),m(c,0))}}(this,document),Modernizr.load=function(){yepnope.apply(window,[].slice.call(arguments,0))},Modernizr.addTest("ie8compat",function(){return!window.addEventListener&&document.documentMode&&document.documentMode===7});
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// Make sure the charset is set appropriately
|
2
|
+
@charset "UTF-8";
|
3
|
+
|
4
|
+
// Behold, here are all the Foundation components.
|
5
|
+
@import
|
6
|
+
"foundation/components/accordion",
|
7
|
+
"foundation/components/alert-boxes",
|
8
|
+
"foundation/components/block-grid",
|
9
|
+
"foundation/components/breadcrumbs",
|
10
|
+
"foundation/components/button-groups",
|
11
|
+
"foundation/components/buttons",
|
12
|
+
"foundation/components/clearing",
|
13
|
+
"foundation/components/dropdown",
|
14
|
+
"foundation/components/dropdown-buttons",
|
15
|
+
"foundation/components/flex-video",
|
16
|
+
"foundation/components/forms",
|
17
|
+
"foundation/components/grid",
|
18
|
+
"foundation/components/inline-lists",
|
19
|
+
"foundation/components/joyride",
|
20
|
+
"foundation/components/keystrokes",
|
21
|
+
"foundation/components/labels",
|
22
|
+
"foundation/components/magellan",
|
23
|
+
"foundation/components/orbit",
|
24
|
+
"foundation/components/pagination",
|
25
|
+
"foundation/components/panels",
|
26
|
+
"foundation/components/pricing-tables",
|
27
|
+
"foundation/components/progress-bars",
|
28
|
+
"foundation/components/reveal",
|
29
|
+
"foundation/components/side-nav",
|
30
|
+
"foundation/components/split-buttons",
|
31
|
+
"foundation/components/sub-nav",
|
32
|
+
"foundation/components/switch",
|
33
|
+
"foundation/components/tables",
|
34
|
+
"foundation/components/tabs",
|
35
|
+
"foundation/components/thumbs",
|
36
|
+
"foundation/components/tooltips",
|
37
|
+
"foundation/components/offcanvas",
|
38
|
+
"foundation/components/visibility";
|
@@ -0,0 +1,75 @@
|
|
1
|
+
$modules: () !default;
|
2
|
+
@mixin exports($name) {
|
3
|
+
@if (index($modules, $name) == false) {
|
4
|
+
$modules: append($modules, $name);
|
5
|
+
@content;
|
6
|
+
}
|
7
|
+
}
|
8
|
+
|
9
|
+
//
|
10
|
+
// @functions
|
11
|
+
//
|
12
|
+
|
13
|
+
@function lower-bound($range){
|
14
|
+
@if length($range) <= 0 {
|
15
|
+
@return 0;
|
16
|
+
}
|
17
|
+
@return nth($range,1);
|
18
|
+
}
|
19
|
+
|
20
|
+
@function upper-bound($range) {
|
21
|
+
@if length($range) < 2 {
|
22
|
+
@return 999999999999;
|
23
|
+
}
|
24
|
+
@return nth($range, 2);
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
// It strips the unit of measure and returns it
|
29
|
+
@function strip-unit($num) {
|
30
|
+
@return $num / ($num * 0 + 1);
|
31
|
+
}
|
32
|
+
|
33
|
+
// New Syntax, allows to optionally calculate on a different base value to counter compounding effect of rem's.
|
34
|
+
// Call with 1, 2, 3 or 4 parameters, 'px' is not required but supported
|
35
|
+
// rem-calc(10 20 30px 40);
|
36
|
+
// Space delimited, if you want to delimit using comma's, wrap it in another pair of brackets
|
37
|
+
// rem-calc((10, 20, 30, 40px));
|
38
|
+
// Optionally call with a different base (eg: 8px) to calculate rem.
|
39
|
+
// rem-calc(16px 32px 48px, 8px);
|
40
|
+
// If you require to comma separate your list
|
41
|
+
// rem-calc((16px, 32px, 48), 8px);
|
42
|
+
|
43
|
+
@function convert-to-rem($value, $base-value: $rem-base) {
|
44
|
+
$value: strip-unit($value) / strip-unit($base-value) * 1rem;
|
45
|
+
@if ($value == 0rem) { $value: 0; } // Turn 0rem into 0
|
46
|
+
@return $value;
|
47
|
+
}
|
48
|
+
|
49
|
+
@function rem-calc($values, $base-value: $rem-base) {
|
50
|
+
$max: length($values);
|
51
|
+
|
52
|
+
@if $max == 1 { @return convert-to-rem(nth($values, 1), $base-value); }
|
53
|
+
|
54
|
+
$remValues: ();
|
55
|
+
@for $i from 1 through $max {
|
56
|
+
$remValues: append($remValues, convert-to-rem(nth($values, $i), $base-value));
|
57
|
+
}
|
58
|
+
@return $remValues;
|
59
|
+
}
|
60
|
+
|
61
|
+
// Deprecated: We'll drop support for this in 5.1.0, use rem-calc()
|
62
|
+
@function emCalc($values){
|
63
|
+
@return rem-calc($values);
|
64
|
+
}
|
65
|
+
|
66
|
+
// Deprecated: We'll drop support for this in 5.1.0, use rem-calc()
|
67
|
+
@function em-calc($values){
|
68
|
+
@return rem-calc($values);
|
69
|
+
}
|
70
|
+
|
71
|
+
// Maybe you want to create rems with pixels
|
72
|
+
// $rem-base: 0.625 !default; //Set the value corresponding to body font size. In this case, you should set as: body {font-size: 62.5%;}
|
73
|
+
// @function remCalc($pxWidth) {
|
74
|
+
// @return $pxWidth / $rem-base * 1rem;
|
75
|
+
// }
|