zurb-foundation 3.2.5 → 4.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (239) hide show
  1. data/.gitignore +6 -2
  2. data/CHANGELOG.md +1 -26
  3. data/CONTRIBUTING.md +18 -0
  4. data/Gemfile.lock +19 -0
  5. data/Gruntfile.js +27 -0
  6. data/README.md +5 -6
  7. data/{Capfile → docs/Capfile} +0 -1
  8. data/docs/Gemfile +8 -0
  9. data/docs/Gemfile.lock +43 -0
  10. data/docs/Procfile +2 -0
  11. data/docs/README.md +1 -0
  12. data/docs/_sidebar-components.html.erb +109 -0
  13. data/docs/_sidebar.html.erb +109 -0
  14. data/docs/_zurb-jobs.html.erb +5 -0
  15. data/docs/changelog.html.erb +185 -0
  16. data/docs/compile.rb +43 -0
  17. data/docs/components/alert-boxes.html.erb +202 -0
  18. data/docs/components/block-grid.html.erb +118 -0
  19. data/docs/components/breadcrumbs.html.erb +146 -0
  20. data/docs/components/button-groups.html.erb +174 -0
  21. data/docs/components/buttons.html.erb +220 -0
  22. data/docs/components/clearing.html.erb +152 -0
  23. data/docs/components/custom-forms.html.erb +306 -0
  24. data/docs/components/dropdown-buttons.html.erb +233 -0
  25. data/docs/components/dropdown.html.erb +186 -0
  26. data/docs/components/flex-video.html.erb +93 -0
  27. data/docs/components/forms.html.erb +468 -0
  28. data/docs/components/grid.html.erb +355 -0
  29. data/docs/components/inline-lists.html.erb +89 -0
  30. data/docs/components/joyride.html.erb +178 -0
  31. data/docs/components/keystrokes.html.erb +74 -0
  32. data/docs/components/labels.html.erb +98 -0
  33. data/docs/components/magellan.html.erb +84 -0
  34. data/docs/components/orbit.html.erb +262 -0
  35. data/docs/components/pagination.html.erb +181 -0
  36. data/docs/components/panels.html.erb +121 -0
  37. data/docs/components/pricing-tables.html.erb +154 -0
  38. data/docs/components/progress-bars.html.erb +120 -0
  39. data/docs/components/reveal.html.erb +147 -0
  40. data/docs/components/section.html.erb +156 -0
  41. data/docs/components/side-nav.html.erb +122 -0
  42. data/docs/components/split-buttons.html.erb +218 -0
  43. data/docs/components/sub-nav.html.erb +120 -0
  44. data/docs/components/switch.html.erb +288 -0
  45. data/docs/components/tables.html.erb +123 -0
  46. data/docs/components/thumbnails.html.erb +87 -0
  47. data/docs/components/tooltips.html.erb +73 -0
  48. data/docs/components/top-bar.html.erb +219 -0
  49. data/docs/components/type.html.erb +359 -0
  50. data/docs/components/visibility.html.erb +102 -0
  51. data/docs/config.ru +12 -0
  52. data/docs/config/deploy.rb +33 -0
  53. data/docs/controller.rb +43 -0
  54. data/docs/css/_coderay.scss +116 -0
  55. data/docs/css/_settings.scss +1 -0
  56. data/docs/css/docs.scss +174 -0
  57. data/docs/css/normalize.scss +396 -0
  58. data/docs/css/qunit-composite.css +13 -0
  59. data/docs/css/qunit.css +235 -0
  60. data/docs/faq.html.erb +61 -0
  61. data/docs/img/demos/demo1-th.png +0 -0
  62. data/docs/img/demos/demo1.png +0 -0
  63. data/docs/img/demos/demo2-th.png +0 -0
  64. data/docs/img/demos/demo2.png +0 -0
  65. data/docs/img/demos/demo3-th.png +0 -0
  66. data/docs/img/demos/demo3.png +0 -0
  67. data/docs/img/demos/demo4-th.png +0 -0
  68. data/docs/img/demos/demo4.png +0 -0
  69. data/docs/img/demos/demo5-th.png +0 -0
  70. data/docs/img/demos/demo5.png +0 -0
  71. data/docs/index.html.erb +299 -0
  72. data/docs/javascript.html.erb +133 -0
  73. data/docs/js/docs.js +3 -0
  74. data/docs/js/qunit-composite.js +105 -0
  75. data/docs/js/qunit.js +1977 -0
  76. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  77. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  78. data/docs/js/tests/tooltips/tooltips.html +39 -0
  79. data/docs/js/tests/tooltips/tooltips.js +11 -0
  80. data/docs/layout.html.erb +99 -0
  81. data/docs/rails.html.erb +66 -0
  82. data/docs/sass.html.erb +299 -0
  83. data/docs/support.html.erb +134 -0
  84. data/foundation.gemspec +2 -4
  85. data/index.html +3 -23
  86. data/js/foundation/foundation.alerts.js +50 -0
  87. data/js/foundation/foundation.clearing.js +478 -0
  88. data/{vendor/assets/javascripts/foundation/jquery.cookie.js → js/foundation/foundation.cookie.js} +3 -1
  89. data/js/foundation/foundation.dropdown.js +122 -0
  90. data/js/foundation/foundation.forms.js +403 -0
  91. data/js/foundation/foundation.joyride.js +613 -0
  92. data/js/foundation/foundation.js +331 -0
  93. data/js/foundation/foundation.magellan.js +130 -0
  94. data/js/foundation/foundation.orbit.js +355 -0
  95. data/{vendor/assets/javascripts/foundation/jquery.placeholder.js → js/foundation/foundation.placeholder.js} +4 -2
  96. data/js/foundation/foundation.reveal.js +264 -0
  97. data/js/foundation/foundation.section.js +180 -0
  98. data/js/foundation/foundation.tooltips.js +195 -0
  99. data/js/foundation/foundation.topbar.js +187 -0
  100. data/js/foundation/index.js +16 -0
  101. data/{vendor/assets/javascripts/foundation/modernizr.foundation.js → js/vendor/custom.modernizr.js} +0 -0
  102. data/js/vendor/jquery.js +9597 -0
  103. data/js/vendor/zepto.js +1782 -0
  104. data/lib/foundation/engine.rb +8 -1
  105. data/lib/foundation/generators/install_generator.rb +24 -1
  106. data/lib/foundation/generators/templates/application.html.erb +20 -6
  107. data/lib/foundation/generators/templates/application.html.haml +2 -6
  108. data/lib/foundation/generators/templates/application.html.slim +2 -5
  109. data/lib/foundation/version.rb +1 -1
  110. data/lib/zurb-foundation.rb +7 -9
  111. data/package.json +9 -0
  112. data/scss/foundation.scss +42 -15
  113. data/scss/foundation/_foundation-global.scss +226 -0
  114. data/scss/foundation/components/_alert-boxes.scss +106 -0
  115. data/scss/foundation/components/_block-grid.scss +63 -0
  116. data/scss/foundation/components/_breadcrumbs.scss +117 -0
  117. data/scss/foundation/components/_button-groups.scss +59 -0
  118. data/scss/foundation/components/_buttons.scss +217 -0
  119. data/scss/foundation/components/_clearing.scss +209 -0
  120. data/scss/foundation/components/_custom-forms.scss +232 -0
  121. data/scss/foundation/components/_dropdown-buttons.scss +114 -0
  122. data/scss/foundation/components/_dropdown.scss +137 -0
  123. data/scss/foundation/components/_flex-video.scss +45 -0
  124. data/scss/foundation/components/_forms.scss +309 -0
  125. data/scss/foundation/components/_grid.scss +149 -71
  126. data/scss/foundation/components/_inline-lists.scss +47 -0
  127. data/scss/foundation/components/_joyride.scss +193 -0
  128. data/scss/foundation/components/_keystrokes.scss +56 -0
  129. data/scss/foundation/components/_labels.scss +81 -0
  130. data/scss/foundation/components/_magellan.scss +15 -0
  131. data/scss/foundation/components/_orbit.scss +193 -0
  132. data/scss/foundation/components/_pagination.scss +99 -0
  133. data/scss/foundation/components/_panels.scss +76 -0
  134. data/scss/foundation/components/_pricing-tables.scss +130 -0
  135. data/scss/foundation/components/_progress-bars.scss +68 -0
  136. data/scss/foundation/components/_reveal.scss +131 -0
  137. data/scss/foundation/components/_section.scss +194 -0
  138. data/scss/foundation/components/_side-nav.scss +68 -0
  139. data/scss/foundation/components/_split-buttons.scss +159 -0
  140. data/scss/foundation/components/_sub-nav.scss +67 -0
  141. data/scss/foundation/components/_switch.scss +242 -0
  142. data/scss/foundation/components/_tables.scss +80 -0
  143. data/scss/foundation/components/_thumbs.scss +45 -0
  144. data/scss/foundation/components/_tooltips.scss +113 -0
  145. data/scss/foundation/components/_top-bar.scss +443 -0
  146. data/scss/foundation/components/_type.scss +411 -0
  147. data/scss/foundation/components/_visibility.scss +117 -0
  148. data/scss/normalize.scss +396 -0
  149. data/templates/project/config.rb +26 -0
  150. data/templates/project/index.html +28 -43
  151. data/templates/project/manifest.rb +21 -28
  152. data/templates/project/scss/_settings.scss +4 -243
  153. data/templates/project/scss/app.scss +37 -44
  154. data/templates/project/scss/normalize.scss +396 -0
  155. data/test/stylesheets/styles.css +955 -0
  156. metadata +144 -153
  157. data/config/deploy.rb +0 -42
  158. data/lib/foundation/generators/layout_generator.rb +0 -28
  159. data/scss/foundation/_settings.scss +0 -281
  160. data/scss/foundation/common/_base.scss +0 -4
  161. data/scss/foundation/common/_forms.scss +0 -117
  162. data/scss/foundation/common/_globals.scss +0 -35
  163. data/scss/foundation/common/_ratios.scss +0 -19
  164. data/scss/foundation/common/_typography.scss +0 -104
  165. data/scss/foundation/components/modules/_all.scss +0 -10
  166. data/scss/foundation/components/modules/_buttons.scss +0 -178
  167. data/scss/foundation/components/modules/_clearing.scss +0 -61
  168. data/scss/foundation/components/modules/_joyride.scss +0 -33
  169. data/scss/foundation/components/modules/_mqueries.scss +0 -458
  170. data/scss/foundation/components/modules/_navbar.scss +0 -74
  171. data/scss/foundation/components/modules/_offcanvas.scss +0 -55
  172. data/scss/foundation/components/modules/_orbit.scss +0 -90
  173. data/scss/foundation/components/modules/_reveal.scss +0 -34
  174. data/scss/foundation/components/modules/_tabs.scss +0 -67
  175. data/scss/foundation/components/modules/_topbar.scss +0 -167
  176. data/scss/foundation/components/modules/_ui.scss +0 -292
  177. data/scss/foundation/functions/_all.scss +0 -2
  178. data/scss/foundation/functions/_convert-number-to-word.scss +0 -10
  179. data/scss/foundation/functions/_grid-calc.scss +0 -5
  180. data/scss/foundation/functions/modular-scale.scss +0 -3
  181. data/scss/foundation/mixins/_all.scss +0 -5
  182. data/scss/foundation/mixins/_clearfix.scss +0 -13
  183. data/scss/foundation/mixins/_css-triangle.scss +0 -22
  184. data/scss/foundation/mixins/_font-size.scss +0 -13
  185. data/scss/foundation/mixins/_respond-to.scss +0 -11
  186. data/scss/foundation/mixins/_semantic-grid.scss +0 -66
  187. data/test/buttons.html +0 -189
  188. data/test/clearing.html +0 -85
  189. data/test/config.rb +0 -11
  190. data/test/elements.html +0 -490
  191. data/test/forms.html +0 -371
  192. data/test/grid.html +0 -543
  193. data/test/images/orbit-demo/demo1.jpeg +0 -0
  194. data/test/images/orbit-demo/demo2.jpeg +0 -0
  195. data/test/images/orbit-demo/demo3.jpeg +0 -0
  196. data/test/images/orbit-demo/slider-background.jpeg +0 -0
  197. data/test/index.html +0 -83
  198. data/test/joyride.html +0 -127
  199. data/test/magellan.html +0 -112
  200. data/test/navigation.html +0 -269
  201. data/test/orbit.html +0 -112
  202. data/test/reveal.html +0 -91
  203. data/test/scss/_settings.scss +0 -245
  204. data/test/scss/styles.scss +0 -50
  205. data/test/tabs.html +0 -197
  206. data/test/template.html +0 -52
  207. data/test/topbar-login.html +0 -194
  208. data/test/topbar.html +0 -139
  209. data/test/type.html +0 -188
  210. data/vendor/assets/images/foundation/orbit/bullets.jpg +0 -0
  211. data/vendor/assets/images/foundation/orbit/left-arrow-small.png +0 -0
  212. data/vendor/assets/images/foundation/orbit/left-arrow.png +0 -0
  213. data/vendor/assets/images/foundation/orbit/loading.gif +0 -0
  214. data/vendor/assets/images/foundation/orbit/mask-black.png +0 -0
  215. data/vendor/assets/images/foundation/orbit/pause-black.png +0 -0
  216. data/vendor/assets/images/foundation/orbit/right-arrow-small.png +0 -0
  217. data/vendor/assets/images/foundation/orbit/right-arrow.png +0 -0
  218. data/vendor/assets/images/foundation/orbit/rotator-black.png +0 -0
  219. data/vendor/assets/images/foundation/orbit/timer-black.png +0 -0
  220. data/vendor/assets/javascripts/foundation/app.js +0 -41
  221. data/vendor/assets/javascripts/foundation/index.js +0 -19
  222. data/vendor/assets/javascripts/foundation/jquery.event.move.js +0 -580
  223. data/vendor/assets/javascripts/foundation/jquery.event.swipe.js +0 -130
  224. data/vendor/assets/javascripts/foundation/jquery.foundation.accordion.js +0 -47
  225. data/vendor/assets/javascripts/foundation/jquery.foundation.alerts.js +0 -20
  226. data/vendor/assets/javascripts/foundation/jquery.foundation.buttons.js +0 -83
  227. data/vendor/assets/javascripts/foundation/jquery.foundation.clearing.js +0 -413
  228. data/vendor/assets/javascripts/foundation/jquery.foundation.forms.js +0 -502
  229. data/vendor/assets/javascripts/foundation/jquery.foundation.joyride.js +0 -639
  230. data/vendor/assets/javascripts/foundation/jquery.foundation.magellan.js +0 -96
  231. data/vendor/assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js +0 -27
  232. data/vendor/assets/javascripts/foundation/jquery.foundation.navigation.js +0 -55
  233. data/vendor/assets/javascripts/foundation/jquery.foundation.orbit.js +0 -919
  234. data/vendor/assets/javascripts/foundation/jquery.foundation.reveal.js +0 -794
  235. data/vendor/assets/javascripts/foundation/jquery.foundation.tabs.js +0 -66
  236. data/vendor/assets/javascripts/foundation/jquery.foundation.tooltips.js +0 -211
  237. data/vendor/assets/javascripts/foundation/jquery.foundation.topbar.js +0 -174
  238. data/vendor/assets/javascripts/foundation/jquery.js +0 -9555
  239. data/vendor/assets/javascripts/foundation/jquery.offcanvas.js +0 -50
