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
@@ -98,11 +98,11 @@ $active-bg: $sub-nav-active-bg
98
98
  $include-html-nav-classes: $include-html-classes;
99
99
 
100
100
  /* We use these to control margin and padding */
101
- $sub-nav-list-margin: emCalc(-4, 0, 18);
102
- $sub-nav-list-padding-top: emCalc(4);
101
+ $sub-nav-list-margin: em-calc(-4 0 18);
102
+ $sub-nav-list-padding-top: em-calc(4);
103
103
 
104
104
  /* We use this to control the definition */
105
- $sub-nav-font-size: emCalc(14);
105
+ $sub-nav-font-size: em-calc(14);
106
106
  $sub-nav-font-color: #999;
107
107
  $sub-nav-font-weight: normal;
108
108
  $sub-nav-text-decoration: none;
@@ -112,10 +112,14 @@ $sub-nav-border-radius: 1000px;
112
112
  $sub-nav-active-font-weight: bold;
113
113
  $sub-nav-active-bg: $primary-color;
114
114
  $sub-nav-active-color: #fff;
115
- $sub-nav-active-padding: emCalc(3, 9);
116
- $sub-nav-active-cursor: default;', :css %>
115
+ $sub-nav-active-padding: em-calc(3 9);
116
+ $sub-nav-active-cursor: default;
117
117
 
118
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
118
+ /* We use these to the item divider */
119
+ $sub-nav-item-divider: "";
120
+ $sub-nav-item-divider-margin: emCalc(12);', :css %>
121
+
122
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
119
123
 
120
124
  </div>
121
125
  </div>
@@ -257,7 +257,7 @@ $switch-height-tny: 22px;
257
257
  $switch-height-sml: 28px;
258
258
  $switch-height-med: 36px;
259
259
  $switch-height-lrg: 44px;
260
- $switch-bottom-margin: emCalc(20);
260
+ $switch-bottom-margin: em-calc(20);
261
261
 
262
262
  /* We use these to control default font sizes for our classes. */
263
263
  $switch-font-size-tny: 11px;
@@ -280,7 +280,7 @@ $switch-negative-color: #f5f5f5;
280
280
  /* Outline Style for tabbing through switches */
281
281
  $switch-label-outline: 1px dotted #888;', :css %>
282
282
 
283
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
283
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
284
284
 
285
285
  </div>
286
286
  </div>
@@ -100,22 +100,22 @@ $table-border-color: #ddd;
100
100
 
101
101
  /* These control the table head styles */
102
102
  $table-head-bg: #f5f5f5;
103
- $table-head-font-size: emCalc(14);
103
+ $table-head-font-size: em-calc(14);
104
104
  $table-head-font-color: #222;
105
105
  $table-head-font-weight: bold;
106
- $table-head-padding: emCalc(8, 10, 10);
106
+ $table-head-padding: em-calc(8 10 10);
107
107
 
108
108
  /* These control the row padding and font styles */
109
- $table-row-padding: emCalc(9, 10);
110
- $table-row-font-size: emCalc(14);
109
+ $table-row-padding: em-calc(9 10);
110
+ $table-row-font-size: em-calc(14);
111
111
  $table-row-font-color: #222;
112
- $table-line-height: emCalc(18);
112
+ $table-line-height: em-calc(18);
113
113
 
114
114
  /* These are for controlling the display and margin of tables */
115
115
  $table-display: table-cell;
116
- $table-margin-bottom: emCalc(20);', :css %>
116
+ $table-margin-bottom: em-calc(20);', :css %>
117
117
 
118
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
118
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
119
119
 
120
120
 
121
121
  </div>
@@ -55,16 +55,16 @@ $has-tip-border-bottom-hover: dotted 1px darken($primary-color, 20%);
55
55
  $has-tip-font-color-hover: $primary-color;
56
56
  $has-tip-cursor-type: help;
57
57
 
58
- $tooltip-padding: emCalc(8);
58
+ $tooltip-padding: em-calc(8);
59
59
  $tooltip-bg: #000;
