zurb-foundation 4.3.1 → 4.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -0
  3. data/Gemfile.lock +31 -2
  4. data/Gruntfile.js +54 -10
  5. data/LICENSE +2 -2
  6. data/README.md +11 -2
  7. data/Rakefile +9 -0
  8. data/docs/CHANGELOG.md +9 -0
  9. data/docs/Procfile +2 -2
  10. data/docs/components/abide.html.erb +30 -6
  11. data/docs/components/alert-boxes.html.erb +35 -10
  12. data/docs/components/block-grid.html.erb +1 -1
  13. data/docs/components/breadcrumbs.html.erb +4 -4
  14. data/docs/components/button-groups.html.erb +2 -2
  15. data/docs/components/buttons.html.erb +10 -10
  16. data/docs/components/clearing.html.erb +28 -2
  17. data/docs/components/custom-forms.html.erb +9 -1
  18. data/docs/components/dropdown-buttons.html.erb +36 -11
  19. data/docs/components/dropdown.html.erb +44 -13
  20. data/docs/components/flex-video.html.erb +3 -3
  21. data/docs/components/forms.html.erb +10 -10
  22. data/docs/components/global.html.erb +15 -20
  23. data/docs/components/grid.html.erb +24 -23
  24. data/docs/components/inline-lists.html.erb +3 -3
  25. data/docs/components/interchange.html.erb +28 -2
  26. data/docs/components/joyride.html.erb +34 -10
  27. data/docs/components/keystrokes.html.erb +3 -3
  28. data/docs/components/kitchen-sink.html.erb +1 -1
  29. data/docs/components/labels.html.erb +3 -3
  30. data/docs/components/magellan.html.erb +25 -2
  31. data/docs/components/orbit.html.erb +39 -9
  32. data/docs/components/pagination.html.erb +7 -7
  33. data/docs/components/panels.html.erb +3 -3
  34. data/docs/components/pricing-tables.html.erb +11 -11
  35. data/docs/components/progress-bars.html.erb +5 -5
  36. data/docs/components/reveal.html.erb +31 -8
  37. data/docs/components/section.html.erb +61 -37
  38. data/docs/components/side-nav.html.erb +4 -4
  39. data/docs/components/split-buttons.html.erb +37 -15
  40. data/docs/components/sub-nav.html.erb +10 -6
  41. data/docs/components/switch.html.erb +2 -2
  42. data/docs/components/tables.html.erb +7 -7
  43. data/docs/components/tooltips.html.erb +30 -6
  44. data/docs/components/top-bar.html.erb +101 -13
  45. data/docs/components/type.html.erb +16 -16
  46. data/docs/config.ru +18 -1
  47. data/docs/controller.rb +1 -1
  48. data/docs/css/_coderay.scss +2 -2
  49. data/docs/css/_footer.scss +7 -7
  50. data/docs/css/_offcanvas.scss +16 -16
  51. data/docs/css/docs.scss +1 -3
  52. data/docs/index.html.erb +29 -29
  53. data/docs/layout.html.erb +5 -5
  54. data/docs/media-queries.html.erb +3 -3
  55. data/docs/rails.html.erb +2 -1
  56. data/docs/sass.html.erb +188 -146
  57. data/docs/support.html.erb +2 -2
  58. data/foundation.gemspec +1 -0
  59. data/js/foundation/foundation.abide.js +5 -5
  60. data/js/foundation/foundation.alerts.js +9 -4
  61. data/js/foundation/foundation.clearing.js +2 -2
  62. data/js/foundation/foundation.dropdown.js +11 -5
  63. data/js/foundation/foundation.forms.js +51 -28
  64. data/js/foundation/foundation.joyride.js +7 -5
  65. data/js/foundation/foundation.js +25 -1
  66. data/js/foundation/foundation.magellan.js +3 -2
  67. data/js/foundation/foundation.orbit.js +78 -58
  68. data/js/foundation/foundation.placeholder.js +424 -177
  69. data/js/foundation/foundation.reveal.js +39 -16
  70. data/js/foundation/foundation.section.js +62 -32
  71. data/js/foundation/foundation.tooltips.js +3 -2
  72. data/js/foundation/foundation.topbar.js +139 -69
  73. data/lib/foundation/generators/templates/application.html.erb +2 -1
  74. data/lib/foundation/version.rb +1 -1
  75. data/lib/zurb-foundation.rb +12 -0
  76. data/package.json +4 -3
  77. data/scss/foundation/_variables.scss +183 -159
  78. data/scss/foundation/components/_alert-boxes.scss +8 -8
  79. data/scss/foundation/components/_block-grid.scss +1 -1
  80. data/scss/foundation/components/_breadcrumbs.scss +3 -3
  81. data/scss/foundation/components/_button-groups.scss +2 -2
  82. data/scss/foundation/components/_buttons.scss +20 -20
  83. data/scss/foundation/components/_custom-forms.scss +19 -14
  84. data/scss/foundation/components/_dropdown-buttons.scss +8 -8
  85. data/scss/foundation/components/_dropdown.scss +4 -4
  86. data/scss/foundation/components/_flex-video.scss +2 -2
  87. data/scss/foundation/components/_forms.scss +28 -18
  88. data/scss/foundation/components/_global.scss +43 -18
  89. data/scss/foundation/components/_grid-5.scss +4 -4
  90. data/scss/foundation/components/_grid.scss +6 -4
  91. data/scss/foundation/components/_inline-lists.scss +3 -3
  92. data/scss/foundation/components/_joyride.scss +10 -10
  93. data/scss/foundation/components/_keystrokes.scss +2 -2
  94. data/scss/foundation/components/_labels.scss +2 -2
  95. data/scss/foundation/components/_orbit.scss +58 -44
  96. data/scss/foundation/components/_pagination.scss +6 -6
  97. data/scss/foundation/components/_panels.scss +7 -4
  98. data/scss/foundation/components/_pricing-tables.scss +10 -10
  99. data/scss/foundation/components/_progress-bars.scss +3 -3
  100. data/scss/foundation/components/_reveal.scss +5 -5
  101. data/scss/foundation/components/_section.scss +21 -21
  102. data/scss/foundation/components/_side-nav.scss +3 -3
  103. data/scss/foundation/components/_split-buttons.scss +7 -7
  104. data/scss/foundation/components/_sub-nav.scss +26 -10
  105. data/scss/foundation/components/_switch.scss +15 -11
  106. data/scss/foundation/components/_tables.scss +6 -6
  107. data/scss/foundation/components/_thumbs.scss +2 -4
  108. data/scss/foundation/components/_tooltips.scss +4 -4
  109. data/scss/foundation/components/_top-bar.scss +77 -39
  110. data/scss/foundation/components/_type.scss +25 -23
  111. data/scss/foundation/components/_visibility.scss +28 -28
  112. data/scss/normalize.scss +22 -14
  113. data/spec/js/SectionSpec.js +39 -0
  114. data/spec/js/helpers/SectionSpecHelper.js +22 -0
  115. data/spec/js/helpers/SpecHelper.js +19 -0
  116. metadata +32 -25
  117. data/.rbenv-version +0 -1
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: d2b8c7c675009f2dc531ea08ca6b933971921c1e
4
+ data.tar.gz: 0aea4880eaccf05c90c997ce4297e82181bb2211
5
+ SHA512:
6
+ metadata.gz: b66d2908dc10eff46d600fa55941197fb550ad441205b75b5608bc128cd43ce20fe3cfb13f4c12043056edf65e1715c40dba00df4fc4c9aa5018496a2a234fd5
7
+ data.tar.gz: d3e7f103b64814f30801f34a75f725eeba5f4196e415a52b179fcd8b75c0c915ff055eb228b58223a98cd01387b2956fdac1177b4b7586cefa6426ed0b80b11c
data/.gitignore CHANGED
@@ -2,6 +2,7 @@
2
2
  *.rbc
