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,233 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Dropdown Buttons" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">We've simplified our dropdown buttons by getting rid of the dedicated dropdown associated with them. Instead, you'll use our <a href="#">new dropdown plugin</a> to attach a dropdown to the button style of your choice.</h4>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="row">
13
+ <div class="large-12 columns">
14
+
15
+ <a href="#" data-dropdown="drop" class="tiny button dropdown">Dropdown Button</a><br>
16
+ <a href="#" data-dropdown="drop2" class="small secondary radius button dropdown">Dropdown Button</a><br>
17
+ <a href="#" data-dropdown="drop3" class="button alert round dropdown">Dropdown Button</a><br>
18
+ <a href="#" data-dropdown="drop4" class="large success button dropdown">Dropdown Button</a><br>
19
+ <a href="#" data-dropdown="drop5" class="large button dropdown expand">Dropdown Button</a><br>
20
+
21
+ <hr>
22
+
23
+ <h3>Build With Predefined HTML Classes</h3>
24
+ <p>There are two ways to build buttons in Foundation 4: with our predefined HTML classes or with our structure and mixins. Building buttons using our predefined classes is simple, you'll need an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code> or <code>&lt;input&gt;</code> with a class of <code>.button.dropdown</code>. This will create a default medium button. You can also use size, color and radius classes to control more of the style.</p>
25
+
26
+ <p>The classes options:</p>
27
+ <ul class="disc">
28
+ <li>The size classes include: <code>.tiny, .small, .medium</code> or <code>.large</code></li>
29
+ <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
30
+ <li>The radius classes include: <code>.radius</code> or <code>.round</code>.</li>
31
+ </ul>
32
+
33
+ <%= code_example '
34
+ <!-- Size Classes -->
35
+ <a href="#" class="button dropdown">Default Button</a>
36
+ <a href="#" class="tiny button dropdown">Tiny Button</a>
37
+ <a href="#" class="small button dropdown">Small Button</a>
38
+ <a href="#" class="large button dropdown">Large Button</a>
39
+
40
+ <!-- Color Classes -->
41
+ <a href="#" class="button dropdown secondary">Secondary Button</a>
42
+ <a href="#" class="button dropdown success">Success Button</a>
43
+ <a href="#" class="button dropdown alert">Alert Button</a>
44
+
45
+ <!-- Radius Classes -->
46
+ <a href="#" class="button dropdown radius">Radius Button</a>
47
+ <a href="#" class="button dropdown round">Round Button</a>
48
+ ', :html %>
49
+
50
+ <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>dropdown buttons from a custom package</strong>. These should be linked up following our default <a href="#getting-started">HTML page structure</a>.</p>
51
+
52
+ <hr>
53
+
54
+ <h3>Build with Mixins</h3>
55
+ <p>We've included SCSS mixins used to style buttons. To use these mixins, you'll need to have the <a href="#extention-install">extension installed</a> or grab <a href="#">_foundation-global.scss</a>, <a href="#">_buttons.scss</a> and <a href="#">_dropdown-buttons.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>
56
+
57
+ <%= code_example '
58
+ @import "foundation/foundation-global", "foundation/buttons", "foundation/dropdown-buttons";
59
+ ', :css %>
60
+
61
+ <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
62
+
63
+ <%= code_example '
64
+ <a href="#" class="your-class-name">Button Text</a>
65
+ ', :html %>
66
+
67
+ <h5>Quick Mixin</h5>
68
+ <p>You can quickly build entire dropdown buttons using our global mixin by including it on your custom class or ID in your stylesheet. The global mixin will create the necessary style for the button. The global mixin looks like this:</p>
69
+
70
+ <%= code_example '
71
+ /* Using the default styles */
72
+ .your-class-name {
73
+ @include button;
74
+ @include dropdown-button;
75
+ }
76
+ ', :css %>
77
+
78
+ <a href="" data-dropdown="drop7 "class="dropdown button">Default Dropdown Button</a>
79
+
80
+ <p>There are also <strong>three options</strong> you can customize on the fly when writing this mixin. These control things like: background color, pip color and base styles. Setting any of these options to <strong>false</strong> will not include the styles.</p>
81
+
82
+ <%= code_example '
83
+ /* Using the available options */
84
+ .your-class-name {
85
+ @include button;
86
+ @include dropdown-button($padding, $pip-color, $base-style);
87
+ }
88
+
89
+ /* This controls padding around the dropdown buttons. Use tiny, small, medium, or large */
90
+ $padding: $button-med
91
+
92
+ /* This controls the dropdown pip color. Set to one of our variables or a custom hex value */
93
+ $pip-color: #fff
94
+
95
+ /* This controls whether or not base styles come through. Set to false to negate */
96
+ /* Handy when you want to have many different styles */
97
+ $base-style: true
98
+ ', :css %>
99
+
100
+ <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
101
+ <p>Sometimes you want to add a nice fancy shine to the edge of your button. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the button a nice zero-fade.</p>
102
+
103
+ <%= code_example '
104
+ .your-class-name {
105
+ @include button;
106
+ @include dropdown-button;
107
+ @include radius;
108
+ @include single-transition;
109
+ @include inset-shadow;
110
+ }
111
+ ', :css %>
112
+
113
+ <a href="#" data-dropdown="drop6" class="customized-dropdown-docs">Button Base, Size, Style &amp; Shine</a>
114
+
115
+ <h5>Default SCSS Variables</h5>
116
+ <%= code_example '
117
+ /* We use these to set the color of the pip in dropdown buttons */
118
+ $dropdown-button-pip-color: #fff;
119
+ $dropdown-button-pip-color-alt: #333;
120
+
121
+ /* We use these to style tiny dropdown buttons */
122
+ $dropdown-button-padding-tny: $button-tny * 5;
123
+ $dropdown-button-pip-size-tny: $button-tny;
124
+ $dropdown-button-pip-right-tny: $button-tny * 2;
125
+ $dropdown-button-pip-top-tny: -$button-tny / 2 + emCalc(1px);
126
+
127
+ /* We use these to style small dropdown buttons */
128
+ $dropdown-button-padding-sml: $button-sml * 5;
129
+ $dropdown-button-pip-size-sml: $button-sml;
130
+ $dropdown-button-pip-right-sml: $button-sml * 2;
131
+ $dropdown-button-pip-top-sml: -$button-sml / 2 + emCalc(2px);
132
+
133
+ /* We use these to style medium dropdown buttons */
134
+ $dropdown-button-padding-med: $button-med * 4 + emCalc(3px);
135
+ $dropdown-button-pip-size-med: $button-med - emCalc(3px);
136
+ $dropdown-button-pip-right-med: $button-med * 2;
137
+ $dropdown-button-pip-top-med: -$button-med / 2 + emCalc(2px);
138
+
139
+ /* We use these to style large dropdown buttons */
140
+ $dropdown-button-padding-lrg: $button-lrg * 4;
141
+ $dropdown-button-pip-size-lrg: $button-lrg - emCalc(6px);
142
+ $dropdown-button-pip-right-lrg: $button-lrg + emCalc(12px);
143
+ $dropdown-button-pip-top-lrg: -$button-lrg / 2 + emCalc(3px);
144
+ ', :css %>
145
+
146
+ <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>
147
+
148
+ <hr>
149
+
150
+ <h3>Using the JavaScript</h3>
151
+ <p>You don't need ths JS to create dropdown button styles with Foundation. The only reason you'll need to include <code>foundation.dropdown.js</code> is if you want to add one of our dropdown to the button. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the dropdown 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>
152
+
153
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
154
+
155
+ <p>Required Foundation Library: <code>foundation.dropdown.js</code></p>
156
+
157
+ <h5>Creating the Dropdown</h5>
158
+ <p>To create the dropdown, you'll need to attach a data-attribute to whatever element you want the dropdown attached to (in this case a button). From there you'll create a list that holds the links or content and add another data-attribute that associates with the element it belongs to. Here's an example of that markup:</p>
159
+
160
+ <%= code_example '
161
+ <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button</a><br>
162
+
163
+ <ul id="drop1" class="f-dropdown">
164
+ <li><a href="#">This is a link</a></li>
165
+ <li><a href="#">This is another</a></li>
166
+ <li><a href="#">Yet another</a></li>
167
+ </ul>
168
+ ', :html %>
169
+
170
+ <a href="#" data-dropdown="drop1" class="button dropdown">Dropdown Button</a><br>
171
+
172
+ <p>Required Foundation Library: <code>foundation.dropdown.js</code></p>
173
+
174
+ <p>You'll notice that <code>data-dropdown="drop1"</code> and <code>id="drop1"</code> have similar values. This is what tells the dropdown plugin where to look to find the position to attach the dropdown element to.</p>
175
+
176
+ <h5>Optional JavaScript Configuration</h5>
177
+
178
+ <p>Dropdown options can only be passed in during initialization at this time.</p>
179
+
180
+ <%= code_example "
181
+ {
182
+ activeClass: 'open'
183
+ }", :json %>
184
+ </div>
185
+ </div>
186
+
187
+ </div>
188
+ <div class="large-3 pull-9 columns">
189
+ <%= render "_sidebar-components.html.erb" %>
190
+ </div>
191
+ </div>
192
+
193
+
194
+ <ul id="drop" data-dropdown-content class="f-dropdown">
195
+ <li><a href="#">This is a link</a></li>
196
+ <li><a href="#">This is another</a></li>
197
+ <li><a href="#">Yet another</a></li>
198
+ </ul>
199
+ <ul id="drop1" data-dropdown-content class="f-dropdown">
200
+ <li><a href="#">This is a link</a></li>
201
+ <li><a href="#">This is another</a></li>
202
+ <li><a href="#">Yet another</a></li>
203
+ </ul>
204
+ <ul id="drop2" data-dropdown-content class="f-dropdown">
205
+ <li><a href="#">This is a link</a></li>
206
+ <li><a href="#">This is another</a></li>
207
+ <li><a href="#">Yet another</a></li>
208
+ </ul>
209
+ <ul id="drop3" data-dropdown-content class="f-dropdown">
210
+ <li><a href="#">This is a link</a></li>
211
+ <li><a href="#">This is another</a></li>
212
+ <li><a href="#">Yet another</a></li>
213
+ </ul>
214
+ <ul id="drop4" data-dropdown-content class="f-dropdown">
215
+ <li><a href="#">This is a link</a></li>
216
+ <li><a href="#">This is another</a></li>
217
+ <li><a href="#">Yet another</a></li>
218
+ </ul>
219
+ <ul id="drop5" data-dropdown-content class="f-dropdown">
220
+ <li><a href="#">This is a link</a></li>
221
+ <li><a href="#">This is another</a></li>
222
+ <li><a href="#">Yet another</a></li>
223
+ </ul>
224
+ <ul id="drop6" data-dropdown-content class="f-dropdown">
225
+ <li><a href="#">This is a link</a></li>
226
+ <li><a href="#">This is another</a></li>
227
+ <li><a href="#">Yet another</a></li>
228
+ </ul>
229
+ <ul id="drop7" data-dropdown-content class="f-dropdown">
230
+ <li><a href="#">This is a link</a></li>
231
+ <li><a href="#">This is another</a></li>
232
+ <li><a href="#">Yet another</a></li>
233
+ </ul>
@@ -0,0 +1,186 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Dropdown" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">In Foundation 4, we wanted to rid our codebase of many different dropdowns within various UI elements. So we created a univeral dropdown plugin that will attach dropdowns or popovers next to anything!</h4>
9
+
10
+ <a href="#" class="button" data-dropdown="tinyDrop">Link Dropdown &raquo;</a>
11
+ <a href="#" class="button" data-dropdown="contentDrop">Content Dropdown &raquo;</a>
12
+
13
+ <hr>
14
+ </div>
15
+ </div>
16
+
17
+ <div class="row">
18
+ <div class="large-12 columns">
19
+
20
+ <h5>Build With Predefined HTML Classes</h5>
21
+ <p>To create the dropdown you'll need to attach a <code>data-dropdown="your-id"</code> to whatever element you want the dropdown attached to. From there you'll create a list that holds the links or content and add an <code>id="your-id"</code> that associates with the element it belongs to. To style the dropdown, we've included a class of <code>.f-dropdown</code> that you can target and style to your hearts desire. If you want the dropdown to be content, simply chain the class <code>.content</code> to the dropdown. Here's an example of that markup:</p>
22
+
23
+ <%= code_example '
24
+ <a href="#" data-dropdown="drop1">Has Dropdown</a>
25
+ <a href="#" data-dropdown="drop2">Has Content Dropdown</a>
26
+
27
+ <ul id="drop1" class="f-dropdown">
28
+ <li><a href="#">This is a link</a></li>
29
+ <li><a href="#">This is another</a></li>
30
+ <li><a href="#">Yet another</a></li>
31
+ </ul>
32
+
33
+ <ul id="drop2" class="f-dropdown content">
34
+ <li><a href="#">This is a link</a></li>
35
+ <li><a href="#">This is another</a></li>
36
+ <li><a href="#">Yet another</a></li>
37
+ </ul>
38
+ ', :html %>
39
+
40
+ <p><a href="#" data-dropdown="drop1">Has Dropdown</a> | <a href="#" data-dropdown="drop2">Has Content Dropdown</a></p>
41
+
42
+ <p>You'll notice that <code>data-dropdown="drop1"</code> and <code>id="drop1"</code> have the same value. This is what tells the dropdown plugin where to look to find the position to attach the dropdown.</p>
43
+
44
+ <p>Available class options:</p>
45
+ <ul class="disc">
46
+ <li><code>tiny</code>: Make the dropdown have a max-width of 200px</li>
47
+ <li><code>small</code>: Make the dropdown have a max-width of 300px</li>
48
+ <li><code>medium</code>: Make the dropdown have a max-width of 500px</li>
49
+ <li><code>large</code>: Make the dropdown have a max-width of 800px</li>
50
+ <li><code>content</code>: Add padding inside the dropdown for better looking content.</li>
51
+ </ul>
52
+
53
+ <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Foundation CSS package</strong> or that you've selected <strong>dropdowns from a custom package</strong>. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
54
+
55
+ <hr>
56
+
57
+ <h3>Build With Our Mixins</h3>
58
+ <p>We've included SCSS mixins used to style dropdowns. 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="#">_dropdown.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>
59
+
60
+ <%= code_example '
61
+ @import "foundation/foundation-global", "foundation/dropdown";
62
+ ', :css %>
63
+
64
+ <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
65
+
66
+ <%= code_example '
67
+ <a href="#" data-dropdown="drop1">Has Dropdown</a>
68
+
69
+ <ul id="drop1" class="your-class-name">
70
+ <li><a href="#">This is a link</a></li>
71
+ <li><a href="#">This is another</a></li>
72
+ <li><a href="#">Yet another</a></li>
73
+ </ul>
74
+ ', :html %>
75
+
76
+ <h5>The Container Mixin</h5>
77
+ <p>There are two mixin you can use when building your dropdowns, the container and the list style. The container mixin will give you all the styles needed for the base styles of the dropdown, not including styles for the default link list style. The container mixin looks like this:</p>
78
+
79
+ <%= code_example '
80
+ /* Container mixin and its options */
81
+ .your-class-name { @include dropdown-container($content, $triangle, $max-width); }
82
+
83
+ /* This can be set to "list" or "content" depending on what you want inside. */
84
+ $content: list
85
+
86
+ /* If you do not want to attach the triangle pop, set this to false. */
87
+ $triangle: true
88
+
89
+ /* By default, the dropdown is 200px max-width, taking on 100% when gets smaller than that. */
90
+ /* You can set this to any number you want or change it globally with the variable. */
91
+ $max-width: $f-dropdown-max-width
92
+ ', :css %>
93
+
94
+ <h5>The List Style Mixin</h5>
95
+ <p>For content dropdowns, we don't add any extra style to the inside of the dropdown other than padding around the edges. For link lists, we wanted to predefined style that would look good out of the box and match the style of our custom select dropdowns. The style mixin looks like this:</p>
96
+
97
+ <%= code_example '
98
+ /* The style mixin - It has no options other than variables to make global changes */
99
+ .your-class-name {
100
+ @include dropdown-container($content, $triangle, $max-width);
101
+
102
+ li { @include dropdown-style; }
103
+ }
104
+ ', :css %>
105
+
106
+ <h5>Default SCSS Variables</h5>
107
+
108
+ <%= code_example '
109
+ /* We use these to controls height and width styles. */
110
+ $f-dropdown-max-width: 200px;
111
+ $f-dropdown-height: auto;
112
+ $f-dropdown-max-height: none;
113
+ $f-dropdown-margin-top: 2px;
114
+
115
+ /* We use this to control the background color */
116
+ $f-dropdown-bg: #fff;
117
+
118
+ /* We use this to set the border styles for dropdowns. */
119
+ $f-dropdown-border-style: solid;
120
+ $f-dropdown-border-width: 1px;
121
+ $f-dropdown-border-color: darken(#fff, 20%);
122
+
123
+ /* We use these to style the triangle pip. */
124
+ $f-dropdown-triangle-size: 6px;
125
+ $f-dropdown-triangle-color: #fff;
126
+ $f-dropdown-triangle-side-offset: 10px;
127
+
128
+ /* We use these to control styles for the list elements. */
129
+ $f-dropdown-list-style: none;
130
+ $f-dropdown-font-color: #555;
131
+ $f-dropdown-font-size: emCalc(14px);
132
+ $f-dropdown-list-padding: emCalc(5px) emCalc(10px);
133
+ $f-dropdown-line-height: emCalc(18px);
134
+ $f-dropdown-list-hover-bg: #eeeeee;', :css %>
135
+
136
+ <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>
137
+
138
+ <hr>
139
+
140
+ <h3>Using the JavaScript</h3>
141
+ <p>You'll need to include <code>foundation.joyride.js</code> to get plugin to work. You'll also need to make sure to include <code>zepto.js</code> and <code>foundation.js</code> above the alert plugin. Above your closing <code>&lt;/body&gt;</code> tag include the following line of code and make sure you have the JS in your directory.</p>
142
+
143
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
144
+
145
+ <p>Required Foundation Library: <code>foundation.dropdown.js</code></p>
146
+
147
+ <h5>Optional JavaScript Configuration</h5>
148
+
149
+ <p>Dropdown options can only be passed in during initialization at this time.</p>
150
+
151
+ <%= code_example "
152
+ {
153
+ // specify the class used for active sections
154
+ activeClass: 'open'
155
+ }", :json %>
156
+
157
+ </div>
158
+ </div>
159
+
160
+ </div>
161
+
162
+ <div class="large-3 pull-9 columns">
163
+ <%= render "_sidebar-components.html.erb" %>
164
+ </div>
165
+ </div>
166
+
167
+ <ul id="tinyDrop" class="f-dropdown" data-dropdown-content>
168
+ <li><a href="#">This is a link</a></li>
169
+ <li><a href="#">This is another</a></li>
170
+ <li><a href="#">Yet another</a></li>
171
+ </ul>
172
+ <div id="contentDrop" class="f-dropdown content medium" data-dropdown-content>
173
+ <h4>Title</h4>
174
+ <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
175
+ <img src="../img/demos/demo1.png">
176
+ <p>More test.</p>
177
+ <a href="#" class="button">Button</a>
178
+ </div>
179
+ <ul id="drop1" data-dropdown-content class="f-dropdown">
180
+ <li><a href="#">This is a link</a></li>
181
+ <li><a href="#">This is another</a></li>
182
+ <li><a href="#">Yet another</a></li>
183
+ </ul>
184
+ <div id="drop2" data-dropdown-content class="f-dropdown content">
185
+ <p>Some text that people will think is awesome! Some text that people will think is awesome! Some text that people will think is awesome!</p>
186
+ </div>
@@ -0,0 +1,93 @@
1
+ <div class="row">
2
+ <div class="large-9 push-3 columns">
3
+
4
+ <% @page_title = "Flex Video" %>
5
+ <div class="row">
6
+ <div class="large-12 columns">
7
+ <h2><%= @page_title %></h2>
8
+ <h4 class="subheader">If you're embedding a video from YouTube, Vimeo, or another site that uses iframe, embed or object elements, you can wrap your video in <code>div.flex-video</code> to create an intrinsic ratio that will properly scale your video on any device.</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-6 columns">
17
+ <div class="flex-video">
18
+ <iframe width="420" height="315" src="http://www.youtube.com/embed/0_EW8aNgKlA" frameborder="0" allowfullscreen></iframe>
19
+ </div>
20
+
21
+ <p>4:3 is the default size for the .flex-video element, and the assumption for .flex-video for chrome (controls) height is based on YouTube.</p>
22
+ </div>
23
+ <div class="large-6 columns">
24
+ <div class="flex-video widescreen vimeo">
25
+ <iframe src="http://player.vimeo.com/video/21762736" width="400" height="225" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
26
+ </div>
27
+
28
+ <p>Because Vimeo places their chrome on the player itself, adding a class of .vimeo creates a container that is sized for the video only &mdash; no extra padding for the controls.</p>
29
+ </div>
30
+ </div>
31
+
32
+ <hr>
33
+
34
+ <h3>Build With Predefined HTML Classes</h3>
35
+ <p>There are two ways to build flex-video containers in Foundation 4: with our predefined HTML classes or with our mixins. Building flex-video containers using our classes is simple, you'll just need to create a <code>&lt;div class="flex-video"&gt;</code> and apply the classes you want to style it appropriately.</p>
36
+
37
+ <p>The available class options:</p>
38
+ <ul class="disc">
39
+ <li><code>widescreen</code>: Will give the player a widescreen aspect ratio.</li>
40
+ <li><code>vimeo</code>: This will ensure that we don't add extra padding since Vimeo has controls within the player, itself.</li>
41
+ </ul>
42
+
43
+ <%= code_example '
44
+ <div class="flex-video">
45
+ <iframe width="420" height="315" src="http://www.youtube.com/embed/0_EW8aNgKlA" frameborder="0" allowfullscreen></iframe>
46
+ </div>', :html %>
47
+
48
+ <p>For these styles to come across, make sure you have the default Foundation CSS package or that you've selected flex-video from a custom package. These should be linked up following our default <a href="#">HTML page structure</a>.</p>
49
+
50
+ <hr>
51
+
52
+ <h3>Build with our Mixins</h3>
53
+ <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="#">_flex-video.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>
54
+
55
+ <%= code_example '
56
+ @import "foundation/foundation-global", "foundation/flex-video";
57
+ ', :css %>
58
+
59
+ <p>The markup is just like we showed you above, but you can apply the mixin to your own custom class or ID.</p>
60
+ <%= code_example '
61
+ <div class="your-class-name">
62
+ <iframe width="420" height="315" src="http://www.youtube.com/embed/0_EW8aNgKlA" frameborder="0" allowfullscreen></iframe>
63
+ </div>
64
+ ', :html %>
65
+
66
+ <h5>Quick Mixin</h5>
67
+ <p>You can build your flex-video containers using our global mixin by including it on your custom class or ID in your own stylesheet. The defaults can be modified using the available variables. The global mixin looks like this:</p>
68
+
69
+ <%= code_example '
70
+ /* Using the default styles */
71
+ .your-class-name { @include flex-video; }', :css %>
72
+
73
+ <h5>Default SCSS Variables</h5>
74
+
75
+ <%= code_example '
76
+ /* We use these to control video container padding and margins */
77
+ $flex-video-padding-top: emCalc(25px);
78
+ $flex-video-padding-bottom: 67.5%;
79
+ $flex-video-margin-bottom: emCalc(16px);
80
+
81
+ /* We use this to control widescreen bottom padding */
82
+ $flex-video-widescreen-padding-bottom: 57.25%;
83
+ ', :css %>
84
+
85
+ <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>
86
+
87
+ </div>
88
+ </div>
89
+ </div>
90
+ <div class="large-3 pull-9 columns">
91
+ <%= render "_sidebar-components.html.erb" %>
92
+ </div>
93
+ </div>