zurb-foundation 4.1.6 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/CONTRIBUTING.md +5 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +7 -0
  4. data/docs/CHANGELOG.md +27 -0
  5. data/docs/Gemfile +2 -0
  6. data/docs/Gemfile.lock +10 -0
  7. data/docs/_sidebar-components.html.erb +1 -0
  8. data/docs/_sidebar.html.erb +1 -0
  9. data/docs/components/alert-boxes.html.erb +8 -3
  10. data/docs/components/block-grid.html.erb +3 -3
  11. data/docs/components/breadcrumbs.html.erb +2 -2
  12. data/docs/components/button-groups.html.erb +2 -2
  13. data/docs/components/buttons.html.erb +3 -3
  14. data/docs/components/clearing.html.erb +7 -6
  15. data/docs/components/custom-forms.html.erb +1 -0
  16. data/docs/components/dropdown-buttons.html.erb +3 -3
  17. data/docs/components/dropdown.html.erb +20 -4
  18. data/docs/components/flex-video.html.erb +3 -3
  19. data/docs/components/forms.html.erb +5 -5
  20. data/docs/components/global.html.erb +235 -3
  21. data/docs/components/grid.html.erb +2 -2
  22. data/docs/components/inline-lists.html.erb +3 -3
  23. data/docs/components/interchange.html.erb +127 -0
  24. data/docs/components/keystrokes.html.erb +3 -3
  25. data/docs/components/kitchen-sink.html.erb +2 -2
  26. data/docs/components/labels.html.erb +3 -3
  27. data/docs/components/orbit.html.erb +120 -8
  28. data/docs/components/pagination.html.erb +5 -5
  29. data/docs/components/panels.html.erb +3 -3
  30. data/docs/components/pricing-tables.html.erb +3 -3
  31. data/docs/components/progress-bars.html.erb +3 -3
  32. data/docs/components/reveal.html.erb +126 -7
  33. data/docs/components/section.html.erb +43 -1
  34. data/docs/components/side-nav.html.erb +3 -3
  35. data/docs/components/split-buttons.html.erb +3 -3
  36. data/docs/components/sub-nav.html.erb +4 -4
  37. data/docs/components/switch.html.erb +3 -3
  38. data/docs/components/tables.html.erb +1 -1
  39. data/docs/components/thumbnails.html.erb +2 -2
  40. data/docs/components/tooltips.html.erb +34 -1
  41. data/docs/components/top-bar.html.erb +109 -30
  42. data/docs/components/type.html.erb +2 -1
  43. data/docs/components/visibility.html.erb +8 -8
  44. data/docs/css/normalize.scss +2 -2
  45. data/docs/css/qunit.css +1 -1
  46. data/docs/img/demos/demo1.jpg +0 -0
  47. data/docs/img/demos/demo2.jpg +0 -0
  48. data/docs/img/demos/demo3.jpg +0 -0
  49. data/docs/img/demos/demo4.jpg +0 -0
  50. data/docs/img/demos/demo5.jpg +0 -0
  51. data/docs/img/demos/interchange/default.jpg +0 -0
  52. data/docs/img/demos/interchange/large.jpg +0 -0
  53. data/docs/img/demos/interchange/med.jpg +0 -0
  54. data/docs/img/demos/interchange/small.jpg +0 -0
  55. data/docs/img/demos/interchange/smallest.jpg +0 -0
  56. data/docs/index.html.erb +14 -5
  57. data/docs/javascript.html.erb +2 -4
  58. data/docs/layout.html.erb +1 -1
  59. data/docs/rails.html.erb +4 -1
  60. data/docs/sass.html.erb +1274 -1023
  61. data/js/foundation/foundation.alerts.js +3 -1
  62. data/js/foundation/foundation.clearing.js +1 -1
  63. data/js/foundation/foundation.dropdown.js +25 -6
  64. data/js/foundation/foundation.forms.js +14 -12
  65. data/js/foundation/foundation.interchange.js +265 -0
  66. data/js/foundation/foundation.joyride.js +16 -3
  67. data/js/foundation/foundation.js +53 -7
  68. data/js/foundation/foundation.magellan.js +5 -3
  69. data/js/foundation/foundation.orbit.js +19 -2
  70. data/js/foundation/foundation.reveal.js +64 -11
  71. data/js/foundation/foundation.section.js +26 -17
  72. data/js/foundation/foundation.tooltips.js +16 -8
  73. data/js/foundation/foundation.topbar.js +98 -46
  74. data/js/foundation/index.js +1 -0
  75. data/lib/foundation/generators/install_generator.rb +2 -2
  76. data/lib/foundation/version.rb +1 -1
  77. data/scss/foundation/_variables.scss +134 -71
  78. data/scss/foundation/components/_alert-boxes.scss +20 -20
  79. data/scss/foundation/components/_block-grid.scss +7 -4
  80. data/scss/foundation/components/_breadcrumbs.scss +3 -3
  81. data/scss/foundation/components/_buttons.scss +5 -3
  82. data/scss/foundation/components/_clearing.scss +12 -6
  83. data/scss/foundation/components/_custom-forms.scss +17 -10
  84. data/scss/foundation/components/_dropdown.scss +6 -6
  85. data/scss/foundation/components/_forms.scss +5 -3
  86. data/scss/foundation/components/_global.scss +63 -30
  87. data/scss/foundation/components/_grid.scss +10 -9
  88. data/scss/foundation/components/_joyride.scss +22 -20
  89. data/scss/foundation/components/_keystrokes.scss +1 -1
  90. data/scss/foundation/components/_orbit.scss +108 -30
  91. data/scss/foundation/components/_reveal.scss +12 -8
  92. data/scss/foundation/components/_section.scss +38 -3
  93. data/scss/foundation/components/_switch.scss +18 -12
  94. data/scss/foundation/components/_thumbs.scss +10 -3
  95. data/scss/foundation/components/_tooltips.scss +11 -11
  96. data/scss/foundation/components/_top-bar.scss +102 -64
  97. data/scss/foundation/components/_type.scss +54 -47
  98. data/templates/project/manifest.rb +1 -0
  99. metadata +11 -4