3
3
  .bundle
4
4
  .config
5
+ .grunt
5
6
  .yardoc
6
7
  .idea
7
8
  InstalledFiles
@@ -17,6 +18,7 @@ test/tmp
17
18
  test/version_tmp
18
19
  test/css
19
20
  test/scss/output-test
21
+ vendor/
20
22
  tmp
21
23
  *.DS_Store
22
24
  marketing/.sass-cache/*
@@ -27,3 +29,5 @@ test/css/styles.css
27
29
  node_modules
28
30
  docs/public/*
29
31
  *.scssc
32
+ *.rbenv-version
33
+ *.ruby-version
@@ -1,19 +1,48 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zurb-foundation (4.3.1)
4
+ zurb-foundation (4.3.2)
5
5
  sass (>= 3.2.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
+ childprocess (0.3.9)
11
+ ffi (~> 1.0, >= 1.0.11)
12
+ diff-lcs (1.2.4)
13
+ ffi (1.9.0)
14
+ ffi (1.9.0-x86-mingw32)
15
+ jasmine (1.3.2)
16
+ jasmine-core (~> 1.3.1)
17
+ rack (~> 1.0)
18
+ rspec (>= 1.3.1)
19
+ selenium-webdriver (>= 0.1.3)
20
+ jasmine-core (1.3.1)
21
+ multi_json (1.7.9)
22
+ rack (1.5.2)
10
23
  rake (10.0.3)
11
- sass (3.2.9)
24
+ rspec (2.14.1)
25
+ rspec-core (~> 2.14.0)
26
+ rspec-expectations (~> 2.14.0)
27
+ rspec-mocks (~> 2.14.0)
28
+ rspec-core (2.14.5)
29
+ rspec-expectations (2.14.2)
30
+ diff-lcs (>= 1.1.3, < 2.0)
31
+ rspec-mocks (2.14.3)
32
+ rubyzip (0.9.9)
33
+ sass (3.2.10)
34
+ selenium-webdriver (2.35.1)
35
+ childprocess (>= 0.2.5)
36
+ multi_json (~> 1.0)
37
+ rubyzip (< 1.0.0)
38
+ websocket (~> 1.0.4)
39
+ websocket (1.0.7)
12
40
 
13
41
  PLATFORMS
14
42
  ruby
15
43
  x86-mingw32
16
44
 
17
45
  DEPENDENCIES
46
+ jasmine
18
47
  rake
19
48
  zurb-foundation!
@@ -1,20 +1,63 @@
1
1
  module.exports = function(grunt) {
2
2
 
3
- grunt.loadNpmTasks('grunt-contrib-qunit');
3
+ grunt.loadNpmTasks('grunt-contrib-jasmine');
4
4
  grunt.loadNpmTasks('grunt-contrib-watch');
5
+ grunt.loadNpmTasks('grunt-contrib-sass');
5
6
 
6
7
  grunt.initConfig({
7
- qunit: {
8
- all: ['test/javascripts/tests/**/*.html']
8
+ jasmine: {
9
+ src: [
10
+ 'js/foundation/foundation.js',
11
+ 'js/foundation/*.js'
12
+ ],
13
+ options: {
14
+ specs: 'spec/**/*Spec.js',
15
+ helpers: 'spec/**/*Helper.js',
16
+ keepRunner: true,
17
+ styles: ['test/stylesheets/normalize.css', 'test/stylesheets/foundation.css']
18
+ },
19
+
20
+ zepto: {
21
+ src: '<%= jasmine.src %>',
22
+ options: {
23
+ outfile: 'test/_SpecRunner_zepto.html',
24
+ vendor: [
25
+ 'js/vendor/custom.modernizr.js',
26
+ 'js/vendor/zepto.js'
27
+ ],
28
+ }
29
+ },
30
+
31
+ jquery: {
32
+ src: '<%= jasmine.src %>',
33
+ options: {
34
+ outfile: 'test/_SpecRunner_jquery.html',
35
+ vendor: [
36
+ 'js/vendor/custom.modernizr.js',
37
+ 'js/vendor/jquery.js'
38
+ ]
39
+ }
40
+ }
41
+ },
42
+ sass: {
43
+ test: {
44
+ files: {
45
+ 'test/stylesheets/normalize.css' : 'scss/normalize.scss',
46
+ 'test/stylesheets/foundation.css' : 'scss/foundation.scss'
47
+ }
48
+ }
9
49
  },
