zurb-foundation-5 5.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.bowerrc +3 -0
- data/.editorconfig +9 -0
- data/.gitignore +46 -0
- data/.travis.yml +34 -0
- data/CONTRIBUTING.md +55 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +16 -0
- data/Gruntfile.js +222 -0
- data/LICENSE +22 -0
- data/README.md +44 -0
- data/bower.json +20 -0
- data/composer.json +9 -0
- data/foundation.gemspec +21 -0
- data/humans.txt +8 -0
- data/js/foundation/foundation.abide.js +299 -0
- data/js/foundation/foundation.accordion.js +54 -0
- data/js/foundation/foundation.alert.js +43 -0
- data/js/foundation/foundation.clearing.js +531 -0
- data/js/foundation/foundation.dropdown.js +306 -0
- data/js/foundation/foundation.equalizer.js +68 -0
- data/js/foundation/foundation.interchange.js +331 -0
- data/js/foundation/foundation.joyride.js +849 -0
- data/js/foundation/foundation.js +609 -0
- data/js/foundation/foundation.magellan.js +173 -0
- data/js/foundation/foundation.offcanvas.js +50 -0
- data/js/foundation/foundation.orbit.js +606 -0
- data/js/foundation/foundation.reveal.js +427 -0
- data/js/foundation/foundation.slider.js +200 -0
- data/js/foundation/foundation.tab.js +168 -0
- data/js/foundation/foundation.tooltip.js +272 -0
- data/js/foundation/foundation.topbar.js +422 -0
- data/karma.conf.js +114 -0
- data/lib/foundation/engine.rb +20 -0
- data/lib/foundation/generators/USAGE +15 -0
- data/lib/foundation/generators/install_generator.rb +54 -0
- data/lib/foundation/generators/templates/application.html.erb +47 -0
- data/lib/foundation/generators/templates/application.html.haml +31 -0
- data/lib/foundation/generators/templates/application.html.slim +35 -0
- data/lib/foundation/sprockets.rb +4 -0
- data/lib/foundation/version.rb +3 -0
- data/lib/scss.js +114 -0
- data/lib/zurb-foundation.rb +33 -0
- data/package.json +48 -0
- data/robots.txt +4 -0
- data/run-tests.sh +83 -0
- data/sache.json +5 -0
- data/scss/foundation.scss +45 -0
- data/scss/foundation/_functions.scss +101 -0
- data/scss/foundation/_settings.scss +1279 -0
- data/scss/foundation/components/_accordion.scss +52 -0
- data/scss/foundation/components/_alert-boxes.scss +126 -0
- data/scss/foundation/components/_block-grid.scss +132 -0
- data/scss/foundation/components/_breadcrumbs.scss +127 -0
- data/scss/foundation/components/_button-groups.scss +108 -0
- data/scss/foundation/components/_buttons.scss +222 -0
- data/scss/foundation/components/_clearing.scss +247 -0
- data/scss/foundation/components/_dropdown-buttons.scss +129 -0
- data/scss/foundation/components/_dropdown.scss +248 -0
- data/scss/foundation/components/_flex-video.scss +51 -0
- data/scss/foundation/components/_forms.scss +496 -0
- data/scss/foundation/components/_global.scss +365 -0
- data/scss/foundation/components/_grid.scss +261 -0
- data/scss/foundation/components/_inline-lists.scss +56 -0
- data/scss/foundation/components/_joyride.scss +220 -0
- data/scss/foundation/components/_keystrokes.scss +61 -0
- data/scss/foundation/components/_labels.scss +104 -0
- data/scss/foundation/components/_magellan.scss +34 -0
- data/scss/foundation/components/_offcanvas.scss +381 -0
- data/scss/foundation/components/_orbit.scss +415 -0
- data/scss/foundation/components/_pagination.scss +150 -0
- data/scss/foundation/components/_panels.scss +91 -0
- data/scss/foundation/components/_pricing-tables.scss +150 -0
- data/scss/foundation/components/_progress-bars.scss +79 -0
- data/scss/foundation/components/_range-slider.scss +148 -0
- data/scss/foundation/components/_reveal-new.scss +0 -0
- data/scss/foundation/components/_reveal.scss +216 -0
- data/scss/foundation/components/_side-nav.scss +93 -0
- data/scss/foundation/components/_split-buttons.scss +191 -0
- data/scss/foundation/components/_sub-nav.scss +125 -0
- data/scss/foundation/components/_switch.scss +294 -0
- data/scss/foundation/components/_tables.scss +97 -0
- data/scss/foundation/components/_tabs.scss +105 -0
- data/scss/foundation/components/_thumbs.scss +68 -0
- data/scss/foundation/components/_tooltips.scss +140 -0
- data/scss/foundation/components/_top-bar.scss +640 -0
- data/scss/foundation/components/_type.scss +493 -0
- data/scss/foundation/components/_visibility.scss +345 -0
- data/scss/foundation/test.html +0 -0
- data/scss/normalize.scss +423 -0
- data/spec/abide/abide.js +173 -0
- data/spec/abide/advanced.html +22 -0
- data/spec/abide/basic.html +13 -0
- data/spec/accordion/accordion.js +94 -0
- data/spec/accordion/basic.html +39 -0
- data/spec/accordion/grid.html +44 -0
- data/spec/accordion/multiexpand.html +20 -0
- data/spec/alert/alert.js +35 -0
- data/spec/alert/basic.html +4 -0
- data/spec/clearing/222.gif +0 -0
- data/spec/clearing/777.gif +0 -0
- data/spec/clearing/basic.html +5 -0
- data/spec/clearing/ccc.gif +0 -0
- data/spec/clearing/clearing.js +55 -0
- data/spec/dropdown/basic.html +10 -0
- data/spec/dropdown/dropdown.js +65 -0
- data/spec/equalizer/basic.html +24 -0
- data/spec/equalizer/equalizer.js +30 -0
- data/spec/framework/framework.js +14 -0
- data/spec/helpers.js +37 -0
- data/spec/interchange/basic.html +3 -0
- data/spec/interchange/interchange.js +60 -0
- data/spec/joyride/joyride.js +14 -0
- data/spec/magellan/magellan.js +14 -0
- data/spec/offcanvas/offcanvas.js +14 -0
- data/spec/orbit/orbit.js +14 -0
- data/spec/reveal/reveal.js +14 -0
- data/spec/tab/tab.js +14 -0
- data/spec/tooltip/tooltip.js +14 -0
- data/spec/topbar/multidropdown.html +60 -0
- data/spec/topbar/sticky.html +31 -0
- data/spec/topbar/topbar.js +96 -0
- metadata +238 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
<h1>Sticky Topbar</h1>
|
2
|
+
<div class="contain-to-grid sticky">
|
3
|
+
<nav class="top-bar" data-topbar>
|
4
|
+
<ul class="title-area">
|
5
|
+
<li class="name">
|
6
|
+
<h1><a href="#">My Site</a></h1>
|
7
|
+
</li>
|
8
|
+
</ul>
|
9
|
+
|
10
|
+
<section class="top-bar-section">
|
11
|
+
<!-- Right Nav Section -->
|
12
|
+
<ul class="right">
|
13
|
+
<li class="active"><a href="#">Right Nav Button Active</a></li>
|
14
|
+
<li class="has-dropdown">
|
15
|
+
<a href="#">Right Button with Dropdown</a>
|
16
|
+
<ul class="dropdown">
|
17
|
+
<li><a href="#">First link in dropdown</a></li>
|
18
|
+
</ul>
|
19
|
+
</li>
|
20
|
+
</ul>
|
21
|
+
|
22
|
+
<!-- Left Nav Section -->
|
23
|
+
<ul class="left">
|
24
|
+
<li><a href="#">Left Nav Button</a></li>
|
25
|
+
</ul>
|
26
|
+
</section>
|
27
|
+
</nav>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<div style="height: 2000px"></div>
|
31
|
+
<div id="bottom"></div>
|
@@ -0,0 +1,96 @@
|
|
1
|
+
describe('topbar:', function() {
|
2
|
+
beforeEach(function() {
|
3
|
+
this.addMatchers({
|
4
|
+
// Place topbar-specific matchers here...
|
5
|
+
});
|
6
|
+
|
7
|
+
var origFunc = $.fn.foundation;
|
8
|
+
spyOn($.fn, 'foundation').andCallFake(function() {
|
9
|
+
var result = origFunc.apply(this, arguments);
|
10
|
+
jasmine.Clock.tick(1000); // Let things settle...
|
11
|
+
return result;
|
12
|
+
});
|
13
|
+
});
|
14
|
+
|
15
|
+
describe('when above the topbar breakpoint', when('topbar', function() {
|
16
|
+
describe('sticky', function() {
|
17
|
+
beforeEach(function() {
|
18
|
+
document.body.innerHTML = __html__['spec/topbar/sticky.html'];
|
19
|
+
});
|
20
|
+
|
21
|
+
// Can't use this test right now because it fails in PhantomJS.
|
22
|
+
// I couldn't find a way to manipulate the scroll position that it would allow.
|
23
|
+
/*it('should become fixed when scrolled', function() {
|
24
|
+
$(document).foundation();
|
25
|
+
|
26
|
+
var settings = Foundation.libs.topbar.settings;
|
27
|
+
var sticky = $('.' + settings.sticky_class);
|
28
|
+
|
29
|
+
$(window).scrollTop(document.body.scrollHeight);
|
30
|
+
$(window).triggerHandler('scroll');
|
31
|
+
|
32
|
+
expect(sticky.hasClass('fixed')).toBe(true);
|
33
|
+
expect($('body').hasClass('f-topbar-fixed')).toBe(true);
|
34
|
+
});*/
|
35
|
+
});
|
36
|
+
|
37
|
+
describe('with multiple dropdowns with defaults', function() {
|
38
|
+
beforeEach(function() {
|
39
|
+
document.body.innerHTML = __html__['spec/topbar/multidropdown.html'];
|
40
|
+
});
|
41
|
+
|
42
|
+
it('should not have a toggle button', function() {
|
43
|
+
$(document).foundation();
|
44
|
+
|
45
|
+
var settings = Foundation.libs.topbar.settings;
|
46
|
+
var topbar = $('[data-topbar]');
|
47
|
+
var toggle = topbar.find('.toggle-topbar:hidden');
|
48
|
+
expect(toggle.length).toBe(1);
|
49
|
+
});
|
50
|
+
});
|
51
|
+
}));
|
52
|
+
|
53
|
+
describe('when below the topbar breakpoint', when_not('topbar', function () {
|
54
|
+
describe('multiple dropdowns with defaults', function() {
|
55
|
+
beforeEach(function() {
|
56
|
+
document.body.innerHTML = __html__['spec/topbar/multidropdown.html'];
|
57
|
+
});
|
58
|
+
|
59
|
+
it('should have a toggle button', function() {
|
60
|
+
$(document).foundation();
|
61
|
+
|
62
|
+
var settings = Foundation.libs.topbar.settings;
|
63
|
+
var topbar = $('[data-topbar]');
|
64
|
+
var toggle = topbar.find('.toggle-topbar:not(:hidden)');
|
65
|
+
expect(toggle.length).toBe(1);
|
66
|
+
});
|
67
|
+
|
68
|
+
it('should expand when the toggle is clicked', function() {
|
69
|
+
$(document).foundation();
|
70
|
+
|
71
|
+
var topbar = $('[data-topbar]');
|
72
|
+
var toggle = topbar.find('.toggle-topbar');
|
73
|
+
|
74
|
+
spyOn(Foundation.libs.topbar, 'toggle').andCallThrough();
|
75
|
+
|
76
|
+
toggle.click();
|
77
|
+
|
78
|
+
expect(Foundation.libs.topbar.toggle).toHaveBeenCalled();
|
79
|
+
expect(topbar.hasClass('expanded')).toBe(true);
|
80
|
+
});
|
81
|
+
|
82
|
+
it('should collapse after being expanded by the toggle', function() {
|
83
|
+
$(document).foundation();
|
84
|
+
|
85
|
+
var topbar = $('[data-topbar]');
|
86
|
+
var toggle = topbar.find('.toggle-topbar');
|
87
|
+
|
88
|
+
toggle.click();
|
89
|
+
toggle.click();
|
90
|
+
|
91
|
+
expect(topbar.hasClass('expanded')).toBe(false);
|
92
|
+
});
|
93
|
+
});
|
94
|
+
|
95
|
+
}));
|
96
|
+
});
|
metadata
ADDED
@@ -0,0 +1,238 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: zurb-foundation-5
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 5.2.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ZURB
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sass
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.2.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: jasmine
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: ZURB Foundation on Sass/Compass
|
56
|
+
email:
|
57
|
+
- foundation@zurb.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".bowerrc"
|
63
|
+
- ".editorconfig"
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- CONTRIBUTING.md
|
67
|
+
- Gemfile
|
68
|
+
- Gemfile.lock
|
69
|
+
- Gruntfile.js
|
70
|
+
- LICENSE
|
71
|
+
- README.md
|
72
|
+
- bower.json
|
73
|
+
- composer.json
|
74
|
+
- foundation.gemspec
|
75
|
+
- humans.txt
|
76
|
+
- js/foundation/foundation.abide.js
|
77
|
+
- js/foundation/foundation.accordion.js
|
78
|
+
- js/foundation/foundation.alert.js
|
79
|
+
- js/foundation/foundation.clearing.js
|
80
|
+
- js/foundation/foundation.dropdown.js
|
81
|
+
- js/foundation/foundation.equalizer.js
|
82
|
+
- js/foundation/foundation.interchange.js
|
83
|
+
- js/foundation/foundation.joyride.js
|
84
|
+
- js/foundation/foundation.js
|
85
|
+
- js/foundation/foundation.magellan.js
|
86
|
+
- js/foundation/foundation.offcanvas.js
|
87
|
+
- js/foundation/foundation.orbit.js
|
88
|
+
- js/foundation/foundation.reveal.js
|
89
|
+
- js/foundation/foundation.slider.js
|
90
|
+
- js/foundation/foundation.tab.js
|
91
|
+
- js/foundation/foundation.tooltip.js
|
92
|
+
- js/foundation/foundation.topbar.js
|
93
|
+
- karma.conf.js
|
94
|
+
- lib/foundation/engine.rb
|
95
|
+
- lib/foundation/generators/USAGE
|
96
|
+
- lib/foundation/generators/install_generator.rb
|
97
|
+
- lib/foundation/generators/templates/application.html.erb
|
98
|
+
- lib/foundation/generators/templates/application.html.haml
|
99
|
+
- lib/foundation/generators/templates/application.html.slim
|
100
|
+
- lib/foundation/sprockets.rb
|
101
|
+
- lib/foundation/version.rb
|
102
|
+
- lib/scss.js
|
103
|
+
- lib/zurb-foundation.rb
|
104
|
+
- package.json
|
105
|
+
- robots.txt
|
106
|
+
- run-tests.sh
|
107
|
+
- sache.json
|
108
|
+
- scss/foundation.scss
|
109
|
+
- scss/foundation/_functions.scss
|
110
|
+
- scss/foundation/_settings.scss
|
111
|
+
- scss/foundation/components/_accordion.scss
|
112
|
+
- scss/foundation/components/_alert-boxes.scss
|
113
|
+
- scss/foundation/components/_block-grid.scss
|
114
|
+
- scss/foundation/components/_breadcrumbs.scss
|
115
|
+
- scss/foundation/components/_button-groups.scss
|
116
|
+
- scss/foundation/components/_buttons.scss
|
117
|
+
- scss/foundation/components/_clearing.scss
|
118
|
+
- scss/foundation/components/_dropdown-buttons.scss
|
119
|
+
- scss/foundation/components/_dropdown.scss
|
120
|
+
- scss/foundation/components/_flex-video.scss
|
121
|
+
- scss/foundation/components/_forms.scss
|
122
|
+
- scss/foundation/components/_global.scss
|
123
|
+
- scss/foundation/components/_grid.scss
|
124
|
+
- scss/foundation/components/_inline-lists.scss
|
125
|
+
- scss/foundation/components/_joyride.scss
|
126
|
+
- scss/foundation/components/_keystrokes.scss
|
127
|
+
- scss/foundation/components/_labels.scss
|
128
|
+
- scss/foundation/components/_magellan.scss
|
129
|
+
- scss/foundation/components/_offcanvas.scss
|
130
|
+
- scss/foundation/components/_orbit.scss
|
131
|
+
- scss/foundation/components/_pagination.scss
|
132
|
+
- scss/foundation/components/_panels.scss
|
133
|
+
- scss/foundation/components/_pricing-tables.scss
|
134
|
+
- scss/foundation/components/_progress-bars.scss
|
135
|
+
- scss/foundation/components/_range-slider.scss
|
136
|
+
- scss/foundation/components/_reveal-new.scss
|
137
|
+
- scss/foundation/components/_reveal.scss
|
138
|
+
- scss/foundation/components/_side-nav.scss
|
139
|
+
- scss/foundation/components/_split-buttons.scss
|
140
|
+
- scss/foundation/components/_sub-nav.scss
|
141
|
+
- scss/foundation/components/_switch.scss
|
142
|
+
- scss/foundation/components/_tables.scss
|
143
|
+
- scss/foundation/components/_tabs.scss
|
144
|
+
- scss/foundation/components/_thumbs.scss
|
145
|
+
- scss/foundation/components/_tooltips.scss
|
146
|
+
- scss/foundation/components/_top-bar.scss
|
147
|
+
- scss/foundation/components/_type.scss
|
148
|
+
- scss/foundation/components/_visibility.scss
|
149
|
+
- scss/foundation/test.html
|
150
|
+
- scss/normalize.scss
|
151
|
+
- spec/abide/abide.js
|
152
|
+
- spec/abide/advanced.html
|
153
|
+
- spec/abide/basic.html
|
154
|
+
- spec/accordion/accordion.js
|
155
|
+
- spec/accordion/basic.html
|
156
|
+
- spec/accordion/grid.html
|
157
|
+
- spec/accordion/multiexpand.html
|
158
|
+
- spec/alert/alert.js
|
159
|
+
- spec/alert/basic.html
|
160
|
+
- spec/clearing/222.gif
|
161
|
+
- spec/clearing/777.gif
|
162
|
+
- spec/clearing/basic.html
|
163
|
+
- spec/clearing/ccc.gif
|
164
|
+
- spec/clearing/clearing.js
|
165
|
+
- spec/dropdown/basic.html
|
166
|
+
- spec/dropdown/dropdown.js
|
167
|
+
- spec/equalizer/basic.html
|
168
|
+
- spec/equalizer/equalizer.js
|
169
|
+
- spec/framework/framework.js
|
170
|
+
- spec/helpers.js
|
171
|
+
- spec/interchange/basic.html
|
172
|
+
- spec/interchange/interchange.js
|
173
|
+
- spec/joyride/joyride.js
|
174
|
+
- spec/magellan/magellan.js
|
175
|
+
- spec/offcanvas/offcanvas.js
|
176
|
+
- spec/orbit/orbit.js
|
177
|
+
- spec/reveal/reveal.js
|
178
|
+
- spec/tab/tab.js
|
179
|
+
- spec/tooltip/tooltip.js
|
180
|
+
- spec/topbar/multidropdown.html
|
181
|
+
- spec/topbar/sticky.html
|
182
|
+
- spec/topbar/topbar.js
|
183
|
+
homepage: http://foundation.zurb.com
|
184
|
+
licenses: []
|
185
|
+
metadata: {}
|
186
|
+
post_install_message:
|
187
|
+
rdoc_options: []
|
188
|
+
require_paths:
|
189
|
+
- lib
|
190
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0'
|
200
|
+
requirements: []
|
201
|
+
rubyforge_project:
|
202
|
+
rubygems_version: 2.2.2
|
203
|
+
signing_key:
|
204
|
+
specification_version: 4
|
205
|
+
summary: ZURB Foundation on Sass/Compass
|
206
|
+
test_files:
|
207
|
+
- spec/abide/abide.js
|
208
|
+
- spec/abide/advanced.html
|
209
|
+
- spec/abide/basic.html
|
210
|
+
- spec/accordion/accordion.js
|
211
|
+
- spec/accordion/basic.html
|
212
|
+
- spec/accordion/grid.html
|
213
|
+
- spec/accordion/multiexpand.html
|
214
|
+
- spec/alert/alert.js
|
215
|
+
- spec/alert/basic.html
|
216
|
+
- spec/clearing/222.gif
|
217
|
+
- spec/clearing/777.gif
|
218
|
+
- spec/clearing/basic.html
|
219
|
+
- spec/clearing/ccc.gif
|
220
|
+
- spec/clearing/clearing.js
|
221
|
+
- spec/dropdown/basic.html
|
222
|
+
- spec/dropdown/dropdown.js
|
223
|
+
- spec/equalizer/basic.html
|
224
|
+
- spec/equalizer/equalizer.js
|
225
|
+
- spec/framework/framework.js
|
226
|
+
- spec/helpers.js
|
227
|
+
- spec/interchange/basic.html
|
228
|
+
- spec/interchange/interchange.js
|
229
|
+
- spec/joyride/joyride.js
|
230
|
+
- spec/magellan/magellan.js
|
231
|
+
- spec/offcanvas/offcanvas.js
|
232
|
+
- spec/orbit/orbit.js
|
233
|
+
- spec/reveal/reveal.js
|
234
|
+
- spec/tab/tab.js
|
235
|
+
- spec/tooltip/tooltip.js
|
236
|
+
- spec/topbar/multidropdown.html
|
237
|
+
- spec/topbar/sticky.html
|
238
|
+
- spec/topbar/topbar.js
|