@@ -177,7 +177,7 @@
177
177
  <div class="small-6 large-centered columns">6 centered</div>
178
178
  </div>
179
179
  <div class="row">
180
- <div class="small-9 small-centered columns">9 centered</div>
180
+ <div class="small-9 small-centered large-uncentered columns">9 centered</div>
181
181
  </div>
182
182
  <div class="row">
183
183
  <div class="small-11 small-centered columns">11 centered</div>
@@ -249,7 +249,7 @@
249
249
  <hr>
250
250
 
251
251
  <h4>Small Grid</h4>
252
- <p>As you've probably noticed in the examples above, you have access to a small and large grid. If you know that your grid structure will be the same for small devices as it will be on large devices, just use the small grid. You can override your small grid classes by adding large grid classes to it. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a target="_blank" href="https://github.com/zurb/foundation/tree/master/scss/foundation/components">_foundation-global.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a target="_blank" href="https://github.com/zurb/foundation/tree/master/scss/foundation/components">_grid.scss</a> from Github and throw them into a Foundation folder in your project directory.</p>
252
+ <p>As you've probably noticed in the examples above, you have access to a small and large grid. If you know that your grid structure will be the same for small devices as it will be on large devices, just use the small grid. You can override your small grid classes by adding large grid classes to it. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a target="_blank" href="https://github.com/zurb/foundation/tree/master/scss/foundation/components">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a target="_blank" href="https://github.com/zurb/foundation/tree/master/scss/foundation/components">_grid.scss</a> from Github and throw them into a Foundation folder in your project directory.</p>
253
253
 
254
254
  <%= code_example '
255
255
  <div class="row">
@@ -41,10 +41,10 @@
41
41
  <hr>
42
42
 
43
43
  <h3>Build with a Mixin</h3>
44
- <p>We've included SCSS mixins used to style inline lists. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_foundation-global.scss">_foundation-global.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_inline-lists.scss">_inline-lists.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>
44
+ <p>We've included SCSS mixins used to style inline lists. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_inline-lists.scss">_inline-lists.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>
45
45
 
46
46
  <%= code_example '
47
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/inline-lists";
47
+ @import "foundation/variables", "foundation/components/global", "foundation/components/inline-lists";
48
48
  ', :css %>
49
49
 
50
50
  <h5>Quick Mixin</h5>
@@ -78,7 +78,7 @@ $inline-list-display: block;
78
78
  /* We use this to control any elements within list items */
79
79
  $inline-list-children-display: block;', :css %>
80
80
 
81
- <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>
81
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
82
82
 
83
83
  </div>
84
84
  </div>