60
- $tooltip-font-size: emCalc(15);
60
+ $tooltip-font-size: em-calc(15);
61
61
  $tooltip-font-weight: bold;
62
62
  $tooltip-font-color: #fff;
63
63
  $tooltip-line-height: 1.3;
64
- $tooltip-close-font-size: emCalc(10);
64
+ $tooltip-close-font-size: em-calc(10);
65
65
  $tooltip-close-font-weight: normal;
66
66
  $tooltip-close-font-color: #888;
67
- $tooltip-font-size-sml: emCalc(14);
67
+ $tooltip-font-size-sml: em-calc(14);
68
68
  $tooltip-radius: $global-radius;
69
69
  $tooltip-pip-size: 5px;
70
70
  ', :css %>
@@ -72,10 +72,33 @@ $tooltip-pip-size: 5px;
72
72
  <hr>
73
73
 
74
74
  <h3>Using the Javascript</h3>
75
- <p>You'll need to include <code>foundation.tooltips.js</code> to make sure everything works properly. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the 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>
75
+ <div class="panel">
76
+ Before you can use tooltips 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.
77
+ </div>
76
78
 
77
- <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
79
+ <p>Just add <code>foundation.tooltips.js</code> AFTER the <code>foundation.js</code> file. Your markup should look something like this:</p>
78
80
 
