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,120 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Progress Bars" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader"><p>A simple way to add a progress bars to your layouts. You only need two HTML elements to make them and they're easy to customize.</h4>
9
+
10
+ <div class="progress large-6"><span class="meter" style="width: 40%"></span></div>
11
+ <div class="radius progress success large-8"><span class="meter" style="width: 80%"></span></div>
12
+ <div class="nice round progress alert large-10"><span class="meter" style="width: 30%"></span></div>
13
+ <div class="nice secondary progress"><span class="meter" style="width: 50%"></span></div>
14
+
15
+ <hr>
16
+ </div>
17
+ </div>
18
+
19
+ <div class="row">
20
+ <div class="large-12 columns">
21
+
22
+ <h3>Build With Predefined HTML Classes</h3>
23
+ <p>There are two ways to add progress bars labels in Foundation 4: with our predefined HTML classes or with our mixins. Building progress bars using our predefined classes is simple, you'll just need to write a <code>&lt;div class="progress"&gt;</code> and inside of that a <code>&lt;span class="meter"&gt;</code>. The meter is the element that you can set a width to, either inline or programatically on your own accord. The simplest way to do this is to change the <code>style="width:%"</code> property on the meter, itself.</p>
24
+
25
+ <%= code_example '
26
+ <div class="progress"><span class="meter"></span></div>', :html %>
27
+
28
+ <div class="progress"><span class="meter"></span></div>
29
+
30
+ <p>The class options:</p>
31
+ <ul class="disc">
32
+ <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
33
+ <li>The radius classes include: <code>.radius</code> or <code>.round</code>.</li>
34
+ <li>You may also you the grid width classes: <code>.small-#</code> or <code>.large-#</code></li>
35
+ </ul>
36
+
37
+ <%= code_example '
38
+ <div class="progress large-6 success round"><span class="meter" style="width: 40%"></span></div>', :html %>
39
+
40
+ <div class="progress large-6 success round"><span class="meter" style="width: 40%"></span></div>
41
+
42
+ <p>For these styles to come across, make sure you have the default Foundation CSS package or that you've selected labels from a custom package. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
43
+
44
+ <hr>
45
+
46
+ <h3>Build with our Mixins</h3>
47
+ <p>We've included SCSS mixins used to style progress bars. 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="#">_progress-bars.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>
48
+
49
+ <%= code_example '
50
+ @import "foundation/foundation-global", "foundation/labels";
51
+ ', :css %>
52
+
53
+ <h5>Container Mixin</h5>
54
+ <p>Progress bars are made from a container and a meter. The container element holds most of the styles that come across and holds the meter, itself. You can create progress bars by creating a <code>&lt;div&gt;</code> and giving it a unique class or ID, then applying the mixin styles to it.</p>
55
+
56
+ <%= code_example '
57
+ .your-class-name { @include progress-container; }', :css %>
58
+
59
+ <div class="progress"></div>
60
+
61
+ <h5>Meter Mixin</h5>
62
+ <p>The next step is to include an element inside of your container that will be styled as the meter.
63
+
64
+ <%= code_example '
65
+ .your-class-name { @include progress-container;
66
+ & > span { @include progress-meter($bg); }
67
+ }
68
+
69
+ /* We can set the background color of the meter to a variable or any color value */
70
+ $bg: $primary-color
71
+ ', :css %>
72
+
73
+ <div class="progress"><span class="meter"></span></div>
74
+
75
+ <h5>Adding Border Radius</h5>
76
+ <p>Like we mentioned on a few of the other component pages, you have access to some global mixins that can add even more style to elements like this. Here's an example of using border radius:</p>
77
+
78
+ <%= code_example '
79
+ .your-class-name {
80
+ @include progress-container;
81
+ @include radius(6px);
82
+ & > span {
83
+ @include progress-meter(pink);
84
+ @include radius(5px);
85
+ }
86
+ }', :css %>
87
+
88
+ <div class="progress-custom"><span style="width:33%"></span></div>
89
+
90
+ <h5>Default SCSS Variables</h5>
91
+
92
+ <%= code_example '
93
+ /* We use this to se the prog bar height */
94
+ $progress-bar-height: emCalc(25px);
95
+
96
+ /* We use these to control the border styles */
97
+ $progress-bar-border-color: darken(#fff, 20%);
98
+ $progress-bar-border-size: 1px;
99
+ $progress-bar-border-style: solid;
100
+ $progress-bar-border-radius: $button-radius;
101
+
102
+ /* We use these to control the margin & padding */
103
+ $progress-bar-pad: emCalc(2px);
104
+ $progress-bar-margin-bottom: emCalc(10px);
105
+
106
+ /* We use these to set the meter colors */
107
+ $progress-meter-color: $primary-color;
108
+ $progress-meter-secondary-color: $secondary-color;
109
+ $progress-meter-success-color: $success-color;
110
+ $progress-meter-alert-color: $alert-color;', :css %>
111
+
112
+ <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>
113
+
114
+ </div>
115
+ </div>
116
+ </div>
117
+ <div class="large-3 pull-9 columns">
118
+ <%= render "_sidebar-components.html.erb" %>
119
+ </div>
120
+ </div>
@@ -0,0 +1,147 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Reveal" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Modal dialogs, or pop-up windows, are handy for prototyping and production. Foundation includes Reveal our jQuery modal plugin, to make this easy for you.</h4>
9
+
10
+ <a href="#" data-reveal-id="firstModal" class="radius button">Example Modal&hellip;</a>
11
+ <a href="#" data-reveal-id="videoModal" class="radius button">Example Modal w/Video&hellip;</a>
12
+
13
+ <hr>
14
+
15
+ </div>
16
+ </div>
17
+
18
+ <div class="row">
19
+ <div class="large-12 columns">
20
+
21
+ <h3>Build With HTML Classes</h3>
22
+ <p>Reveal modals are easy to build, just make sure they live right above your closing <code>body</code> tag or they won't work properly. Follow the markup below to get started:</p>
23
+
24
+ <%= code_example '
25
+ <div id="myModal" class="reveal-modal">
26
+ <h2>Awesome. I have it.</h2>
27
+ <p class="lead">Your couch. It is mine.</p>
28
+ <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
29
+ <a class="close-reveal-modal">&#215;</a>
30
+ </div>', :html %>
31
+
32
+ <p>The class options:</p>
33
+ <ul class="disc">
34
+ <li><code>tiny</code>: Set the width to 30%.</li>
35
+ <li><code>small</code>: Set the width to 40%.</li>
36
+ <li><code>medium</code>: Set the width to 60%.</li>
37
+ <li><code>large</code>: Set the width to 70%.</li>
38
+ <li><code>xlarge</code>: Set the width to 95%.</li>
39
+ </ul>
40
+
41
+ <p>For these styles to come across, make sure you have the default Foundation CSS package or that you've selected reveal from a custom package. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
42
+
43
+ <h5>Firing a Reveal Modal</h5>
44
+ <p>To launch a modal, just add a <code>data-reveal-id</code> to the object which you want to fire the modal when clicked. The <code>data-reveal-id</code> needs to match the <code>id</code> of your reveal.</p>
45
+
46
+ <%= code_example '
47
+ <a href="#" data-reveal-id="myModal">Click Me For A Modal</a>', :html %>
48
+
49
+ <hr>
50
+
51
+ <h5>Default SCSS Variables</h5>
52
+
53
+ <%= code_example '
54
+ /* We use these to control the style of the reveal overlay. */
55
+ $reveal-overlay-bg: rgba(#000, .45);
56
+ $reveal-overlay-bg-old: #000;
57
+
58
+ /* We use these to control the style of the modal itself. */
59
+ $reveal-modal-bg: #fff;
60
+ $reveal-position-top: emCalc(15px);
61
+ $reveal-default-width: 80%;
62
+ $reveal-modal-padding: emCalc(20px);
63
+ $reveal-box-shadow: 0 0 10px rgba(#000,.4);
64
+
65
+ /* We use these to style the reveal close button */
66
+ $reveal-close-font-size: emCalc(22px);
67
+ $reveal-close-top: emCalc(8px);
68
+ $reveal-close-side: emCalc(11px);
69
+ $reveal-close-color: #aaa;
70
+ $reveal-close-weight: bold;
71
+
72
+ /* We use these to control the modal border */
73
+ $reveal-border-style: solid;
74
+ $reveal-border-width: 1px;
75
+ $reveal-border-color: #666;', :css %>
76
+
77
+ <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>
78
+
79
+ <hr>
80
+
81
+ <h3>Using the JavaScript</h3>
82
+ <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>
83
+
84
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
85
+
86
+ <p>Required Foundation Library: <code>foundation.reveal.js</code></p>
87
+
88
+ <h5>Optional JavaScript Configuration</h5>
89
+
90
+ <p>Reveal options can only be passed in during initialization at this time. However, you can bind to the <i>open</i>, <i>opened</i>, <i>close</i>, and <i>closed</i> events.</p>
91
+
92
+ <%= code_example "
93
+ {
94
+ animation: 'fadeAndPop',
95
+ animationSpeed: 250,
96
+ closeOnBackgroundClick: true,
97
+ dismissModalClass: 'close-reveal-modal',
98
+ bgClass: 'reveal-modal-bg',
99
+ open: function(){},
100
+ opened: function(){},
101
+ close: function(){},
102
+ closed: function(){},
103
+ bg : $('.reveal-modal-bg'),
104
+ css : {
105
+ open : {
106
+ 'opacity': 0,
107
+ 'visibility': 'visible',
108
+ 'display' : 'block'
109
+ },
110
+ close : {
111
+ 'opacity': 1,
112
+ 'visibility': 'hidden',
113
+ 'display': 'none'
114
+ }
115
+ }
116
+ }", :json %>
117
+
118
+ </div>
119
+ </div>
120
+
121
+ <div id="firstModal" class="reveal-modal">
122
+ <h2>This is a modal.</h2>
123
+ <p>Reveal makes these very easy to summon and dismiss. The close button is simply an anchor with a unicode character icon and a class of <code>close-reveal-modal</code>. Clicking anywhere outside the modal will also dismiss it.</p>
124
+ <p>Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.</p>
125
+ <p><a href="#" data-reveal-id="secondModal" class="secondary button">Second Modal…</a></p>
126
+ <a class="close-reveal-modal">&#215;</a>
127
+ </div>
128
+
129
+ <div id="secondModal" class="reveal-modal">
130
+ <h2>This is a second modal.</h2>
131
+ <p>See? It just slides into place after the other first modal. Very handy when you need subsequent dialogs, or when a modal option impacts or requires another decision.</p>
132
+ <a class="close-reveal-modal">&#215;</a>
133
+ </div>
134
+
135
+ <div id="videoModal" class="reveal-modal large">
136
+ <h2>This modal has video</h2>
137
+ <div class="flex-video">
138
+ <iframe width="800" height="315" src="http://www.youtube.com/embed/IkOQw96cfyE" frameborder="0" allowfullscreen></iframe>
139
+ </div>
140
+
141
+ <a class="close-reveal-modal">&#215;</a>
142
+ </div>
143
+ </div>
144
+ <div class="large-3 pull-9 columns">
145
+ <%= render "_sidebar-components.html.erb" %>
146
+ </div>
147
+ </div>
@@ -0,0 +1,156 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Sections" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">Sections are similar to tabs as a way to selectively show a single panel of content at a time.</h4>
9
+
10
+ <div class="row">
11
+ <div class="large-3 columns">
12
+ <div class="section-container vertical-nav" data-section data-options="deep_linking: false">
13
+ <section class="section">
14
+ <p class="title"><a href="#panel1">Section 1</a></p>
15
+ <div class="content">
16
+ <ul class="side-nav">
17
+ <li><a href="#">Link 1</a></li>
18
+ <li><a href="#">Link 2</a></li>
19
+ <li><a href="#">Link 3</a></li>
20
+ <li class="divider"></li>
21
+ <li><a href="#">Link 1</a></li>
22
+ </ul>
23
+ </div>
24
+ </section>
25
+ <section class="section">
26
+ <p class="title"><a href="#panel2">Section 2</a></p>
27
+ <div class="content">
28
+ <ul class="side-nav">
29
+ <li><a href="#">Link 1</a></li>
30
+ <li><a href="#">Link 2</a></li>
31
+ <li><a href="#">Link 3</a></li>
32
+ <li class="divider"></li>
33
+ <li><a href="#">Link 1</a></li>
34
+ </ul>
35
+ </div>
36
+ </section>
37
+ </div>
38
+ </div>
39
+ <div class="large-9 columns">
40
+ <div class="section-container tabs" data-section data-options="deep_linking: true">
41
+ <section class="section">
42
+ <p class="title"><a href="#panel1">Section 1</a></p>
43
+ <div class="content" data-slug="panel1">
44
+ <p>Section 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
45
+ </div>
46
+ </section>
47
+ <section class="section">
48
+ <p class="title"><a href="#panel2">Section 2 Section 2</a></p>
49
+ <div class="content" data-slug="panel2">
50
+ <p>Section 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
51
+ </div>
52
+ </section>
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <hr>
58
+
59
+ <h3>Sections Replace Accordion, Tabs &amp; Vertical Nav</h3>
60
+ <p>Sections replace a few things that you are used to from Foundation 3. We've taken the accordion, the tabs and the vertical nav and combined them into this really flexible plugin that can handle all of those. The single JS file handles all the interactionss, but the classes you add to the element control how it gets rendered and styled across our breakpoint.</p>
61
+
62
+ <hr>
63
+
64
+ </div>
65
+ </div>
66
+
67
+ <div class="row">
68
+ <div class="large-12 columns">
69
+
70
+ <h3>Build With Predefined HTML Classes</h3>
71
+ <p>There are two ways to build sections in Foundation 4, with our predefined HTML classes or with our structure and mixins. Building a sections using our predefined classes is super-easy, you just need to create a <code>&lt;div class="section-container" data-section&gt;</code> as a wrapper for the sections themselves. Inside of this wrapper, you'll create either a <code>&lt;section class="section"&gt;</code> or <code>&lt;div class="section"&gt;</code>. Within that you'll include some sort of <code>.title</code> (this can be headers or a paragragh) and a <code>&lt;div class="content"&gt;</code>. Here is the markup you'll need:</p>
72
+
73
+ <%= code_example '
74
+ <section class="section">
75
+ <p class="title"><a href="#panel1">Section 1</a></p>
76
+ <div class="content" data-slug="panel1">
77
+ <p>Section 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
78
+ </div>
79
+ </section>
80
+ <section class="section">
81
+ <p class="title"><a href="#panel2">Section 2 Section 2</a></p>
82
+ <div class="content" data-slug="panel2">
83
+ <p>Section 2. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
84
+ </div>
85
+ </section>', :html %>
86
+
87
+ <p>The class options:</p>
88
+ <ul class="disc">
89
+
90
+ </ul>
91
+
92
+ <p>For these styles to come across, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>section from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
93
+
94
+ <hr>
95
+
96
+ <h5>Default SCSS Variables</h5>
97
+ <%= code_example '
98
+ /* We use these to set padding and hover factor */
99
+ $section-padding: emCalc(15px);
100
+ $section-function-factor: 10%;
101
+
102
+ /* These style the titles */
103
+ $section-title-color: #333;
104
+ $section-title-bg: #efefef;
105
+ $section-title-bg-active: darken($section-title-bg, $section-function-factor);
106
+ $section-title-bg-active-tabs: #fff;
107
+
108
+ /* Want to control border size, here ya go! */
109
+ $section-border-size: 1px;
110
+ $section-border-style: solid;
111
+ $section-border-color: #ccc;
112
+
113
+ /* Control the color of the background and some size options */
114
+ $section-content-bg: #fff;
115
+ $section-vertical-nav-min-width: emCalc(200px);
116
+ $section-bottom-margin: emCalc(20px);
117
+ ', :css %>
118
+
119
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
120
+
121
+ <hr>
122
+
123
+ <h3>Using the JavaScript</h3>
124
+ <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>
125
+
126
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
127
+
128
+ <p>Required Foundation Library: <code>foundation.section.js</code></p>
129
+
130
+ <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
131
+
132
+ <%= code_example '
133
+ <div data-alert class="alert-box">
134
+ <!-- Your content goes here -->
135
+ <a href="#" class="close">&times;</a>
136
+ </div>
137
+ ', :html %>
138
+
139
+ <h5>Optional JavaScript Configuration</h5>
140
+
141
+ <p>You can either set these options in a <code>data-options</code> attribute in the markup, <code>data-options="option: value; option2: value syntax"</code>, or pass in on initialization.</p>
142
+
143
+ <%= code_example "
144
+ {
145
+ deep_linking: false,
146
+ one_up: true,
147
+ callback: function (){}
148
+ }", :json %>
149
+
150
+ </div>
151
+ </div>
152
+ </div>
153
+ <div class="large-3 pull-9 columns">
154
+ <%= render "_sidebar-components.html.erb" %>
155
+ </div>
156
+ </div>
@@ -0,0 +1,122 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Side Nav" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h1><%= @page_title %></h1>
8
+ <h4 class="subheader">Side nav, like you'll see on Foundation's main site, is useful for sections of either a site or a page.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <div class="row">
16
+ <div class="large-4 columns end">
17
+ <ul class="side-nav">
18
+ <li class="active"><a href="#">Link 1</a></li>
19
+ <li><a href="#">Link 2</a></li>
20
+ <li class="divider"></li>
21
+ <li><a href="#">Link 3</a></li>
22
+ <li><a href="#">Link 4</a></li>
23
+ </ul>
24
+ </div>
25
+ </div>
26
+
27
+ <hr>
28
+
29
+ <h3>Build With Predefined HTML Classes</h3>
30
+ <p>There are two ways to build a side nav in Foundation 4: either with our predefined HTML classes or our mixins. Building side nav using our predefined classes is simple, you'll just need to write a <code>&lt;ul class="side-nav"&gt;</code> and fill it full of list items. The width of the side nav is controlled by the columns you put it inside.</p>
31
+
32
+ <p>The list item options:</p>
33
+ <ul class="disc">
34
+ <li><code>active</code> Will add style to denote the active link.</li>
35
+ <li><code>divider</code> Creates a divider between list items.</li>
36
+ </ul>
37
+
38
+ <%= code_example '
39
+ <ul class="side-nav">
40
+ <li class="active"><a href="#">Link 1</a></li>
41
+ <li><a href="#">Link 2</a></li>
42
+ <li class="divider"></li>
43
+ <li><a href="#">Link 3</a></li>
44
+ <li><a href="#">Link 4</a></li>
45
+ </ul>', :html %>
46
+
47
+
48
+
49
+ <p>For these styles to come across, make sure you have the default Foundation CSS package or that you've selected side nav from a custom package. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
50
+
51
+ <hr>
52
+
53
+ <h3>Build with our Mixins</h3>
54
+ <p>We've included SCSS mixins used to style side nav. 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="#">_side-nav.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>
55
+
56
+ <%= code_example '
57
+ @import "foundation/foundation-global", "foundation/side-nav";
58
+ ', :css %>
59
+
60
+ <h5>Quick Mixin</h5>
61
+ <p>You can build your side nav using our global mixin by including it on a 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>
62
+
63
+ <%= code_example '
64
+ /* Using the default styles */
65
+ .your-class-name { @include side-nav; }', :css %>
66
+
67
+ <p>There are also three options you can customize on the fly when writing this mixin. These controls things like: divider color, text size and font color.</p>
68
+
69
+ <%= code_example '
70
+ /* Using the available options */
71
+ .your-class-name { @include side-nav($divider-color, $font-size, $link-color); }
72
+
73
+ /* Control the color of the divider between links */
74
+ $divider-color: $side-nav-divider-color
75
+
76
+ /* Control your font-size per label */
77
+ $font-size: $side-nav-font-size
78
+
79
+ /* Change the background color for your labels */
80
+ $link-color: $side-nav-link-color
81
+ ', :css %>
82
+
83
+ <ul class="side-nav-custom large-3">
84
+ <li class="active"><a href="#">Link 1</a></li>
85
+ <li><a href="#">Link 2</a></li>
86
+ <li class="divider"></li>
87
+ <li><a href="#">Link 3</a></li>
88
+ <li><a href="#">Link 4</a></li>
89
+ </ul>
90
+
91
+
92
+ <h5>Default SCSS Variables</h5>
93
+
94
+ <%= code_example '
95
+ /* We use this to control padding. */
96
+ $side-nav-padding: emCalc(14px) 0;
97
+
98
+ /* We use these to control list styles. */
99
+ $side-nav-list-type: none;
100
+ $side-nav-list-position: inside;
101
+ $side-nav-list-margin: 0 0 emCalc(7px) 0;
102
+
103
+ /* We use these to control link styles. */
104
+ $side-nav-link-color: $primary-color;
105
+ $side-nav-link-color-active: lighten(#000, 30%);
106
+ $side-nav-font-size: emCalc(14px);
107
+ $side-nav-font-weight: bold;
108
+
109
+ /* We use these to control border styles */
110
+ $side-nav-divider-size: 1px;
111
+ $side-nav-divider-style: solid;
112
+ $side-nav-divider-color: darken(#fff, 10%);', :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
+ </div>
117
+ </div>
118
+ </div>
119
+ <div class="large-3 pull-9 columns">
120
+ <%= render "_sidebar-components.html.erb" %>
121
+ </div>
122
+ </div>