@@ -0,0 +1,127 @@
1
+ <% @side_nav = "js" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Interchange" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">Interchange uses media queries to load the images that are appropriate for a user's browsers, making responsive images a snap.</h4>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+ <p><img src="../img/demos/interchange/default.jpg" data-interchange="[../img/demos/interchange/default.jpg, (default)], [../img/demos/interchange/smallest.jpg, (screen and (max-width: 568px))], [../img/demos/interchange/small.jpg, (small)], [../img/demos/interchange/med.jpg, (medium)], [../img/demos/interchange/large.jpg, (large)]"></p>
17
+
18
+ <h3>Using <code>data-interchange</code></h3>
19
+ <p>The Foundation Interchange component utilizes the <code>data-interchange</code> attribute for specifying your media queries and respect images.</p>
20
+
21
+ <%= code_example '
22
+ <img src="/path/to/default.jpg" data-interchange="[/path/to/default.jpg, (only screen and (min-width: 1px))], [/path/to/bigger-image.jpg, (only screen and (min-width: 1280px))]">
23
+ ', :html %>
24
+
25
+ <p>Each rule passed to <code>data-interchange</code> is comma delimited and incapsulated in square brackets, and each argument within a rule is also comma delimited. The first parameter is the path to your image, and the second parameter is your media query, surrounded by parenthesis.</p>
26
+
27
+ <%= code_example '
28
+ data-interchange="[image_path, (media query)], [image_path, (media query)]"
29
+ ', :html %>
30
+
31
+ <p><strong>The last rule that evaluates to true will be the image that gets loaded.</strong> We recommend that you set your image <code>src</code> to the smallest one, as this will always get loaded.</p>
32
+
33
+ <h3>Named Queries</h3>
34
+
35
+ <p>Interchange has a few built-in shortcuts that correlate with our visibility classes.</p>
36
+
37
+ <table>
38
+ <thead>
39
+ <tr>
40
+ <th>Name</th>
41
+ <th>Media Query</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <tr>
46
+ <td>default</td>
47
+ <td><code>only screen and (min-width: 1px)</code></td>
48
+ </tr>
49
+ <tr>
50
+ <td>small</td>
51
+ <td><code>only screen and (min-width: 768px)</code></td>
52
+ </tr>
53
+ <tr>
54
+ <td>medium</td>
55
+ <td><code>only screen and (min-width: 1280px)</code></td>
56
+ </tr>
57
+ <tr>
58
+ <td>large</td>
59
+ <td><code>only screen and (min-width: 1440px)</code></td>
60
+ </tr>
61
+ <tr>
62
+ <td>landscape</td>
63
+ <td><code>only screen and (orientation: landscape)</code></td>
64
+ </tr>
65
+ <tr>
66
+ <td>portrait</td>
67
+ <td><code>only screen and (orientation: portrait)</code></td>
68
+ </tr>
69
+ </tbody>
70
+ </table>
71
+
72
+ <p>To use the named queries, just pass the name in where you would normally specify your query.</p>
73
+
74
+ <%= code_example '
75
+ data-interchange="[image_path, (large)], [image_path, (landscape)]"
76
+ ', :html %>
77
+
78
+ <h3>Custom Named Queries</h3>
79
+
80
+ <p>Custom queries can be defined during initialization. You can also override the default queries in this way:</p>
81
+
82
+ <%= code_example "
83
+ $(document).foundation('interchange', {
84
+ named_queries : {
85
+ my_custom_query : 'only screen and (max-width: 200px)'
86
+ }
87
+ });
88
+ ", :js %>
89
+
90
+ <h3>Events</h3>
91
+
92
+ <p>Interchange triggers a <code>replace</code> event when a rule evaluates to true and the image has been replaced.</p>
93
+
94
+ <%= code_example "
95
+ $(document).on('replace', 'img', function (e, new_path, original_path) {
96
+ console.log(e.currentTarget, new_path, original_path);
97
+ });
98
+ ", :js %>
99
+
100
+ <h3>Adding new images after page load</h3>
101
+
102
+ <p>If you add new images after the page has been loaded, you will need to trigger a <code>reflow</code> by running one of the following:</p>
103
+
104
+ <%= code_example "
105
+ $(document).foundation('interchange', 'reflow');
106
+
107
+ // OR for all Foundation components
108
+
109
+ $(document).foundation('reflow');
110
+ ", :js %>
111
+
112
+ <h3>Using the JavaScript</h3>
113
+
114
+ <p>Interchange requires the Foundation Core, <code>foundation.js</code> and the <code>foundation.interchange.js</code> component to function.</p>
115
+
116
+ <p><a href="../javascript.html" title="How to install Foundation JavaScript">Read how to install Foundation JavaScript</a></p>
117
+
118
+ </div>
119
+ </div>
120
+
121
+ </div>
122
+
123
+ <div class="large-3 pull-9 columns">
124
+ <%= render "_sidebar-components.html.erb" %>
125
+ </div>
126
+
127
+ </div>
@@ -28,10 +28,10 @@
28
28
  <hr>