10
50
  watch: {
11
- all: {
51
+ css: {
52
+ files: 'scss/**/*.scss',
53
+ tasks: ['sass']
54
+ },
55
+ tests: {
12
56
  files: [
13
- 'test/javascripts/tests/**/*.html',
14
- 'test/javascripts/tests/**/*.js',
15
- 'lib/assets/javascripts/foundation/*.js'
57
+ 'js/**/*.js',
58
+ 'spec/**/*.js'
16
59
  ],
17
- tasks: 'default',
60
+ tasks: 'test',
18
61
  options: {
19
62
  interrupt: true
20
63
  }
@@ -22,6 +65,7 @@ module.exports = function(grunt) {
22
65
  }
23
66
  });
24
67
 
25
- // Default task.
26
- grunt.registerTask('default', ['qunit']);
68
+ grunt.registerTask('test', ['sass:test', 'jasmine:zepto', 'jasmine:jquery']);
69
+
70
+ grunt.registerTask('default', ['test']);
27
71
  };
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Mark Hayes
1
+ Copyright (c) 2013 ZURB, inc.
2
2
 
3
3
  MIT License
4
4
 
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
19
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
20
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
21
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -30,6 +30,8 @@ Many thanks to all the people working on Foundation either to improve the base c
30
30
 
31
31
  WordPress (Versions marked 3/20/13)