@@ -0,0 +1,123 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Tables" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Okay, they're not the sexiest things ever, but tables get the job done (for tabular data, of course).</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <table>
16
+ <thead>
17
+ <tr>
18
+ <th width="200">Table Header</th>
19
+ <th>Table Header</th>
20
+ <th width="150">Table Header</th>
21
+ <th width="150">Table Header</th>
22
+ </tr>
23
+ </thead>
24
+ <tbody>
25
+ <tr>
26
+ <td>Content Goes Here</td>
27
+ <td>This is longer content Donec id elit non mi porta gravida at eget metus.</td>
28
+ <td>Content Goes Here</td>
29
+ <td>Content Goes Here</td>
30
+ </tr>
31
+ <tr>
32
+ <td>Content Goes Here</td>
33
+ <td>This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.</td>
34
+ <td>Content Goes Here</td>
35
+ <td>Content Goes Here</td>
36
+ </tr>
37
+ <tr>
38
+ <td>Content Goes Here</td>
39
+ <td>This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.</td>
40
+ <td>Content Goes Here</td>
41
+ <td>Content Goes Here</td>
42
+ </tr>
43
+ </tbody>
44
+ </table>
45
+
46
+ <hr>
47
+
48
+ <h3>Build With Predefined HTML Classes</h3>
49
+ <p>Tables are built from a mixin, but since tables don't rely on any classes to build, you can use the table element and customize with your CSS. If you are using SCSS, the variables will help you customize the look and feel.</p>
50
+
51
+ <%= code_example '
52
+ <table>
53
+ <thead>
54
+ <tr>
55
+ <th width="200">Table Header</th>
56
+ <th>Table Header</th>
57
+ <th width="150">Table Header</th>
58
+ <th width="150">Table Header</th>
59
+ </tr>
60
+ </thead>
61
+ <tbody>
62
+ <tr>
63
+ <td>Content Goes Here</td>
64
+ <td>This is longer content Donec id elit non mi porta gravida at eget metus.</td>
65
+ <td>Content Goes Here</td>
66
+ <td>Content Goes Here</td>
67
+ </tr>
68
+ <tr>
69
+ <td>Content Goes Here</td>
70
+ <td>This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.</td>
71
+ <td>Content Goes Here</td>
72
+ <td>Content Goes Here</td>
73
+ </tr>
74
+ <tr>
75
+ <td>Content Goes Here</td>
76
+ <td>This is longer Content Goes Here Donec id elit non mi porta gravida at eget metus.</td>
77
+ <td>Content Goes Here</td>
78
+ <td>Content Goes Here</td>
79
+ </tr>
80
+ </tbody>
81
+ </table>', :html %>
82
+
83
+ <hr>
84
+
85
+ <h5>Default SCSS Variables</h5>
86
+
87
+ <%= code_example '
88
+ /* These control the background color for the table and even rows */
89
+ $table-bg: #fff;
90
+ $table-even-row-bg: #f9f9f9;
91
+
92
+ /* These control the table cell border style */
93
+ $table-border-style: solid;
94
+ $table-border-size: 1px;
95
+ $table-border-color: #ddd;
96
+
97
+ /* These control the table head styles */
98
+ $table-head-bg: #f5f5f5;
99
+ $table-head-font-size: emCalc(14px);
100
+ $table-head-font-color: #222;
101
+ $table-head-font-weight: bold;
102
+ $table-head-padding: emCalc(8px) emCalc(10px) emCalc(10px);
103
+
104
+ /* These control the row padding and font styles */
105
+ $table-row-padding: emCalc(9px) emCalc(10px);
106
+ $table-row-font-size: emCalc(14px);
107
+ $table-row-font-color: #222;
108
+ $table-line-height: emCalc(18px);
109
+
110
+ /* These are for controlling the display and margin of tables */
111
+ $table-display: table-cell;
112
+ $table-margin-bottom: emCalc(20px);', :css %>
113
+
114
+ <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>_foundation-global.scss</strong>.</p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div class="large-3 pull-9 columns">
121
+ <%= render "_sidebar-components.html.erb" %>
122
+ </div>
123
+ </div>
@@ -0,0 +1,87 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Thumbnails" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">If you are going to use an image as an anchor, we got you covered. All you gotta do is wrap an <code>a.th</code> around your image and voilà!</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <a class="th" href="../img/demos/demo1.png"><img src="../img/demos/demo1-th.png"></a>
16
+
17
+ <hr>
18
+
19
+ <h3>Building With Predefined HTML Class</h3>
20
+ <p>We make it really easy to create thumbnails links out of images. Simply wrap your <code>&lt;img&gt;</code> inside a <code>&lt;a class="th"&gt;</code> and you're good to go! You may alternately choose to add a class of <code>.radius</code> to give it a neat little border-radius.</p>
21
+
22
+ <%= code_example '
23
+ <a class="th radius" href="../img/demos/demo2.png">
24
+ <img src="../img/demos/demo2-th.png">
25
+ </a>', :html %>
26
+
27
+ <a class="th radius" href="../img/demos/demo2.png"><img src="../img/demos/demo2-th.png"></a>
28
+
29
+ <hr>
30
+
31
+ <h3>Build with our Mixins</h3>
32
+ <p>We've included SCSS mixins used to style labels. To use the mixin, you'll need to have the <a href="#extention-install">extension installed</a> or grab <a href="#">_foundation-global.scss</a> and <a href="#">_thumbs.scss</a> from Github and throw them into a Foundation folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
33
+
34
+ <%= code_example '
35
+ @import "foundation/foundation-global", "foundation/labels";
36
+ ', :css %>
37
+
38
+ <h5>Quick Mixin</h5>
39
+ <p>You can build your labels using our global mixin by including it on your custom class or ID in your own stylesheet. The mixin contains options for changing the background color, which also controls the border and text color. You'll also have the ability to change the font-size and padding. The rest of the defaults can be modified using the available variables. The global mixin looks like this:</p>
40
+
41
+ <%= code_example '
42
+ /* Using the default styles */
43
+ .your-class-name { @include thumb; }', :css %>
44
+
45
+ <p><a class="th" href="../img/demos/demo3.png"><img src="../img/demos/demo3-th.png"></a></p>
46
+
47
+ <p>There are also three options you can customize on the fly when writing this mixin. These controls things like: border-width and hover styles for the box-shadow.</p>
48
+
49
+ <%= code_example '
50
+ /* Using the available options */
51
+ .your-class-name { @include thumb($border-width, $box-shadow, $box-shadow-hover); }
52
+
53
+ /* Control the width of the white area around the thumnails */
54
+ $border-width: $thumb-border-width
55
+
56
+ /* Control the default box-shadow that looks like a 1px border */
57
+ $box-shadow: $thumb-box-shadow
58
+
59
+ /* Change up the style of that box-shadow on hover */
60
+ $box-shadow-hover: $thumb-box-shadow-hover
61
+ ', :css %>
62
+
63
+ <p>You can also add the radius and single-transition mixin on top of this to create even more versatility!</p>
64
+
65
+ <p><a class="th-custom" href="../img/demos/demo4.png"><img src="../img/demos/demo4-th.png"></a></p>
66
+
67
+ <h5>Default SCSS Variables</h5>
68
+
69
+ <%= code_example '
70
+ /* We use these to control border styles */
71
+ $thumb-border-style: solid;
72
+ $thumb-border-width: 4px;
73
+ $thumb-border-color: #fff;
74
+ $thumb-box-shadow: 0 0 0 1px rgba(#000,.2);
75
+ $thumb-box-shadow-hover: 0 0 6px 1px rgba($primary-color,0.5);
76
+
77
+ /* Radius and transition speed for thumbs */
78
+ $thumb-radius: $global-radius;
79
+ $thumb-transition-speed: 200ms;', :css %>
80
+
81
+ </div>
82
+ </div>
83
+ </div>
84
+ <div class="large-3 pull-9 columns">
85
+ <%= render "_sidebar-components.html.erb" %>
86
+ </div>
87
+ </div>
@@ -0,0 +1,73 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Tooltips" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Tooltips are a quick way to provide <span data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!">extended information</span> on a term or action on a page.</h4>
9
+
10
+ <hr>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+ <a name="tooltips"></a>
17
+ <h4>Building With HTML Classes</h4>
18
+ <p>Tooltips work cross browser and cross platform and are easily added to a page with a simple markup and class structure. You can apply the <strong>has-tip</strong> class to any element.</p>
19
+
20
+ <p>By default, the tooltip takes the width of the element that it is applied to, but you can override this behavior by applying a <strong>data-width</strong> attribute to the target element. The tooltip takes on the content of the targets <strong>title</strong> attribute.</p>
21
+
22
+ <p>The tooltips can be positioned on the <span data-tooltip class="has-tip" data-width="210" title="I'm on bottom and the default position.">"tip-bottom"</span>, which is the default position, <span data-tooltip class="has-tip tip-top noradius" data-width="210" title="I'm on the top and I'm not rounded!">"tip-top" (hehe)</span>, <span data-tooltip="left" class="has-tip tip-left" data-width="90" title="I'm on the left!">"tip-left"</span>, or <span data-tooltip="right" class="has-tip tip-right" data-width="120" title="I'm on the right!">"tip-right"</span> of the target element by adding the appropriate class to them. You can even add your own custom class to style each tip differently. On a small device, the tooltips are full width and bottom aligned.</p>
23
+
24
+ <%= code_example '
25
+ <span data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!">extended information</span>
26
+ ', :html %>
27
+
28
+ <p>Available class options:</p>
29
+ <ul class="disc">
30
+ <li><code>tip-top</code>: Align the tip above the element you attach it to.</li>
31
+ <li><code>tip-bottom</code>: Align the tip below the element you attach it to.</li>
32
+ <li><code>tip-left</code>: Align the tip to the left the element you attach it to.</li>
33
+ <li><code>tip-right</code>: Align the tip to the right the element you attach it to.</li>
34
+ </ul>
35
+
36
+ <hr>
37
+
38
+ <h3>Using the Javascript</h3>
39
+ <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>
40
+
41
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
42
+
43
+ <p>Required Foundation Library: <code>foundation.tooltips.js</code></p>
44
+
45
+ <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
46
+
47
+ <%= code_example '
48
+ <span data-tooltip class="has-tip" title="Tooltips are awesome, you should totally use them!">...</span>
49
+ ', :html %>
50
+
51
+ <h5>Optional JavaScript Configuration</h5>
52
+
53
+ <p>Tooltip options can only be passed in during initialization at this time.</p>
54
+
55
+ <%= code_example "
56
+ {
57
+ selector : '.has-tip',
58
+ additionalInheritableClasses : [],
59
+ tooltipClass : '.tooltip',
60
+ tipTemplate : function (selector, content) {
61
+ return '<span data-selector=\"' + selector + '\" class=\"'
62
+ + Foundation.libs.tooltips.settings.tooltipClass.substring(1)
63
+ + '\">' + content + '<span class=\"nub\"></span></span>';
64
+ }
65
+ }", :json %>
66
+
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="large-3 pull-9 columns">
71
+ <%= render "_sidebar-components.html.erb" %>
72
+ </div>
73
+ </div>
@@ -0,0 +1,219 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Top Bar" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h1><%= @page_title %></h1>
8
+ <h4 class="subheader">The Foundation Top Bar gives you a great way to display a complex navigation bar on small or large screens.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <p>The topbar is only designed to have one per page, so we can't include a demo on this page due to the fact that we have one on the page already. Take a look at the code we have below and checkout our topbar to get a feel for how it works. The only thing about the one on this page is it doesn't have a dropdown.</p>
16
+ <hr>
17
+
18
+ <h3>Build With HTML Classes</h3>
19
+ <p>The top bar is a pretty complex piece of magical UI goodness, which makes it really difficult to create a mixin from it. We rely on many presentational classes to accomplish the styles and there's a lot happening in the JS.</p>
20
+
21
+ <h5>Basic Needs</h5>
22
+ <p>The top bar has four main elements, three of which are needed for proper functionality: <code>ul.title-area</code>, one of the section <code>ul class="right/left</code> elements and the <code>li.toggle-topbar</code> element that will expand the menu in the mobile layout. You can leave out the li class="name" as long as you include the .toggle-topbar element.</p>
23
+
24
+ <h5>Positioning the Bar</h5>
25
+ <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>
26
+
27
+ <h5>Building the Nav</h5>
28
+ <p>When building your bar it is good to be aware of how many links your'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>
29
+
30
+ <h5>Other Elements</h5>
31
+ <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-button</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>
32
+
33
+ <h5>Sticky Top Bar</h5>
34
+ <p>You may also wrap your top bar in <code>div class="contain-to-grid sticky"</code> and put it anywhere within your markup. When the navigation hits the top of the browser, it will act like the fixed top bar and stick to the top as users continue to scroll.</p>
35
+
36
+ <%= code_example '
37
+ <nav class="top-bar">
38
+ <ul class="title-area">
39
+ <!-- Title Area -->
40
+ <li class="name">
41
+ <h1><a href="#">Top Bar Title </a></h1>
42
+ </li>
43
+ <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
44
+ <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
45
+ </ul>
46
+
47
+ <section class="top-bar-section">
48
+ <!-- Left Nav Section -->
49
+ <ul class="left">
50
+ <li class="divider"></li>
51
+ <li class="active"><a href="#">Main Item 1</a></li>
52
+ <li class="divider"></li>
53
+ <li><a href="#">Main Item 2</a></li>
54
+ <li class="divider"></li>
55
+ <li class="has-dropdown"><a href="#">Main Item 3</a>
56
+
57
+ <ul class="dropdown">
58
+ <li class="has-dropdown"><a href="#">Dropdown Level 1a</a>
59
+
60
+ <ul class="dropdown">
61
+ <li><label>Dropdown Level 2 Label</label></li>
62
+ <li><a href="#">Dropdown Level 2a</a></li>
63
+ <li><a href="#">Dropdown Level 2b</a></li>
64
+ <li class="has-dropdown"><a href="#">Dropdown Level 2c</a>
65
+
66
+ <ul class="dropdown">
67
+ <li><label>Dropdown Level 3 Label</label></li>
68
+ <li><a href="#">Dropdown Level 3a</a></li>
69
+ <li><a href="#">Dropdown Level 3b</a></li>
70
+ <li class="divider"></li>
71
+ <li><a href="#">Dropdown Level 3c</a></li>
72
+ </ul>
73
+ </li>
74
+ <li><a href="#">Dropdown Level 2d</a></li>
75
+ <li><a href="#">Dropdown Level 2e</a></li>
76
+ <li><a href="#">Dropdown Level 2f</a></li>
77
+ </ul>
78
+ </li>
79
+ <li><a href="#">Dropdown Level 1b</a></li>
80
+ <li><a href="#">Dropdown Level 1c</a></li>
81
+ <li class="divider"></li>
82
+ <li><a href="#">Dropdown Level 1d</a></li>
83
+ <li><a href="#">Dropdown Level 1e</a></li>
84
+ <li><a href="#">Dropdown Level 1f</a></li>
85
+ <li class="divider"></li>
86
+ <li><a href="#">See all &rarr;</a></li>
87
+ </ul>
88
+ </li>
89
+ <li class="divider"></li>
90
+ </ul>
91
+
92
+ <!-- Right Nav Section -->
93
+ <ul class="right">
94
+ <li class="divider hide-for-small"></li>
95
+ <li class="has-dropdown"><a href="#">Main Item 4</a>
96
+
97
+ <ul class="dropdown">
98
+ <li><label>Dropdown Level 1 Label</label></li>
99
+ <li class="has-dropdown"><a href="#" class="">Dropdown Level 1a</a>
100
+
101
+ <ul class="dropdown">
102
+ <li><a href="#">Dropdown Level 2a</a></li>
103
+ <li><a href="#">Dropdown Level 2b</a></li>
104
+ <li class="has-dropdown"><a href="#">Dropdown Level 2c</a>
105
+
106
+ <ul class="dropdown">
107
+ <li><a href="#">Dropdown Level 3a</a></li>
108
+ <li><a href="#">Dropdown Level 3b</a></li>
109
+ <li><a href="#">Dropdown Level 3c</a></li>
110
+ </ul>
111
+ </li>
112
+ <li><a href="#">Dropdown Level 2d</a></li>
113
+ <li><a href="#">Dropdown Level 2e</a></li>
114
+ <li><a href="#">Dropdown Level 2f</a></li>
115
+ </ul>
116
+ </li>
117
+ <li><a href="#">Dropdown Level 1b</a></li>
118
+ <li><a href="#">Dropdown Level 1c</a></li>
119
+ <li class="divider"></li>
120
+ <li><label>Dropdown Level 1 Label</label></li>
121
+ <li><a href="#">Dropdown Level 1d</a></li>
122
+ <li><a href="#">Dropdown Level 1e</a></li>
123
+ <li><a href="#">Dropdown Level 1f</a></li>
124
+ <li class="divider"></li>
125
+ <li><a href="#">See all &rarr;</a></li>
126
+ </ul>
127
+ </li>
128
+ <li class="divider"></li>
129
+ <li class="has-form">
130
+ <form>
131
+ <div class="row collapse">
132
+ <div class="small-8 columns">
133
+ <input type="text">
134
+ </div>
135
+ <div class="small-4 columns">
136
+ <a href="#" class="alert button">Search</a>
137
+ </div>
138
+ </div>
139
+ </form>
140
+ </li>
141
+ <li class="divider show-for-small"></li>
142
+ <li class="has-form">
143
+ <a class="button" href="#">Button!</a>
144
+ </li>
145
+ </ul>
146
+ </section>
147
+ </nav>', :html %>
148
+
149
+ <h4>Available SCSS Variables</h4>
150
+ <p>We do include SCSS variable to help you control some of the styles for the top bar. Overall the styles are written mobile first, so they are much easier to override than the previous iteration of the top bar.</p>
151
+
152
+ <%= code_example '
153
+ /* Background color for the top bar */
154
+ $topbar-bg: #111;
155
+
156
+ /* Height and margin */
157
+ $topbar-height: 45px;
158
+ $topbar-margin-bottom: emCalc(30px);
159
+
160
+ /* Control Input height for top bar */
161
+ $topbar-input-height: 2.45em;
162
+
163
+ /* Controlling the styles for the title in the top bar */
164
+ $topbar-title-weight: bold;
165
+ $topbar-title-font-size: emCalc(17px);
166
+
167
+ /* Set the link colors and styles for top-level nav */
168
+ $topbar-link-color: #fff;
169
+ $topbar-link-weight: bold;
170
+ $topbar-link-font-size: emCalc(13px);
171
+
172
+ /* Style the top bar dropdown elements */
173
+ $topbar-dropdown-bg: #333;
174
+ $topbar-dropdown-link-color: #fff;
175
+ $topbar-dropdown-toggle-size: 5px;
176
+ $topbar-dropdown-toggle-color: #fff;
177
+ $topbar-dropdown-toggle-alpha: 0.5;
178
+
179
+ /* Top menu icon styles */
180
+ $topbar-menu-link-transform: uppercase;
181
+ $topbar-menu-link-font-size: emCalc(13px);
182
+ $topbar-menu-link-weight: bold;
183
+ $topbar-menu-link-color: #fff;
184
+ $topbar-menu-icon-color: #fff;
185
+ $topbar-menu-link-color-toggled: #888;
186
+ $topbar-menu-icon-color-toggled: #888;
187
+
188
+ /* Transitions and breakpoint styles */
189
+ $topbar-transition-speed: 300ms;
190
+ $topbar-breakpoint: emCalc(940px); // Change to 9999px for always mobile layout', :css %>
191
+
192
+ <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>_foundation-global.scss</strong>.</p>
193
+
194
+ <hr>
195
+
196
+ <h3>Using the JavaScript</h3>
197
+ <p>You don't need ths JS to create reveal modals with Foundation. The only reason you'll need to include <code>foundation.reveal.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>
198
+
199
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
200
+
201
+ <p>Required Foundation Library: <code>foundation.topbar.js</code></p>
202
+
203
+ <h5>Optional JavaScript Configuration</h5>
204
+
205
+ <p>Top bar options can only be passed in during initialization at this time.</p>
206
+
207
+ <%= code_example "
208
+ {
209
+ index : 0,
210
+ stickyClass : 'sticky',
211
+ init : false
212
+ }", :json %>
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div class="large-3 pull-9 columns">
217
+ <%= render "_sidebar-components.html.erb" %>
218
+ </div>
219
+ </div>