29
29
 
30
30
  <h3>Build with a Mixin</h3>
31
- <p>We've included SCSS mixins used to style keystrokes. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_foundation-global.scss">_foundation-global.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_keystrokes.scss">_keystrokes.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>
31
+ <p>We've included SCSS mixins used to style keystrokes. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_keystrokes.scss">_keystrokes.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>
32
32
 
33
33
  <%= code_example '
34
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/keystrokes";
34
+ @import "foundation/variables", "foundation/components/global", "foundation/components/keystrokes";
35
35
  ', :css %>
36
36
 
37
37
  <h5>Quick Mixin</h5>
@@ -65,7 +65,7 @@ $keystroke-border-width: 1px;
65
65
  $keystroke-border-color: darken($keystroke-bg, $keystroke-function-factor);
66
66
  $keystroke-radius: $global-radius;', :css %>
67
67
 
68
- <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>
68
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
69
69
 
70
70
  </div>
71
71
  </div>
@@ -489,7 +489,7 @@
489
489
  <section class="section">
490
490
  <p class="title"><a href="#panel3">Section 3</a></p>
491
491
  <div class="content" data-slug="panel3">
492
- <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>
492
+ <p>Section 3. 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>
493
493
  </div>
494
494
  </section>
495
495
  </div>
@@ -509,7 +509,7 @@
509
509
  <section class="section">
510
510
  <p class="title"><a href="#panel3">Section 3</a></p>
511
511
  <div class="content" data-slug="panel3">
512
- <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>
512
+ <p>Section 3. 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>
513
513
  </div>
514
514
  </section>
515
515
  </div>
@@ -43,10 +43,10 @@
43
43
  <hr>
44
44
 
45
45
  <h3>Build With Our Mixins</h3>
46
- <p>We've included SCSS mixins used to style labels. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_foundation-global.scss">_foundation-global.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_labels.scss">_labels.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>
46
+ <p>We've included SCSS mixins used to style labels. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_labels.scss">_labels.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>
47
47
 
48
48
  <%= code_example '
49
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/labels";
49
+ @import "foundation/variables", "foundation/components/global", "foundation/components/labels";
50
50
  ', :css %>
51
51
 
52
52
  <h5>Quick Mixin</h5>
@@ -90,7 +90,7 @@ $label-font-weight: bold;
90
90
  $label-font-color: #333;
91
91
  $label-font-color-alt: #fff;', :css %>
92
92
 
93
- <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>
93
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
94
94
 
95
95
  </div>
96
96
  </div>
@@ -9,6 +9,8 @@
9
9
  <h2><%= @page_title %></h2>
10
10
  <h4 class="subheader">Orbit is an easy to use, powerful image slider that's responsive, allowing you to swipe on a touch-enabled device.</h4>
11
11
 
12
+ <div class="slideshow-wrapper">
13
+ <span class="preloader"></span>
12
14
  <ul id="featured1" data-orbit data-options="timer_speed:5000;">
13
15
  <li>
14
16
  <img src="../img/demos/demo1.jpg" />
@@ -29,6 +31,7 @@
29
31
  </div>
30
32
  </li>
31
33
  </ul>
34
+ </div>
32
35
 
33
36
  <hr>
34
37
 
@@ -42,7 +45,6 @@
42
45
  <p>Building Orbit is pretty simple using our HTML classes and structure; you'll just need to write the markup, find some images or text, fire up the Javascript and you'll be ready to go. On touch-enabled devices, Orbit has swipe functionality that makes it easy to switch slides. On screens without touch interfaces, you'll see bullet and arrow navigation if you have the options setup in your JS. Here's markup structure for Orbit:</p>
43
46
 
44
47
  <%= code_example '
45
- <!-- Basic orbit markup -->
46
48
  <ul data-orbit>
47
49
  <li>
48
50
  <img src="../img/demos/demo1.jpg" />
@@ -155,7 +157,7 @@
155
157
  </p>
156
158
 
157
159
  <%= code_example '
158
- <ul id="featured2" data-orbit>
160
+ <ul data-orbit>
159
161
  <li data-orbit-slide="headline-1">
160
162
  <h2>Headline 1</h2>