81
+ <%= code_example '
82
+ <body>
83
+
84
+ ...
85
+
86
+ <script>
87
+ document.write(\'<script src=/js/vendor/\'
88
+ + (\'__proto__\' in {} ? \'zepto\' : \'jquery\')
89
+ + \'.js><\/script>\');
90
+ </script>
91
+
92
+ <script src="js/foundation/foundation.js"></script>
93
+ <script src="js/foundation/foundation.tooltips.js"></script>
94
+ <!-- Other JS plugins can be included here -->
95
+
96
+ <script>
97
+ $(document).foundation();
98
+ </script>
99
+
100
+ </body>
101
+ ', :html %>
79
102
  <p>Required Foundation Library: <code>foundation.tooltips.js</code></p>
80
103
 
81
104
  <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
@@ -93,6 +116,7 @@ $tooltip-pip-size: 5px;
93
116
  selector : '.has-tip',
94
117
  additionalInheritableClasses : [],
95
118
  tooltipClass : '.tooltip',
119
+ touchCloseText: 'tap to close',
96
120
  disable-for-touch: false,
97
121
  tipTemplate : function (selector, content) {
98
122
  return '<span data-selector=\"' + selector + '\" class=\"'
@@ -81,10 +81,74 @@
81
81
  <p>The top bar has four main elements, three of which are needed for proper functionality: <code>ul.title-area</code>, a <code>ul class="right/left</code> element enclosed in a <code>section class="top-bar-section"</code>, and the <code>li.toggle-topbar</code> element that will expand the menu in the mobile layout.</p>
82
82
 
83
83
  <h5>Positioning the Bar</h5>
84
- <p>The top bar is built with a single <code>nav</code> element with a class of <code>top-bar</code>. It will take on full-browser width by default. To make the top bar stay fixed as you scroll, wrap it in <code>div class="fixed"</code>. If you want your navigation to be set to your grid width, wrap it in <code>div class="contain-to-grid"</code>. You may use <code>fixed</code> and <code>contain-to-grid</code> together.</p>
84
+ <p>The top bar is built with a single <code>nav</code> element with a class of <code>top-bar</code>. It will take on full-browser width by default. To make the top bar stay fixed as you scroll, wrap it in <code>div class="fixed"</code>. If you want your navigation to be set to your grid width, wrap it in <code>div class="contain-to-grid"</code>. You may use <code>fixed</code> and <code>contain-to-grid</code> together in the wrapping div (<code>div class="contain-to-grid fixed</code>).</p>
85
85
 
86
86
  <h5>Building the Nav</h5>
87
- <p>When building your bar it is good to be aware of how many links you're going to need in it so you can customize your responsive breakpoint accordingly. Build your navigation with <code>ul.left</code> and/or <code>ul.right</code> depending where you want links. To add items, simply include <code>li</code> elements with and anchor inside them for your top-level. To build a dropdown menu, you'll need to add <code>has-dropdown</code> to the <code>li</code> and include <code>ul.dropdown</code> after that anchor. Add a class of <code>active</code> to mark the current page.</p>
87
+ <p>When building your bar it is good to be aware of how many links you're going to need in it so you can customize your responsive breakpoint accordingly. Build your navigation with <code>ul.left</code> and/or <code>ul.right</code> depending where you want links. To add items, simply include <code>li</code> elements with an anchor inside them for your top-level. To build a dropdown menu, you'll need to add <code>has-dropdown</code> to the <code>li</code> and include <code>ul.dropdown</code> after that anchor. Add a class of <code>active</code> to mark the current page.</p>
88
+
89
+ <nav class="top-bar hide-for-small" style="">
90
+ <ul class="title-area">
91
+ <!-- Title Area -->
92
+ <li class="name">
93
+ <h1>
94
+ <a href="http://www.zurb.com/expo">
95
+ Expo
96
+ </a>
97
+ </h1>
98
+ </li>
99
+ <li class="toggle-topbar"><a href="#"></a></li>
100
+ </ul>
101
+
102
+
103
+ <section class="top-bar-section">
104
+ <!-- Right Nav Section -->
105
+ <ul class="right">
106
+ <li><a href="#">Courses</a></li>
107
+ <li class="has-dropdown">
108
+ <a href="#">Library</a>
109
+ <ul class="dropdown">
110
+ <li><a href="http://patterntap.com">Pattern Tap</a></li>
111
+ <li><a href="http://www.zurb.com/word">Word</a></li>
112
+ <li><a href="http://www.zurb.com/responsive">Responsive</a></li>
113
+ <li><a href="http://www.zurb.com/playground">Playground</a></li>
114
+ <li><a href="http://www.zurb.com/quips">Quips</a></li>
115
+ </ul>
116
+ </li>
117
+ <li class="has-dropdown">
118
+ <a href="http://www.zurb.com/expo/community">Community</a>
119
+ <ul class="dropdown">
120
+ <li><a href="http://www.forrst.com">Forrst</a></li>
121
+ <li><a href="http://www.zurb.com/soapbox">Soapbox</a></li>
122
+ <li><a href="http://www.zurb.com/speak">Speak</a></li>
123
+ <li><a href="http://www.zurb.com/wired">Wired</a></li>
124
+ <li><a href="http://www.enrollapp.com">Enroll</a></li>
125
+ </ul>
126
+ </li>
127
+ <li>
128
+ <a href="http://www.zurb.com/jobs">Job Board</a>
129
+ </li>
130
+ <!--
131
+
132
+ <li class="logged-in has-dropdown">
133
+ <a href="#">
134
+ <div class="avatar">
135
+ <img src="http://placehold.it/25x25">
136
+ User-Name Here
137
+ </div>
138
+ </a>
139
+ <ul class="dropdown">
140
+ <li><a href="#"><img src="http://placehold.it/20x20&text=N">Notable</a></li>
141
+ <li><a href="#"><img src="http://placehold.it/20x20&text=S">Solidify</a></li>
142
+ <li><a href="#"><img src="http://placehold.it/20x20&text=V">Verify</a></li>
143
+ <li><a href="#"><img src="http://placehold.it/20x20&text=I">Influence</a></li>
144
+ <li class="signout"><a href="#">Sign Out</a></li>
145
+ </ul>
146
+ </li>
147
+ -->
148
+
149
+ </ul>
150
+ </section>
151
+ </nav>
88
152
 
89
153
  <h5>Other Elements</h5>
90
154
  <p>To make this navigation nice and flexible, we've included patterns for elements like buttons, inputs and dividers. To create dividers between your navigation, just add an empty <code>li.divider</code> and you'll get some separation. You can use a small Foundation button in the nav, just include <code>has-form</code> as a class for its parent li. You can include two different input types: search and text. To use these, add a class of search to the parent li.</p>
@@ -218,7 +282,7 @@
218
282
  <a name="clickable"></a>
219
283
  <h4>Clickable Topbar</h4>
220
284
  <p>You can now make the top bar clickable by adding a data-attribute to the nav element. Here's an example:</p>
221
- <nav class="top-bar">
285
+ <nav class="top-bar" data-options="is_hover:false">
222
286
  <ul class="title-area">
223
287
  <!-- Title Area -->
224
288
  <li class="name">
@@ -285,14 +349,14 @@ $topbar-bg: #111;
285
349
 
286
350
  /* Height and margin */
287
351
  $topbar-height: 45px;
288
- $topbar-margin-bottom: emCalc(30);
352
+ $topbar-margin-bottom: em-calc(30);
289
353
 
290
354
  /* Control Input height for top bar */
291
355
  $topbar-input-height: 2.45em;
292
356
 
293
357
  /* Controlling the styles for the title in the top bar */
294
358
  $topbar-title-weight: bold;
295
- $topbar-title-font-size: emCalc(17);
359
+ $topbar-title-font-size: em-calc(17);
296
360
 
297
361
  /* Style the top bar dropdown elements */
298
362
  $topbar-dropdown-bg: #222;
@@ -307,7 +371,7 @@ $topbar-link-color: #fff;
307
371
  $topbar-link-color-hover: #fff;
308
372
  $topbar-link-color-active: #fff;
309
373
  $topbar-link-weight: bold;
310
- $topbar-link-font-size: emCalc(13);
374
+ $topbar-link-font-size: em-calc(13);
311
375
  $topbar-link-hover-lightness: -30%; /* Darken by 30% */
312
376
  $topbar-link-bg-hover: darken($topbar-bg, 3%);
313
377
  $topbar-link-bg-active: darken($topbar-bg, 3%);
@@ -315,11 +379,11 @@ $topbar-link-bg-active: darken($topbar-bg, 3%);
315
379
  $topbar-dropdown-label-color: #555;
316
380
  $topbar-dropdown-label-text-transform: uppercase;
317
381
  $topbar-dropdown-label-font-weight: bold;
318
- $topbar-dropdown-label-font-size: emCalc(10);
382
+ $topbar-dropdown-label-font-size: em-calc(10);
319
383
 
320
384
  /* Top menu icon styles */
321
385
  $topbar-menu-link-transform: uppercase;
322
- $topbar-menu-link-font-size: emCalc(13);
386
+ $topbar-menu-link-font-size: em-calc(13);
323
387
  $topbar-menu-link-weight: bold;
324
388
  $topbar-menu-link-color: #fff;
325
389
  $topbar-menu-icon-color: #fff;
@@ -328,7 +392,7 @@ $topbar-menu-icon-color-toggled: #888;
328
392
 
329
393
  /* Transitions and breakpoint styles */
330
394
  $topbar-transition-speed: 300ms;
331
- $topbar-breakpoint: emCalc(940); /* Change to 9999px for always mobile layout */
395
+ $topbar-breakpoint: em-calc(940); /* Change to 9999px for always mobile layout */
332
396
  $topbar-media-query: "only screen and (min-width: #{$topbar-breakpoint})";
333
397
 
334
398
  /* Divider Styles */
@@ -336,17 +400,41 @@ $topbar-divider-border-bottom: solid 1px lighten($topbar-bg, 10%);
336
400
  $topbar-divider-border-top: solid 1px darken($topbar-bg, 10%);
337
401
 
338
402
  /* Sticky Class */
339
- $topbar-sticky-class: ".sticky";', :css %>
403
+ $topbar-sticky-class: ".sticky";
404
+ $topbar-arrows: true; //Set false to remove the triangle icon from the menu item', :css %>
340
405
 
341
- <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
406
+ <p><strong>Note:</strong> <code>em-calc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
342
407
 
343
408
  <hr>
344
409
 
345
410
  <h3>Using the JavaScript</h3>
346
- <p>You'll need to include <code>foundation.topbar.js</code> to get the topbar to play nice. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the topbar 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>
411
+ <div class="panel">
412
+ 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.
413
+ </div>
414
+
415
+ <p>Just add <code>foundation.topbar.js</code> AFTER the <code>foundation.js</code> file. Your markup should look something like this:</p>
416
+
417
+ <%= code_example '
418
+ <body>
419
+
420
+ ...
421
+
422
+ <script>
423
+ document.write(\'<script src=/js/vendor/\'
424
+ + (\'__proto__\' in {} ? \'zepto\' : \'jquery\')
425
+ + \'.js><\/script>\');
426
+ </script>
427
+
428
+ <script src="js/foundation/foundation.js"></script>
429
+ <script src="js/foundation/foundation.topbar.js"></script>
430
+ <!-- Other JS plugins can be included here -->
347
431
 
348
- <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
432
+ <script>
433
+ $(document).foundation();
434
+ </script>
349
435
 
436
+ </body>
437
+ ', :html %>
350
438
  <p>Required Foundation Library: <code>foundation.topbar.js</code></p>
351
439
 
352
440
  <h5>Optional JavaScript Configuration</h5>
@@ -302,11 +302,11 @@ $header-bottom-margin: .5em;
302
302
  $header-text-rendering: optimizeLegibility;
303
303
 
304
304
  /* We use these to control header font sizes */
305
- $h1-font-size: emCalc(44);
306
- $h2-font-size: emCalc(37);
307
- $h3-font-size: emCalc(27);
308
- $h4-font-size: emCalc(23);
309
- $h5-font-size: emCalc(18);
305
+ $h1-font-size: em-calc(44);
306
+ $h2-font-size: em-calc(37);
307
+ $h3-font-size: em-calc(27);
308
+ $h4-font-size: em-calc(23);
309
+ $h5-font-size: em-calc(18);
310
310
  $h6-font-size: 1em;
311
311
 
312
312
  /* These control how subheaders are styled. */
@@ -325,8 +325,8 @@ $paragraph-font-family: inherit;
325
325
  $paragraph-font-weight: normal;
326
326
  $paragraph-font-size: 1em;
327
327
  $paragraph-line-height: 1.6;
328
- $paragraph-margin-bottom: emCalc(20);
329
- $paragraph-aside-font-size: emCalc(14);
328
+ $paragraph-margin-bottom: em-calc(20);
329
+ $paragraph-aside-font-size: em-calc(14);
330
330
  $paragraph-aside-line-height: 1.35;
331
331
  $paragraph-aside-font-style: italic;
332
332
  $paragraph-text-rendering: optimizeLegibility;
@@ -345,21 +345,21 @@ $anchor-font-color-hover: darken($primary-color, 5%);
345
345
  $hr-border-width: 1px;
346
346
  $hr-border-style: solid;
347
347
  $hr-border-color: #ddd;
348
- $hr-margin: emCalc(20);
348
+ $hr-margin: em-calc(20);
349
349
 
350
350
  /* We use these to style lists */
351
351
  $list-style-position: outside;
352
352
  $list-side-margin: 0;
353
- $list-nested-margin: emCalc(20);
353
+ $list-nested-margin: em-calc(20);
354
354
  $definition-list-header-weight: bold;
355
355
  $definition-list-header-margin-bottom: .3em;
356
- $definition-list-margin-bottom: emCalc(12);
356
+ $definition-list-margin-bottom: em-calc(12);
357
357
 
358
358
  /* We use these to style blockquotes */
359
359
  $blockquote-font-color: lighten($header-font-color, 30%);
360
- $blockquote-padding: emCalc(9, 20, 0, 19);
360
+ $blockquote-padding: em-calc(9 20 0 19);
361
361
  $blockquote-border: 1px solid #ddd;
362
- $blockquote-cite-font-size: emCalc(13);
362
+ $blockquote-cite-font-size: em-calc(13);
363
363
  $blockquote-cite-font-color: lighten($header-font-color, 20%);
364
364
  $blockquote-cite-link-color: $blockquote-cite-font-color;
365
365
 
@@ -367,8 +367,8 @@ $blockquote-cite-link-color: $blockquote-cite-font-color;
367
367
  $acronym-underline: 1px dotted #ddd;
368
368
 
369
369
  /* We use these to control padding and margin */
370
- $microformat-padding: emCalc(10, 12);
371
- $microformat-margin: emCalc(0, 0, 20, 0);
370
+ $microformat-padding: em-calc(10 12);
371
+ $microformat-margin: em-calc(0 0 20 0);
372
372
 
373
373
  /* We use these to control the border styles */
374
374
  $microformat-border-width: 1px;
@@ -377,13 +377,13 @@ $microformat-border-color: #ddd;
377
377
 
378
378
  /* We use these to control full name font styles */
379
379
  $microformat-fullname-font-weight: bold;
380
- $microformat-fullname-font-size: emCalc(15);
380
+ $microformat-fullname-font-size: em-calc(15);
381
381
 
382
382
  /* We use this to control the summary font styles */
383
383
  $microformat-summary-font-weight: bold;
384
384
 
385
385
  /* We use this to control abbr padding */
386
- $microformat-abbr-padding: emCalc(0, 1);
386
+ $microformat-abbr-padding: em-calc(0 1);
387
387
 
388
388
  /* We use this to control abbr font styles */
389
389
  $microformat-abbr-font-weight: bold;
@@ -4,10 +4,27 @@ require 'sass'
4
4
  map '/assets' do
5
5
  environment = Sprockets::Environment.new
6
6
  environment.append_path File.expand_path('../../scss', __FILE__)
7
+ environment.append_path File.expand_path('../../js', __FILE__)
7
8
  environment.append_path File.expand_path('../css', __FILE__)
8
9
  environment.append_path File.expand_path('../../test/js', __FILE__)
9
- environment.append_path File.expand_path('../../js', __FILE__)
10
10
  environment.append_path File.expand_path('../js', __FILE__)
11
11
  environment.append_path File.expand_path('../img', __FILE__)
12
+
13
+ # environment.css_compressor = YUI::CssCompressor.new
14
+ # environment.js_compressor = Uglifier.new(mangle: true)
15
+
12
16
  run environment
13
17
  end
18
+
19
+ map '/' do
20
+ use Rack::ContentLength
21
+ use Rack::Static,
22
+ :urls => ["/images", "/js", "/css"],
23
+ :root => "public",
24
+ :index => 'index.html'
25
+
26
+ run Rack::File.new("public")
27
+
28
+ end
29
+
30
+
@@ -16,7 +16,7 @@ helpers do
16
16
  elsif Socket.gethostname == "foundation"
17
17
  "http://foundation.zurb.com/docs/assets"
18
18
  else
19
- "http://#{Socket.ip_address_list.detect{|intf| intf.ipv4_private?}.getnameinfo[0]}:4001/assets"
19
+ "/assets"
20
20
  end
21
21
  end
22
22
 
@@ -11,7 +11,7 @@
11
11
  }
12
12
 
13
13
  .CodeRay pre {
14
- margin: 0px;
14
+ margin: 0;
15
15
  font-size: .7em;
16
16
  line-height: 1.4em;
17
17
  white-space: pre-wrap;
@@ -114,4 +114,4 @@ table.CodeRay td {
114
114
  .CodeRay .insert .insert { color: #080; }
115
115
  .CodeRay .delete .delete { color: #800; }
116
116
  .CodeRay .change .change { color: #66f; }
117
- .CodeRay .head .head { color: #f4f; }
117
+ .CodeRay .head .head { color: #f4f; }