32
32
 
33
+ * [WP-Forge](http://themeawesome.com/responsive-wordpress-theme/) by Thomas E. Vasquez using Foundation 4.3.1
34
+ * [NARGA](http://www.narga.net/narga-core/) by Nguyễn Đình Quân using Foundation version 4
33
35
  * [Reactor](https://github.com/awtheme/reactor) by Anthony Wilhelm using Foundation version 4
34
36
  * [Reverie](http://themefortress.com/reverie/) by Zhen using Foundation version 4
35
37
  * [Corner Stone](https://github.com/thewirelessguy/cornerstone) by [Stephen Mullen](https://twitter.com/wirelessguyuk) using Foundation version v4.09
@@ -38,7 +40,6 @@ WordPress (Versions marked 3/20/13)
38
40
  * [Starter Theme](https://github.com/drewsymo/Foundation) by Drew Morris using Foundation version 3
39
41
  * [WP-Foundation](http://320press.com/wp-foundation/features/) by 320press using Foundation version 3
40
42
  * [f415](https://github.com/javorszky/f415) by Gabor Javorszky
41
- * [Narga Core](https://github.com/Narga/narga-core) by Nguyễn Đình Quân
42
43
  * [Basey](https://github.com/zslabs/basey-theme) by Zach Schnackel
43
44
 
44
45
  Joomla
@@ -56,6 +57,11 @@ Alfred
56
57
 
57
58
  * [Foundation Alfred](https://github.com/joshmedeski/foundation-alfred) by Josh Medeski (@joshmedeski)
58
59
 
60
+ Jekyll
61
+
62
+ * [Foundation 4 SASS](https://github.com/rememberlenny/Jekyll-Foundation-SASS) by [Leonard Bogdonoff](http://twitter.com/rememberlenny)
63
+ * [Foundation 3 CSS](https://github.com/groovemonkey/jekyll-foundation-base) by [Dave Cohen](https://github.com/groovemonkey)
64
+
59
65
  PyroCMS
60
66
 
61
67
  * [PyroYeti - PyroCMS Theme](https://github.com/pyrosuit/PyroYeti) by [Arnold Mwumva Ford](https://twitter.com/fordarnold) , Meridian Softech
@@ -66,11 +72,12 @@ Django
66
72
 
67
73
  MODX
68
74
 
69
- * [MODX Version](http://designfromwithin.com/blog/2012/02/07/foundation-modx/) by Menno Pietersen
75
+ * [Flexibility Theme](http://flexibilitymodx.com/) by Menno Pietersen
70
76
 
71
77
  .NET
72
78
 
73
79
  * [NuGet Package for ASP.Net MVC](http://www.nuget.org/packages/Foundation3_MVC4) by Edward Charbeneau, @EdCharbeneau
80
+ * [Kartris E-commerce](http://www.kartris.com/) by Cactusoft Ltd.
74
81
 
75
82
  Middleman
76
83
 
@@ -125,6 +132,7 @@ Templates
125
132
  Rapid Prototyping
126
133
 
127
134
  * [ditbi](https://github.com/roblevintennis/ditbi) by Rob Levin [4 Minute Demo Video](http://www.youtube.com/watch?v=ERgFCJFpq5E)
135
+ * [Serve Foundation - Rapid Prototyping with Serve](https://github.com/bomberstudios/serve-foundation)
128
136
 
129
137
  Grid Generator
130
138
 
@@ -148,6 +156,7 @@ Yeoman Generator
148
156
 
149
157
  * [Yeoman 1.0-Foundation 4](https://github.com/lkbgift/foundation4-yeoman) by [Leonard Bogdonoff](http://twitter.com/lkbcc)
150
158
  * [Yeoman-Foundation](https://npmjs.org/package/yeoman-foundation) by Vincent Mac
159
+ * [Generator-Foundation-Ext](https://github.com/jamesakers/generator-foundation-ext) by James Akers
151
160
 
152
161
  MIT Open Source License
153
162
  =======================
data/Rakefile CHANGED
@@ -1,2 +1,11 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
+
4
+ begin
5
+ require 'jasmine'
6
+ load 'jasmine/tasks/jasmine.rake'
7
+ rescue LoadError
8
+ task :jasmine do
9
+ abort "Jasmine is not available. In order to run jasmine, you must: (sudo) gem install jasmine"
10
+ end
11
+ end
@@ -1,3 +1,12 @@
1
+ ### 4.3.2- September 23, 2013
2
+
3
+ * Documentation updates
4
+ * When changing slides in Orbit all `data-orbit-link` will now get an active class
5
+ * Adds new `em-calc` function, old `emCalc` will automatically reference newly named function
6
+ * Lots of other bug fixes
7
+
8
+ You can compare the commits [here](https://github.com/zurb/foundation/compare/v4.3.1...v4.3.2).
9
+
1
10
  ### 4.3.1- July 23, 2013
2
11
  * Fixes RTL animation issues in Orbit
3
12
  * Addresses error class conflicts between Abide and general form styles
@@ -1,2 +1,2 @@
1
- web: bundle exec rackup -p 4001
2
- stasis: bundle exec stasis -d 4000
1
+ web: bundle exec rackup -p 4000
2
+ stasis: bundle exec stasis -d
@@ -115,12 +115,12 @@
115
115
  <form data-abide>
116
116
  <div class="name-field">
117
117
  <label>Your name <small>required</small></label>
118
- <input type="number" required pattern="[a-zA-Z]+">
118
+ <input type="text" required pattern="[a-zA-Z]+">
119
119
  <small class="error">Name is required and must be a string.</small>
120
120
  </div>
121
121
  <div class="email-field">
122
122
  <label>Email <small>required</small></label>
123
- <input type="password" required>
123
+ <input type="email" required>
124
124
  <small class="error">An email address is required.</small>
125
125
  </div>
126
126
  <button type="submit">Submit</button>
@@ -270,7 +270,7 @@ $(document)
270
270
 
271
271
  <h3>Error messages</h3>
272
272
 
273
- <p>To display an error message for your invalid form element include a <code>&lt;small&gt;</code> tage with an <code>error</code> class as a sibling of your input.</p>
273
+ <p>To display an error message for your invalid form element include a <code>&lt;small&gt;</code> tag with an <code>error</code> class as a sibling of your input.</p>
274
274
 
275
275
  <%= code_example '
276
276
  <div class="input-wrapper">
@@ -313,10 +313,34 @@ $('#myForm')
313
313
  </div>
314
314
  </div>
315
315
 
316
- <h3>Using the JavaScript</h3>
317
- <p>You'll need to include <code>foundation.abide.js</code> to get plugin to work. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the alert plugin. Above your closing <code>&lt;/body&gt;</code> tag include the following line of code and make sure you have the JS in your directory.</p>
316
+ <h3>Using the JavaScript</h3>
317
+ <div class="panel">
318
+ Before you can use Abide you'll want to verify that both jQuery (or Zepto) and <code>foundation.js</code> are available on your page. You can refer to the <a href="../javascript.html">javascript documentation</a> on setting that up.
319
+ </div>
320
+
321
+ <p>Just add <code>foundation.abide.js</code> AFTER the <code>foundation.js</code> file. Your markup should look something like this:</p>
322
+
323
+ <%= code_example '
324
+ <body>
325
+
326
+ ...
327
+
328
+ <script>
329
+ document.write(\'<script src=/js/vendor/\'
330
+ + (\'__proto__\' in {} ? \'zepto\' : \'jquery\')
331
+ + \'.js><\/script>\');
332
+ </script>
333
+
334
+ <script src="js/foundation/foundation.js"></script>
335
+ <script src="js/foundation/foundation.abide.js"></script>
336
+ <!-- Other JS plugins can be included here -->
337
+
338
+ <script>
339
+ $(document).foundation();
340
+ </script>
318
341
 
319
- <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
342
+ </body>
343
+ ', :html %>
320
344
 
321
345
  <p>Required Foundation Library: <code>foundation.abide.js</code></p>
322
346
 
@@ -149,14 +149,14 @@
149
149
  $include-html-alert-classes: $include-html-classes;
150
150
 
151
151
  /* We use this to control alert padding. */
152
- $alert-padding-top: emCalc(11);
152
+ $alert-padding-top: em-calc(11);
153
153
  $alert-padding-default-float: $alert-padding-top;
154
- $alert-padding-opposite-direction: $alert-padding-top + emCalc(10);
155
- $alert-padding-bottom: $alert-padding-top + emCalc(1);
154
+ $alert-padding-opposite-direction: $alert-padding-top + em-calc(10);
155
+ $alert-padding-bottom: $alert-padding-top + em-calc(1);
156
156
 
157
157
  /* We use these to control text style. */
158
158
  $alert-font-weight: bold;
159
- $alert-font-size: emCalc(14);
159
+ $alert-font-size: em-calc(14);
160
160
  $alert-font-color: #fff;
161
161
  $alert-font-color-alt: darken($secondary-color, 60%);
162
162
 
@@ -167,12 +167,12 @@ $alert-function-factor: 10%;
167
167
  $alert-border-style: solid;
168
168
  $alert-border-width: 1px;
169
169
  $alert-border-color: darken($primary-color, $alert-function-factor);
170
- $alert-bottom-margin: emCalc(20);
170
+ $alert-bottom-margin: em-calc(20);
171
171
 
172
172
  /* We use these to style the close buttons */
173
173
  $alert-close-color: #333;
174
- $alert-close-position: emCalc(5);
175
- $alert-close-font-size: emCalc(22);
174
+ $alert-close-position: em-calc(5);
175
+ $alert-close-font-size: em-calc(22);
176
176
  $alert-close-opacity: 0.3;
177
177
  $alert-close-opacity-hover: 0.5;
178
178
  $alert-close-padding: 5px 4px 4px;
@@ -182,15 +182,40 @@ $alert-radius: $global-radius;
182
182
 
183
183
  ', :css %>
184
184
 
185
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
185
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
186
186
 
187
187
  <hr>
188
188
 
189
189
  <h3>Using the JavaScript</h3>
190
- <p>You don't need ths JS to create alert boxes with Foundation. The only reason you'll need to include <code>foundation.alerts.js</code> is if you want to add the ability to close an alert. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the alert plugin. Above your closing <code>&lt;/body&gt;</code> tag include the following line of code and make sure you have the JS in your directory:</p>
190
+ <p>You don't need ths JS to create alert boxes with Foundation. The only reason you'll need to include <code>foundation.alerts.js</code> is if you want to add the ability to close an alert.
191
191
 
192
- <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
192
+ <div class="panel">
193
+ Before you can use the top bar you'll want to verify that both jQuery (or Zepto) and <code>foundation.js</code> are available on your page. You can refer to the <a href="../javascript.html">javascript documentation</a> on setting that up.
194
+ </div>
195
+
196
+ <p>Just add <code>foundation.alerts.js</code> AFTER the <code>foundation.js</code> file. Your markup should look something like this:</p>
197
+
198
+ <%= code_example '
199
+ <body>
200
+
201
+ ...
202
+
203
+ <script>
204
+ document.write(\'<script src=/js/vendor/\'
205
+ + (\'__proto__\' in {} ? \'zepto\' : \'jquery\')
206
+ + \'.js><\/script>\');
207
+ </script>
208
+
209
+ <script src="js/foundation/foundation.js"></script>
210
+ <script src="js/foundation/foundation.alerts.js"></script>
211
+ <!-- Other JS plugins can be included here -->
212
+
213
+ <script>
214
+ $(document).foundation();
215
+ </script>
193
216
 
217
+ </body>
218
+ ', :html %>
194
219
  <p>Required Foundation Library: <code>foundation.alerts.js</code></p>
195
220
 
196
221
  <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
@@ -113,7 +113,7 @@ $base-style: true
113
113
  <%= code_example '
114
114
  /* We use this to control the maximum blocks and spacing */
115
115
  $block-grid-elements: 12;
116
- $block-grid-default-spacing: emCalc(20);
116
+ $block-grid-default-spacing: em-calc(20);
117
117
 
118
118
  /* Enables media queries for block-grid classes. Set to false if writing semantic HTML. */
119
119
  $block-grid-media-queries: true
@@ -124,8 +124,8 @@ $include-html-nav-classes: $include-html-classes;
124
124
  $crumb-bg: lighten($secondary-color, 5%);
125
125
 
126
126
  /* We use these to set the padding around the breadcrumbs. */
127
- $crumb-padding: emCalc(9, 14, 9);
128
- $crumb-side-padding: emCalc(12);
127
+ $crumb-padding: em-calc(9 14 9);
128
+ $crumb-side-padding: em-calc(12);
129
129
 
130
130
  /* We use these to control border styles. */
131
131
  $crumb-function-factor: 10%;
@@ -135,7 +135,7 @@ $crumb-border-color: darken($crumb-bg, $crumb-function-factor);
135
135
  $crumb-radius: $global-radius;
136
136
 
137
137
  /* We use these to set various text styles for breadcrumbs. */
138
- $crumb-font-size: emCalc(11);
138
+ $crumb-font-size: em-calc(11);
139
139
  $crumb-font-color: $primary-color;
140
140
  $crumb-font-color-current: #333;
141
141
  $crumb-font-color-unavailable: #999;
@@ -147,7 +147,7 @@ $crumb-slash-color: #aaa;
147
147
  $crumb-slash: "/";
148
148
  ', :css %>
149
149
 
150
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
150
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
151
151
 
152
152
  </div>
153
153
  </div>
@@ -218,10 +218,10 @@ $float: left
218
218
  $include-html-button-classes: $include-html-classes;
219
219
 
220
220
  /* Sets the margin for the right side by default, and the left margin if right-to-left direction is used *.
221
- $button-bar-margin-opposite: emCalc(10);
221
+ $button-bar-margin-opposite: em-calc(10);
222
222
  ', :css %>
223
223
 
224
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
224
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
225
225
 
226
226
  </div>
227
227
  </div>