161
163
  <h3>Subheadline</h3>
@@ -183,13 +185,40 @@
183
185
 
184
186
  <hr>
185
187
 
188
+ <h3>Graceful Loading &amp; Preloader</h3>
189
+ <p>We've cleaned up how Orbit initializes by adding a wrapper feature that stops the ugly flash of unstyled content. Here's the markup needed:</p>
190
+
191
+ <%= code_example '
192
+ <div class="slideshow-wrapper">
193
+ <ul id="featured2" data-orbit>
194
+ <!-- Orbit slides -->
195
+ </ul>
196
+ </div>
197
+ ', :html %>
198
+
199
+ <p>To add the preloader, simply include a <code>div class="preloader"</code> right inside the wrapper, like so:</p>
200
+
201
+ <%= code_example '
202
+ <div class="slideshow-wrapper">
203
+ <div class="preloader"></div>
204
+ <ul data-orbit>
205
+ <!-- Orbit slides -->
206
+ </ul>
207
+ </div>
208
+ ', :html %>
209
+
210
+ <div class="slideshow-wrapper" style="height: 200px; border: solid 1px #ddd">
211
+ <div class="preloader"></div>
212
+ </div>
213
+
214
+ <hr>
215
+
186
216
  <h3>Available SCSS Variables</h3>
187
217
  <p>We've included a bunch of variables that you'll be able to use if you're into getting SASSy with things.</p>
188
218
 
189
219
  <%= code_example '
190
220
  /* We use these to control the caption styles */
191
221
  $orbit-container-bg: #f5f5f5;
192
- $orbit-caption-bg-old-browser: #000;
193
222
  $orbit-caption-bg-old: rgb(0,0,0);
194
223
  $orbit-caption-bg: rgba(0,0,0,0.6);
195
224
  $orbit-caption-font-color: #fff;
@@ -207,12 +236,13 @@ $orbit-bullet-nav-color: #999;
207
236
  $orbit-bullet-nav-color-active: #222;
208
237
 
209
238
  /* We use thes to controls the style of slide numbers */
210
- $orbit-slide-number-bg: rgb(0,0,0);
239
+ $orbit-slide-number-bg: rgba(0,0,0,0);
211
240
  $orbit-slide-number-font-color: #fff;
212
241
  $orbit-slide-number-padding: emCalc(5px);
213
242
 
214
- // Margin for when Orbit is stacked on small screens
215
- $stack-on-small-margin-bottom: emCalc(20px); // Stack on small does not function right now
243
+ /* Graceful Loading Wrapper and preloader */
244
+ $wrapper-class: "slideshow-wrapper";
245
+ $preloader-class: "preloader";
216
246
  ', :css %>
217
247
 
218
248
  <hr>
@@ -237,8 +267,10 @@ $stack-on-small-margin-bottom: emCalc(20px); // Stack on small does not function
237
267
  <p>Orbit options can only be passed in during initialization at this time.</p>
238
268
 
239
269
  <%= code_example "
240
- {
270
+ $(document).foundation('orbit', {
241
271
  timer_speed: 10000,
272
+ pause_on_hover: true,
273
+ resume_on_mouseout: true,
242
274
  animation_speed: 500,
243
275
  bullets: true,
244
276
  stack_on_small: true,
@@ -256,7 +288,7 @@ $stack-on-small-margin-bottom: emCalc(20px); // Stack on small does not function
256
288
  caption_class: 'orbit-caption',
257
289
  active_slide_class: 'active',
258
290
  orbit_transition_class: 'orbit-transitioning'
259
- }", :js %>
291
+ });", :js %>
260
292
 
261
293
  <p>Starting in 4.0.7 you can also use the <code>data-options</code> attribute to pass configuration settings to Orbit. Treat it like a <code>style</code> property:</p>
262
294
 
@@ -266,6 +298,86 @@ $stack-on-small-margin-bottom: emCalc(20px); // Stack on small does not function
266
298
  </ul>
267
299
  ', :html %>
268
300
 
301
+ <h3>Events</h3>
302
+ <p>You can bind to the following events in your code.</p>
303
+
304
+ <table style="width:100%;">
305
+ <thead>
306
+ <tr>
307
+ <th>Event</th>
308
+ <th>Params</th>
309
+ <th>Description</th>
310
+ </tr>
311
+ </thead>
312
+ <tbody>
313
+ <tr>
314
+ <td>orbit:ready</td>
315
+ <td>event</td>
316
+ <td>Fires when the slider has loaded</td>
317
+ </tr>
318
+ <tr>
319
+ <td>orbit:before-slide-change</td>
320
+ <td>event</td>
321
+ <td>Fires before a slide changes</td>
322
+ </tr>
323
+ <tr>
324
+ <td>orbit:after-slide-change</td>
325
+ <td>event, orbit</td>
326
+ <td>Fires after a slide transition animation has finished. The <code>orbit</code> parameter contains <code>slide_number</code> and <code>total_slides</code>.</td>
327
+ </tr>
328
+ <tr>
329
+ <td>orbit:timer-started</td>
330
+ <td>event</td>
331
+ <td>Fires each time the timer is started/resumed</td>
332
+ </tr>
333
+ <tr>
334
+ <td>orbit:timer-stopped</td>
335
+ <td>event</td>
336
+ <td>Fires each time the timer is paused/stopped</td>
337
+ </tr>
338
+ </tbody>
339
+ </table>
340
+
341
+ <h5>Example</h5>
342
+ <p>Here's an example of how you can bind to these events:</p>
343
+
344
+ <%= code_example '<ul id="featured1" data-orbit>
345
+ <li>
346
+ <img src="../img/demos/demo1.jpg" />
347
+ <div class="orbit-caption">...</div>
348
+ </li>
349
+ <li>
350
+ <img src="../img/demos/demo2.jpg" />
351
+ <div class="orbit-caption">...</div>
352
+ </li>
353
+ <li>
354
+ <img src="../img/demos/demo3.jpg" />
355
+ <div class="orbit-caption">...</div>
356
+ </li>
357
+ </ul>
358
+
359
+ <script>
360
+ $("#featured1").on("orbit:ready", function(event) {
361
+ console.info("ready");
362
+ });
363
+ $("#featured1").on("orbit:before-slide-change", function(event) {
364
+ console.info("before slide change");
365
+ });
366
+ $("#featured1").on("orbit:after-slide-change", function(event, orbit) {
367
+ console.info("after slide change");
368
+ console.info("slide " + orbit.slide_number + " of " + orbit.total_slides);
369
+ });
370
+ $("#featured1").on("orbit:timer-started", function(event, orbit) {
371
+ console.info("timer started");
372
+ });
373
+ $("#featured1").on("orbit:timer-stopped", function(event, orbit) {
374
+ console.info("timer stopped");
375
+ });
376
+ </script>
377
+ ', :html %>
378
+
379
+
380
+
269
381
  </div>
270
382
  </div>
271
383
 
@@ -88,10 +88,10 @@
88
88
  <hr>
89
89
 
90
90
  <h3>Build with a Mixin</h3>
91
- <p>We've included SCSS mixins used to style pagination. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_foundation-global.scss">_foundation-global.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_pagination.scss">_pagination.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>
91
+ <p>We've included SCSS mixins used to style pagination. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/_variables.scss">_variables.scss</a>, <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_global.scss">_global.scss</a> and <a href="https://github.com/zurb/foundation/blob/master/scss/foundation/components/_pagination.scss">_pagination.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>
92
92
 
93
93
  <%= code_example '
94
- @import "foundation/foundation-global", "foundation/components/global", "foundation/components/pagination";
94
+ @import "foundation/variables", "foundation/components/global", "foundation/components/pagination";
95
95
  ', :css %>
96
96
 
97
97
  <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like to the unordered list. The interior classes come with the mixin, just make sure you follow our markup structure:</p>
@@ -161,7 +161,7 @@ $pagination-link-font-color: #999;
161
161
  $pagination-link-active-bg: darken(#fff, 10%);
162
162
 
163
163
  /* We use these for disabled anchor links */
164
- $pagination-link-unavailable-cursor: default;
164
+ $pagination-link-unavailable-cursor: $cursor-default-value;
165
165
  $pagination-link-unavailable-font-color: #999;
166
166
  $pagination-link-unavailable-bg-active: transparent;
167
167
 
@@ -169,10 +169,10 @@ $pagination-link-unavailable-bg-active: transparent;
169
169
  $pagination-link-current-background: $primary-color;
170
170
  $pagination-link-current-font-color: #fff;
171
171
  $pagination-link-current-font-weight: bold;
172
- $pagination-link-current-cursor: default;
172
+ $pagination-link-current-cursor: $cursor-default-value;
173
173
  $pagination-link-current-active-bg: $primary-color;', :css %>
174
174
 
175
- <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>
175
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_variables.scss</strong>.</p>
176
176
 
177
177
  </div>
178
178
  </div>