themepile-abstractio 1.0.4 → 4.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +1 -0
  3. data/CONTRIBUTING.md +7 -7
  4. data/Gemfile.lock +19 -0
  5. data/Gruntfile.js +27 -0
  6. data/README.md +38 -38
  7. data/abstractio.gemspec +20 -18
  8. data/docs/CHANGELOG.md +275 -0
  9. data/docs/Capfile +4 -0
  10. data/docs/Gemfile +13 -0
  11. data/docs/Gemfile.lock +45 -0
  12. data/docs/Procfile +2 -0
  13. data/docs/README.md +1 -0
  14. data/docs/_sidebar-components.html.erb +115 -0
  15. data/docs/_sidebar.html.erb +115 -0
  16. data/docs/changelog.html.erb +33 -0
  17. data/docs/compile.rb +34 -0
  18. data/docs/components/alert-boxes.html.erb +204 -0
  19. data/docs/components/block-grid.html.erb +132 -0
  20. data/docs/components/breadcrumbs.html.erb +156 -0
  21. data/docs/components/button-groups.html.erb +230 -0
  22. data/docs/components/buttons.html.erb +222 -0
  23. data/docs/components/clearing.html.erb +152 -0
  24. data/docs/components/custom-forms.html.erb +309 -0
  25. data/docs/components/dropdown-buttons.html.erb +235 -0
  26. data/docs/components/dropdown.html.erb +188 -0
  27. data/docs/components/flex-video.html.erb +95 -0
  28. data/docs/components/forms.html.erb +477 -0
  29. data/docs/components/global.html.erb +92 -0
  30. data/docs/components/grid.html.erb +366 -0
  31. data/docs/components/inline-lists.html.erb +91 -0
  32. data/docs/components/joyride.html.erb +183 -0
  33. data/docs/components/keystrokes.html.erb +76 -0
  34. data/docs/components/kitchen-sink.html.erb +870 -0
  35. data/docs/components/labels.html.erb +102 -0
  36. data/docs/components/magellan.html.erb +86 -0
  37. data/docs/components/orbit.html.erb +276 -0
  38. data/docs/components/pagination.html.erb +183 -0
  39. data/docs/components/panels.html.erb +123 -0
  40. data/docs/components/pricing-tables.html.erb +156 -0
  41. data/docs/components/progress-bars.html.erb +123 -0
  42. data/docs/components/reveal.html.erb +162 -0
  43. data/docs/components/section.html.erb +1023 -0
  44. data/docs/components/side-nav.html.erb +124 -0
  45. data/docs/components/split-buttons.html.erb +220 -0
  46. data/docs/components/sub-nav.html.erb +122 -0
  47. data/docs/components/switch.html.erb +290 -0
  48. data/docs/components/tables.html.erb +125 -0
  49. data/docs/components/thumbnails.html.erb +89 -0
  50. data/docs/components/tooltips.html.erb +76 -0
  51. data/docs/components/top-bar.html.erb +300 -0
  52. data/docs/components/type.html.erb +396 -0
  53. data/docs/components/visibility.html.erb +110 -0
  54. data/docs/config.ru +12 -0
  55. data/docs/config/deploy.rb +36 -0
  56. data/docs/controller.rb +49 -0
  57. data/docs/css/_coderay.scss +116 -0
  58. data/docs/css/_settings.scss +1 -0
  59. data/docs/css/docs.scss +239 -0
  60. data/docs/css/normalize.scss +396 -0
  61. data/docs/css/qunit-composite.css +13 -0
  62. data/docs/css/qunit.css +235 -0
  63. data/docs/faq.html.erb +63 -0
  64. data/docs/img/demos/demo1-th.jpg +0 -0
  65. data/docs/img/demos/demo1.jpg +0 -0
  66. data/docs/img/demos/demo2-th.jpg +0 -0
  67. data/docs/img/demos/demo2.jpg +0 -0
  68. data/docs/img/demos/demo3-th.jpg +0 -0
  69. data/docs/img/demos/demo3.jpg +0 -0
  70. data/docs/img/demos/demo4-th.jpg +0 -0
  71. data/docs/img/demos/demo4.jpg +0 -0
  72. data/docs/img/demos/demo5-th.jpg +0 -0
  73. data/docs/img/demos/demo5.jpg +0 -0
  74. data/docs/index.html.erb +298 -0
  75. data/docs/javascript.html.erb +138 -0
  76. data/docs/js/docs.js +3 -0
  77. data/docs/js/qunit-composite.js +105 -0
  78. data/docs/js/qunit.js +1977 -0
  79. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  80. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  81. data/docs/js/tests/tooltips/tooltips.html +39 -0
  82. data/docs/js/tests/tooltips/tooltips.js +11 -0
  83. data/docs/layout.html.erb +128 -0
  84. data/docs/media-queries.html.erb +96 -0
  85. data/docs/rails.html.erb +76 -0
  86. data/docs/rtl.html.erb +53 -0
  87. data/docs/sass.html.erb +1297 -0
  88. data/docs/support.html.erb +143 -0
  89. data/js/{foundation/foundation.alerts.js → abstractio/abstractio.alerts.js} +2 -2
  90. data/js/{foundation/foundation.clearing.js → abstractio/abstractio.clearing.js} +6 -6
  91. data/js/{foundation/foundation.cookie.js → abstractio/abstractio.cookie.js} +1 -1
  92. data/js/{foundation/foundation.dropdown.js → abstractio/abstractio.dropdown.js} +5 -5
  93. data/js/{foundation/foundation.forms.js → abstractio/abstractio.forms.js} +7 -7
  94. data/js/{foundation/foundation.joyride.js → abstractio/abstractio.joyride.js} +5 -5
  95. data/js/{foundation/foundation.js → abstractio/abstractio.js} +13 -13
  96. data/js/{foundation/foundation.magellan.js → abstractio/abstractio.magellan.js} +3 -3
  97. data/js/{foundation/foundation.orbit.js → abstractio/abstractio.orbit.js} +6 -6
  98. data/js/{foundation/foundation.placeholder.js → abstractio/abstractio.placeholder.js} +1 -1
  99. data/js/{foundation/foundation.reveal.js → abstractio/abstractio.reveal.js} +3 -3
  100. data/js/{foundation/foundation.section.js → abstractio/abstractio.section.js} +5 -5
  101. data/js/{foundation/foundation.tooltips.js → abstractio/abstractio.tooltips.js} +6 -6
  102. data/js/{foundation/foundation.topbar.js → abstractio/abstractio.topbar.js} +3 -3
  103. data/js/abstractio/index.js +16 -0
  104. data/js/vendor/jquery.js +3 -3
  105. data/lib/abstractio/generators/USAGE +1 -1
  106. data/lib/abstractio/version.rb +1 -1
  107. data/package.json +15 -0
  108. data/scss/abstractio.scss +37 -37
  109. data/scss/abstractio/_variables.scss +1 -1
  110. data/scss/abstractio/components/_alert-boxes.scss +1 -1
  111. data/scss/abstractio/components/_block-grid.scss +2 -2
  112. data/scss/abstractio/components/_dropdown.scss +1 -1
  113. data/scss/abstractio/components/_global.scss +2 -2
  114. data/scss/abstractio/components/_joyride.scss +1 -1
  115. data/scss/abstractio/components/_pagination.scss +1 -1
  116. data/scss/abstractio/components/_switch.scss +1 -1
  117. data/scss/abstractio/components/_visibility.scss +2 -2
  118. data/templates/project/.gitignore +1 -1
  119. data/templates/project/MIT-LICENSE.txt +1 -1
  120. data/templates/project/config.rb +1 -1
  121. data/templates/project/humans.txt +2 -2
  122. data/templates/project/index.html +11 -11
  123. data/templates/project/manifest.rb +1 -1
  124. data/templates/project/scss/app.scss +38 -38
  125. data/templates/upgrade/manifest.rb +2 -2
  126. metadata +104 -22
  127. data/Gemfile +0 -4
  128. data/Rakefile +0 -2
  129. data/js/foundation/index.js +0 -16
  130. data/lib/abstractio.rb +0 -17
@@ -0,0 +1,123 @@
1
+
2
+ <% @side_nav = "css" %>
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Progress Bars" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <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>
11
+
12
+ <div class="progress large-6"><span class="meter" style="width: 40%"></span></div>
13
+ <div class="radius progress success large-8"><span class="meter" style="width: 80%"></span></div>
14
+ <div class="nice round progress alert large-10"><span class="meter" style="width: 30%"></span></div>
15
+ <div class="nice secondary progress"><span class="meter" style="width: 50%"></span></div>
16
+
17
+ <hr>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="row">
22
+ <div class="large-12 columns">
23
+
24
+ <h3>Build With Predefined HTML Classes</h3>
25
+ <p>There are two ways to add progress bars labels in Abstractio 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 programmatically on your own accord. The simplest way to do this is to change the <code>style="width:%"</code> property on the meter, itself.</p>
26
+
27
+ <%= code_example '
28
+ <div class="progress"><span class="meter"></span></div>', :html %>
29
+
30
+ <div class="progress"><span class="meter"></span></div>
31
+
32
+ <p>The class options:</p>
33
+ <ul class="disc">
34
+ <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
35
+ <li>The radius classes include: <code>.radius</code> or <code>.round</code>.</li>
36
+ <li>You may also you the grid width classes: <code>.small-#</code> or <code>.large-#</code></li>
37
+ </ul>
38
+
39
+ <%= code_example '
40
+ <div class="progress large-6 success round"><span class="meter" style="width: 40%"></span></div>', :html %>
41
+
42
+ <div class="progress large-6 success round"><span class="meter" style="width: 40%"></span></div>
43
+
44
+ <p>For these styles to come across, make sure you have the default Abstractio CSS package or that you've selected labels from a custom package. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
45
+
46
+ <hr>
47
+
48
+ <h3>Build with our Mixins</h3>
49
+ <p>We've included SCSS mixins used to style progress bars. To use the mixin, you'll need to have the <a href="../sass.html">extension installed</a> or grab <a href="https://github.com/themepile/abstractio/blob/master/scss/abstractio/_abstractio-global.scss">_abstractio-global.scss</a>, <a href="https://github.com/themepile/abstractio/blob/master/scss/abstractio/components/_global.scss">_global.scss</a> and <a href="https://github.com/themepile/abstractio/blob/master/scss/abstractio/components/_progress-bars.scss">_progress-bars.scss</a> from Github and throw them into a Abstractio folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
50
+
51
+ <%= code_example '
52
+ @import "abstractio/abstractio-global", "abstractio/components/global", "abstractio/components/progress-bars";
53
+ ', :css %>
54
+
55
+ <h5>Container Mixin</h5>
56
+ <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>
57
+
58
+ <%= code_example '
59
+ .your-class-name { @include progress-container; }', :css %>
60
+
61
+ <div class="progress"></div>
62
+
63
+ <h5>Meter Mixin</h5>
64
+ <p>The next step is to include an element inside of your container that will be styled as the meter.
65
+
66
+ <%= code_example '
67
+ .your-class-name { @include progress-container;
68
+ & > span { @include progress-meter($bg); }
69
+ }
70
+
71
+ /* We can set the background color of the meter to a variable or any color value */
72
+ $bg: $primary-color
73
+ ', :css %>
74
+
75
+ <div class="progress"><span class="meter"></span></div>
76
+
77
+ <h5>Adding Border Radius</h5>
78
+ <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>
79
+
80
+ <%= code_example '
81
+ .your-class-name {
82
+ @include progress-container;
83
+ @include radius(6px);
84
+ & > span {
85
+ @include progress-meter(pink);
86
+ @include radius(5px);
87
+ }
88
+ }', :css %>
89
+
90
+ <div class="progress-custom"><span style="width:33%"></span></div>
91
+
92
+ <h5>Default SCSS Variables</h5>
93
+
94
+ <%= code_example '
95
+ /* We use this to se the prog bar height */
96
+ $progress-bar-height: emCalc(25px);
97
+
98
+ /* We use these to control the border styles */
99
+ $progress-bar-border-color: darken(#fff, 20%);
100
+ $progress-bar-border-size: 1px;
101
+ $progress-bar-border-style: solid;
102
+ $progress-bar-border-radius: $global-radius;
103
+
104
+ /* We use these to control the margin & padding */
105
+ $progress-bar-pad: emCalc(2px);
106
+ $progress-bar-margin-bottom: emCalc(10px);
107
+
108
+ /* We use these to set the meter colors */
109
+ $progress-bar-color: transparent;
110
+ $progress-meter-color: $primary-color;
111
+ $progress-meter-secondary-color: $secondary-color;
112
+ $progress-meter-success-color: $success-color;
113
+ $progress-meter-alert-color: $alert-color;', :css %>
114
+
115
+ <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>_abstractio-global.scss</strong>.</p>
116
+
117
+ </div>
118
+ </div>
119
+ </div>
120
+ <div class="large-3 pull-9 columns">
121
+ <%= render "_sidebar-components.html.erb" %>
122
+ </div>
123
+ </div>
@@ -0,0 +1,162 @@
1
+ <% @side_nav = "js" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Reveal" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">Modal dialogs, or pop-up windows, are handy for prototyping and production. Abstractio includes Reveal our jQuery modal plugin, to make this easy for you.</h4>
11
+
12
+ <a href="#" data-reveal-id="firstModal" class="radius button">Example Modal&hellip;</a>
13
+ <a href="#" data-reveal-id="videoModal" class="radius button">Example Modal w/Video&hellip;</a>
14
+
15
+ <hr>
16
+
17
+ </div>
18
+ </div>
19
+
20
+ <div class="row">
21
+ <div class="large-12 columns">
22
+
23
+ <h3>Build With HTML Classes</h3>
24
+ <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>
25
+
26
+ <%= code_example '
27
+ <div id="myModal" class="reveal-modal">
28
+ <h2>Awesome. I have it.</h2>
29
+ <p class="lead">Your couch. It is mine.</p>
30
+ <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
31
+ <a class="close-reveal-modal">&#215;</a>
32
+ </div>', :html %>
33
+
34
+ <p>The class options:</p>
35
+ <ul class="disc">
36
+ <li><code>tiny</code>: Set the width to 30%.</li>
37
+ <li><code>small</code>: Set the width to 40%.</li>
38
+ <li><code>medium</code>: Set the width to 60%.</li>
39
+ <li><code>large</code>: Set the width to 70%.</li>
40
+ <li><code>xlarge</code>: Set the width to 95%.</li>
41
+ </ul>
42
+
43
+ <p>For these styles to come across, make sure you have the default Abstractio 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>
44
+
45
+ <h5>Firing a Reveal Modal</h5>
46
+ <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>
47
+
48
+ <%= code_example '
49
+ <a href="#" data-reveal-id="myModal">Click Me For A Modal</a>', :html %>
50
+
51
+ <p>You can also open and close Reveal via JavaScript:</p>
52
+
53
+ <%= code_example "
54
+ // trigger by event
55
+ $('a.reveal-link').trigger('click');
56
+ $('a.close-reveal-modal').trigger('click');
57
+
58
+ // or directly on the modal
59
+ $('#myModal').abstractio('reveal', 'open');
60
+ $('#myModal').abstractio('reveal', 'close');
61
+ ", :js %>
62
+
63
+ <hr>
64
+
65
+ <h5>Default SCSS Variables</h5>
66
+
67
+ <%= code_example '
68
+ /* We use these to control the style of the reveal overlay. */
69
+ $reveal-overlay-bg: rgba(#000, .45);
70
+ $reveal-overlay-bg-old: #000;
71
+
72
+ /* We use these to control the style of the modal itself. */
73
+ $reveal-modal-bg: #fff;
74
+ $reveal-position-top: emCalc(15px);
75
+ $reveal-default-width: 80%;
76
+ $reveal-modal-padding: emCalc(20px);
77
+ $reveal-box-shadow: 0 0 10px rgba(#000,.4);
78
+
79
+ /* We use these to style the reveal close button */
80
+ $reveal-close-font-size: emCalc(22px);
81
+ $reveal-close-top: emCalc(8px);
82
+ $reveal-close-side: emCalc(11px);
83
+ $reveal-close-color: #aaa;
84
+ $reveal-close-weight: bold;
85
+
86
+ /* We use these to control the modal border */
87
+ $reveal-border-style: solid;
88
+ $reveal-border-width: 1px;
89
+ $reveal-border-color: #666;', :css %>
90
+
91
+ <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>_abstractio-global.scss</strong>.</p>
92
+
93
+ <hr>
94
+
95
+ <h3>Using the JavaScript</h3>
96
+ <p>You don't need this JS to create reveal modals with Abstractio. The only reason you'll need to include <code>abstractio.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>abstractio.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>
97
+
98
+ <p><a href="../javascript.html" title="How to install Abstractio JavaScript">Read how to install Abstractio JavaScript</a></p>
99
+
100
+ <p>Required Abstractio Library: <code>abstractio.reveal.js</code></p>
101
+
102
+ <h5>Optional JavaScript Configuration</h5>
103
+
104
+ <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>
105
+
106
+ <%= code_example "
107
+ {
108
+ animation: 'fadeAndPop',
109
+ animationSpeed: 250,
110
+ closeOnBackgroundClick: true,
111
+ dismissModalClass: 'close-reveal-modal',
112
+ bgClass: 'reveal-modal-bg',
113
+ open: function(){},
114
+ opened: function(){},
115
+ close: function(){},
116
+ closed: function(){},
117
+ bg : $('.reveal-modal-bg'),
118
+ css : {
119
+ open : {
120
+ 'opacity': 0,
121
+ 'visibility': 'visible',
122
+ 'display' : 'block'
123
+ },
124
+ close : {
125
+ 'opacity': 1,
126
+ 'visibility': 'hidden',
127
+ 'display': 'none'
128
+ }
129
+ }
130
+ }", :js %>
131
+
132
+ </div>
133
+ </div>
134
+ </div>
135
+ <div class="large-3 pull-9 columns">
136
+ <%= render "_sidebar-components.html.erb" %>
137
+ </div>
138
+ </div>
139
+
140
+ <div id="firstModal" class="reveal-modal">
141
+ <h2>This is a modal.</h2>
142
+ <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>
143
+ <p>Finally, if your modal summons another Reveal modal, the plugin will handle that for you gracefully.</p>
144
+ <p><a href="#" data-reveal-id="secondModal" class="secondary button">Second Modal…</a></p>
145
+ <a class="close-reveal-modal">&#215;</a>
146
+ </div>
147
+
148
+ <div id="secondModal" class="reveal-modal">
149
+ <h2>This is a second modal.</h2>
150
+ <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>
151
+ <a class="close-reveal-modal">&#215;</a>
152
+ </div>
153
+
154
+ <div id="videoModal" class="reveal-modal large">
155
+ <h2>This modal has video</h2>
156
+ <div class="flex-video">
157
+ <iframe width="800" height="315" src="http://www.youtube.com/embed/IkOQw96cfyE" frameborder="0" allowfullscreen></iframe>
158
+ </div>
159
+
160
+ <a class="close-reveal-modal">&#215;</a>
161
+ </div>
162
+
@@ -0,0 +1,1023 @@
1
+ <% @side_nav = "js" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Sections" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">Sections are similar to tabs as a way to selectively show a single panel of content at a time.</h4>
11
+ <div class="row">
12
+ <div class="large-3 columns">
13
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
14
+ <section>
15
+ <p class="title"><a href="#">Section 1</a></p>
16
+ <div class="content">
17
+ <ul class="side-nav">
18
+ <li><a href="#">Link 1</a></li>
19
+ <li><a href="#">Link 2</a></li>
20
+ <li><a href="#">Link 3</a></li>
21
+ <li class="divider"></li>
22
+ <li><a href="#">Link 1</a></li>
23
+ </ul>
24
+ </div>
25
+ </section>
26
+ <section>
27
+ <p class="title"><a href="#">Section 2</a></p>
28
+ <div class="content">
29
+ <ul class="side-nav">
30
+ <li><a href="#">Link 1</a></li>
31
+ <li><a href="#">Link 2</a></li>
32
+ <li><a href="#">Link 3</a></li>
33
+ <li class="divider"></li>
34
+ <li><a href="#">Link 1</a></li>
35
+ </ul>
36
+ </div>
37
+ </section>
38
+ </div>
39
+ </div>
40
+ <div class="large-9 columns">
41
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
42
+ <section>
43
+ <p class="title"><a href="#">Section 1</a></p>
44
+ <div class="content">
45
+ <ul class="side-nav">
46
+ <li><a href="#">Link 1</a></li>
47
+ <li><a href="#">Link 2</a></li>
48
+ <li><a href="#">Link 3</a></li>
49
+ <li class="divider"></li>
50
+ <li><a href="#">Link 1</a></li>
51
+ </ul>
52
+ </div>
53
+ </section>
54
+ <section>
55
+ <p class="title"><a href="#">Section 2</a></p>
56
+ <div class="content">
57
+ <ul class="side-nav">
58
+ <li><a href="#">Link 1</a></li>
59
+ <li><a href="#">Link 2</a></li>
60
+ <li><a href="#">Link 3</a></li>
61
+ <li class="divider"></li>
62
+ <li><a href="#">Link 1</a></li>
63
+ </ul>
64
+ </div>
65
+ </section>
66
+ </div>
67
+ <div class="section-container auto" data-section data-options="deep_linking: true; one_up: false">
68
+ <section>
69
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
70
+ <div class="content" data-slug="panel1" data-section-content>
71
+ <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>
72
+ </div>
73
+ </section>
74
+ <section>
75
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
76
+ <div class="content" data-slug="panel2" data-section-content>
77
+ <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>
78
+ </div>
79
+ </section>
80
+ <div data-section-region class="section">
81
+ <p class="title" data-section-title><a href="#panel3">Section 3</a></p>
82
+ <div class="content" data-slug="panel3" data-section-content>
83
+ <form>
84
+ <div class="row collapse">
85
+ <div class="large-2 columns">
86
+ <label class="inline">Your Name</label>
87
+ </div>
88
+ <div class="large-10 columns">
89
+ <input type="text" id="yourName" placeholder="Jane Smith">
90
+ </div>
91
+ </div>
92
+ <div class="row collapse">
93
+ <div class="large-2 columns">
94
+ <label class="inline"> Your Email</label>
95
+ </div>
96
+ <div class="large-10 columns">
97
+ <input type="text" id="yourEmail" placeholder="jane@smithco.com">
98
+ </div>
99
+ </div>
100
+ <label>What's up?</label>
101
+ <textarea rows="4"></textarea>
102
+ <button type="submit" class="radius button">Submit</button>
103
+ </form>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+
110
+ <hr>
111
+
112
+ <h3>Sections Replace Accordion, Tabs, Vertical Nav &amp; Nav Bar</h3>
113
+ <p>Sections replace a few things that you are used to from Abstractio 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 interactions, but the classes you add to the element control how it gets rendered and styled across our breakpoint.</p>
114
+
115
+ <hr>
116
+
117
+ </div>
118
+ </div>
119
+
120
+ <div class="row">
121
+ <div class="large-12 columns">
122
+
123
+ <h3>Build With Predefined HTML Classes</h3>
124
+ <p>There are two ways to build sections in Abstractio 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 paragraph) and a <code>&lt;div class="content"&gt;</code>. Here is the markup you'll need:</p>
125
+
126
+ <p>If you want to use ZURB's default styles for section elements you can apply the <code>auto</code>, <code>tabs</code>, <code>accordion</code>, <code>vertical-nav</code>, or <code>horizontal-nav</code> classes. By default, section elements will be an accordion on mobile and tabs on desktops and tablets. If you want to adjust this behavior and force a particular format for your section, you will need to set <code>data-section</code> equal to the format you want to force as shown in the variations below.</p>
127
+
128
+ <%= code_example '
129
+ <div class="section-container auto" data-section>
130
+ <section>
131
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
132
+ <div class="content" data-section-content>
133
+ <p>Content of section 1.</p>
134
+ </div>
135
+ </section>
136
+ <section>
137
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
138
+ <div class="content" data-section-content>
139
+ <p>Content of section 2.</p>
140
+ </div>
141
+ </section>
142
+ </div>', :html %>
143
+ <div class="section-container auto" data-section>
144
+ <section>
145
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
146
+ <div class="content" data-section-content>
147
+ <p>Content of section 1.</p>
148
+ </div>
149
+ </section>
150
+ <section>
151
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
152
+ <div class="content" data-section-content>
153
+ <p>Content of section 2.</p>
154
+ </div>
155
+ </section>
156
+ </div>
157
+ <p>This example will automatically switch between tabs and accordion based on the resolution of the device.</p>
158
+
159
+ <p>The class options:</p>
160
+ <ul class="disc">
161
+ <li>auto</li>
162
+ <li>tabs</li>
163
+ <li>accordion</li>
164
+ <li>vertical-nav</li>
165
+ <li>horizontal-nav</li>
166
+ </ul>
167
+
168
+ <p>For these styles to come across, make sure you have the <strong>default Abstractio 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>
169
+
170
+ <hr>
171
+
172
+ <h3>Variations</h3>
173
+ <h6>Accordion</h6>
174
+ <p>Adding an <code>accordion</code> class to the section container will show an accordion on both small and large screens.</p>
175
+ <%= code_example '
176
+ <div class="section-container accordion" data-section="accordion">
177
+ <section>
178
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
179
+ <div class="content" data-section-content>
180
+ <p>Content of section 1.</p>
181
+ </div>
182
+ </section>
183
+ <section>
184
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
185
+ <div class="content" data-section-content>
186
+ <p>Content of section 2.</p>
187
+ </div>
188
+ </section>
189
+ </div>', :html %>
190
+ <div class="section-container accordion" data-section="accordion">
191
+ <section>
192
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
193
+ <div class="content" data-section-content>
194
+ <p>Content of section 1.</p>
195
+ </div>
196
+ </section>
197
+ <section>
198
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
199
+ <div class="content" data-section-content>
200
+ <p>Content of section 2.</p>
201
+ </div>
202
+ </section>
203
+ </div>
204
+
205
+ <h6>Tabs</h6>
206
+ <p>Adding a <code>tabs</code> class to the section container will enable tabs on both small and large screens.</p>
207
+ <%= code_example '
208
+ <div class="section-container tabs" data-section="tabs">
209
+ <section>
210
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
211
+ <div class="content" data-section-content>
212
+ <p>Content of section 1.</p>
213
+ </div>
214
+ </section>
215
+ <section>
216
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
217
+ <div class="content" data-section-content>
218
+ <p>Content of section 2.</p>
219
+ </div>
220
+ </section>
221
+ </div>', :html %>
222
+
223
+ <div class="section-container tabs" data-section="tabs">
224
+ <section>
225
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
226
+ <div class="content" data-section-content>
227
+ <p>Content of section 1.</p>
228
+ </div>
229
+ </section>
230
+ <section>
231
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
232
+ <div class="content" data-section-content>
233
+ <p>Content of section 2.</p>
234
+ </div>
235
+ </section>
236
+ </div>
237
+
238
+ <h6>Vertical Tabs</h6>
239
+ <p>Adding a <code>vertical-tabs</code> class to the section container and setting <code>data-section="vertical-tabs"</code> will enable tabs on both small and large screens.</p>
240
+
241
+ <%= code_example '
242
+ <div class="section-container vertical-tabs" data-section="vertical-tabs">
243
+ <section>
244
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
245
+ <div class="content" data-section-content>
246
+ <p>Content of section 1.</p>
247
+ </div>
248
+ </section>
249
+ <section>
250
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
251
+ <div class="content" data-section-content>
252
+ <p>Content of section 2.</p>
253
+ </div>
254
+ </section>
255
+ <section>
256
+ <p class="title" data-section-title><a href="#">Section 3</a></p>
257
+ <div class="content" data-section-content>
258
+ <p>Content of section 3.</p>
259
+ </div>
260
+ </section>
261
+ </div>', :html %>
262
+
263
+ <div class="section-container vertical-tabs" data-section="vertical-tabs">
264
+ <section>
265
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
266
+ <div class="content" data-section-content>
267
+ <p>Content of section 1.</p>
268
+ </div>
269
+ </section>
270
+ <section>
271
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
272
+ <div class="content" data-section-content>
273
+ <p>Content of section 2.</p>
274
+ </div>
275
+ </section>
276
+ <section>
277
+ <p class="title" data-section-title><a href="#">Section 3</a></p>
278
+ <div class="content" data-section-content>
279
+ <p>Content of section 3.</p>
280
+ </div>
281
+ </section>
282
+ </div>
283
+
284
+ <h6>Vertical Nav/Accordion</h6>
285
+ <p>Adding a <code>vertical-nav</code> class to the section container will enable vertical navigation elements on large screens and show an accordion on small screens.</p>
286
+
287
+ <p>Vertical navigation elements usually appear within the grid so the width can be controlled on desktop.</p>
288
+
289
+ <p>Use the <code>side-nav</code> class on the list to apply the Abstractio navigation styles</p>
290
+
291
+ <%= code_example '
292
+ <div class="row">
293
+ <div class="large-3 columns">
294
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
295
+ <section>
296
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
297
+ <div class="content" data-section-content>
298
+ <ul class="side-nav">
299
+ <li><a href="#">Link 1</a></li>
300
+ <li><a href="#">Link 2</a></li>
301
+ <li><a href="#">Link 3</a></li>
302
+ <li class="divider"></li>
303
+ <li><a href="#">Link 1</a></li>
304
+ </ul>
305
+ </div>
306
+ </section>
307
+ <section>
308
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
309
+ <div class="content" data-section-content>
310
+ <ul class="side-nav">
311
+ <li><a href="#">Link 1</a></li>
312
+ <li><a href="#">Link 2</a></li>
313
+ <li><a href="#">Link 3</a></li>
314
+ <li class="divider"></li>
315
+ <li><a href="#">Link 1</a></li>
316
+ </ul>
317
+ </div>
318
+ </section>
319
+ </div>
320
+ </div>
321
+ <div class="large-9 columns">
322
+ <p>Content to the right of the navigation.</p>
323
+ </div>
324
+ </div>', :html %>
325
+
326
+ <div class="row">
327
+ <div class="large-3 columns">
328
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
329
+ <section>
330
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
331
+ <div class="content" data-section-content>
332
+ <ul class="side-nav">
333
+ <li><a href="#">Link 1</a></li>
334
+ <li><a href="#">Link 2</a></li>
335
+ <li><a href="#">Link 3</a></li>
336
+ <li class="divider"></li>
337
+ <li><a href="#">Link 1</a></li>
338
+ </ul>
339
+ </div>
340
+ </section>
341
+ <section>
342
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
343
+ <div class="content" data-section-content>
344
+ <ul class="side-nav">
345
+ <li><a href="#">Link 1</a></li>
346
+ <li><a href="#">Link 2</a></li>
347
+ <li><a href="#">Link 3</a></li>
348
+ <li class="divider"></li>
349
+ <li><a href="#">Link 1</a></li>
350
+ </ul>
351
+ </div>
352
+ </section>
353
+ </div>
354
+ </div>
355
+ <div class="large-9 columns">
356
+ <p>Content to the right of the navigation.</p>
357
+ </div>
358
+ </div>
359
+
360
+ <h6>Horizontal Nav/Nav Bar</h6>
361
+ <p>Adding a <code>horizontal-nav</code> class to the section container will enable horizontal navigation elements on large screens and show an accordion on small screens.</p>
362
+
363
+ <p>Horizontal navigation is a combination of the tab setting with vertical navigation drop downs.</p>
364
+
365
+ <p>Use the <code>side-nav</code> class on the list to apply the Abstractio navigation styles</p>
366
+
367
+ <%= code_example '
368
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
369
+ <section>
370
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
371
+ <div class="content" data-section-content>
372
+ <ul class="side-nav">
373
+ <li><a href="#">Link 1</a></li>
374
+ <li><a href="#">Link 2</a></li>
375
+ <li><a href="#">Link 3</a></li>
376
+ <li class="divider"></li>
377
+ <li><a href="#">Link 1</a></li>
378
+ </ul>
379
+ </div>
380
+ </section>
381
+ <section>
382
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
383
+ <div class="content" data-section-content>
384
+ <ul class="side-nav">
385
+ <li><a href="#">Link 1</a></li>
386
+ <li><a href="#">Link 2</a></li>
387
+ <li><a href="#">Link 3</a></li>
388
+ <li class="divider"></li>
389
+ <li><a href="#">Link 1</a></li>
390
+ </ul>
391
+ </div>
392
+ </section>
393
+ </div>
394
+ ', :html %>
395
+
396
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
397
+ <section>
398
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
399
+ <div class="content" data-section-content>
400
+ <ul class="side-nav">
401
+ <li><a href="#">Link 1</a></li>
402
+ <li><a href="#">Link 2</a></li>
403
+ <li><a href="#">Link 3</a></li>
404
+ <li class="divider"></li>
405
+ <li><a href="#">Link 1</a></li>
406
+ </ul>
407
+ </div>
408
+ </section>
409
+ <section>
410
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
411
+ <div class="content" data-section-content>
412
+ <ul class="side-nav">
413
+ <li><a href="#">Link 1</a></li>
414
+ <li><a href="#">Link 2</a></li>
415
+ <li><a href="#">Link 3</a></li>
416
+ <li class="divider"></li>
417
+ <li><a href="#">Link 1</a></li>
418
+ </ul>
419
+ </div>
420
+ </section>
421
+ </div>
422
+
423
+ <h6>Deep Linking</h6>
424
+ <p>Set <code>deep-linking</code> to true to enable deep linking to sections of content. Deep linking allows visitors to visit a predefined URL with a hash that points to a particular section of the content. Deep linking also requires a matching <code>data-slug</code> on the content section that the hash should point to, without the pound (&#35;) sign.</p>
425
+
426
+ <%= code_example '
427
+ <div class="section-container auto" data-section data-options="deep_linking: true">
428
+ <section>
429
+ <p class="title" data-section-title><a href="#section1">Section 1</a></p>
430
+ <div class="content" data-slug="section1" data-section-content>
431
+ <p>Content of section 1.</p>
432
+ </div>
433
+ </section>
434
+ <section>
435
+ <p class="title" data-section-title><a href="#section2">Section 2</a></p>
436
+ <div class="content" data-slug="section2" data-section-content>
437
+ <p>Content of section 2.</p>
438
+ </div>
439
+ </section>
440
+ </div>', :html %>
441
+
442
+ <h6>Nested Sections</h6>
443
+ <p>You can infinitely nest Section elements to create more complicated Section layouts.</p>
444
+
445
+ <div class="section-container auto" data-section>
446
+ <section>
447
+ <p class="title"><a href="#section1">ROOT: Section 1</a></p>
448
+ <div class="content" data-slug="section1">
449
+ <p>Content 1 Summary Paragraphs</p>
450
+ <div class="section-container auto" data-section>
451
+ <section>
452
+ <p class="title"><a href="#section1-1">DETAIL: #1</a></p>
453
+ <div class="content">
454
+ <p>Detail awesome stuff!</p>
455
+ </div>
456
+ </section>
457
+ <section>
458
+ <p class="title"><a href="#section1-2">DETAIL: #2</a></p>
459
+ <div class="content">
460
+ <p>Detail awesome stuff numeroe duo.</p>
461
+ </div>
462
+ </section>
463
+ </div>
464
+ </div>
465
+ </section>
466
+ <section>
467
+ <p class="title"><a href="#section2">ROOT: Section 2</a></p>
468
+ <div class="content" data-slug="section2">
469
+ <p>Content 2</p>
470
+ </div>
471
+ </section>
472
+ </div>
473
+ <%= code_example '
474
+ <div class="section-container auto" data-section>
475
+ <section>
476
+ <p class="title"><a href="#section1">ROOT: Section 1</a></p>
477
+ <div class="content" data-slug="section1">
478
+ <p>Content 1 Summary Paragraphs</p>
479
+ <div class="section-container auto" data-section>
480
+ <section>
481
+ <p class="title"><a href="#section1-1">DETAIL: #1</a></p>
482
+ <div class="content">
483
+ <p>Detail awesome stuff!</p>
484
+ </div>
485
+ </section>
486
+ <section>
487
+ <p class="title"><a href="#section1-2">DETAIL: #2</a></p>
488
+ <div class="content">
489
+ <p>Detail awesome stuff numeroe duo.</p>
490
+ </div>
491
+ </section>
492
+ </div>
493
+ </div>
494
+ </section>
495
+ <section>
496
+ <p class="title"><a href="#section2">ROOT: Section 2</a></p>
497
+ <div class="content" data-slug="section2">
498
+ <p>Content 2</p>
499
+ </div>
500
+ </section>
501
+ </div>
502
+ ', :html %>
503
+
504
+ <p><strong>Note:</strong> The <code>section</code> element can be replaced with a <code>div.section</code> element if you do not want to use HTML5 elements.</p>
505
+
506
+ <hr>
507
+
508
+ <h3>Building with Mixins</h3>
509
+ <p>If you are keen on SCSS and use it for your Abstractio projects, you have access to mixins that will let you create any type of section you want and change it within a media query too! Building a section with our mixins requires a bit of predefined structure, but you can choose the classes or ID's to style them with. Start with some sort of block-level container, we use a <code>&lt;div&gt;</code>. This container needs to have <code>data-section="type-of-section"</code>. The section types are explained above. Inside this you create "sections", which can be an HTML5 <code>section</code> element or a <code>&lt;div class="section"&gt;</code>, that will hold content.<p>
510
+
511
+ <h5>Title and Content Elements</h5>
512
+ <p>Inside of these "sections" you created you'll need to add a title and content. To create the title element, use something like a <code>&lt;p&gt;</code>, <code>&lt;h5&gt;</code>, etc and give it an attribute of <code>data-section-title</code>. After this, you add <code>&lt;div data-section-content&gt;</code> and fill it with your content.</p>
513
+
514
+ <p>Here's an example structure you might use with the section mixin:</p>
515
+
516
+ <%= code_example '
517
+ <div class="your-class-name" data-section="auto"> <!-- Can use "auto", "accordion", "tabs", "vertical-nav", or "horizontal-nav" -->
518
+ <section class="your-section-class">
519
+ <p class="your-title-class" data-section-title><a href="#section1">Section 1</a></p>
520
+ <div class="your-content-class" data-slug="section1" data-section-content>
521
+ <p>Content of section 1.</p>
522
+ </div>
523
+ </section>
524
+ <section class="your-section-class">
525
+ <p class="your-title-class" data-section-title><a href="#section2">Section 2</a></p>
526
+ <div class="your-content-class" data-slug="section2" data-section-content>
527
+ <p>Content of section 2.</p>
528
+ </section>
529
+ </div>
530
+ </div>', :html %>
531
+
532
+ <p>Here's a look at the available options for the mixins you need to create sections:</p>
533
+
534
+ <%= code_example '
535
+ @include section-container($base-style, $section-type) { ... }
536
+
537
+ /* Container Options */
538
+
539
+ /* This controls whether or not you include default styles when chaining classes, set to true or false */
540
+ $base-style: true
541
+
542
+ /* This controls the style for the section you are using: accordion, tabs, vertical-tabs, vertical-nav, horizontal-nav */
543
+ $section-type: accordion
544
+
545
+ @include section($section-type, $title-selector, $content-selector, $title-padding, $title-color, $title-font-size, $title-bg, $title-bg-hover, $title-bg-active, $title-color-active, $content-bg, $content-padding, $section-border-size, $section-border-style, $section-border-color) { ... }
546
+
547
+ /* Section Options */
548
+
549
+ /* Control which section type styles come across: accordion, tabs, vertical-tabs, vertical-nav, horizontal-nav */
550
+ $section-type: accordion
551
+
552
+ /* You can set the class that is used for the title elements */
553
+ $title-selector: ".title"
554
+
555
+ /* You can set the class that is used for the content elements */
556
+ $content-selector: ".content"
557
+
558
+ /* Give the titles some padding, can be any px or emCalc() value */
559
+ $title-padding: $section-padding
560
+
561
+ /* give the titles a color, any color value */
562
+ $title-color: $section-title-color
563
+
564
+ /* Set the font size for titles */
565
+ $title-font-size: $section-font-size
566
+
567
+ /* Set the background color for titles */
568
+ $title-bg: $section-title-bg
569
+
570
+ /* Change title background for hover */
571
+ $title-bg-hover: $section-title-bg-hover
572
+
573
+ /* Change title background for .active */
574
+ $title-bg-active: $section-title-bg-active
575
+
576
+ /* Change title color for .active */
577
+ $title-color-active: $section-title-color
578
+
579
+ /* Content area background color */
580
+ $content-bg: $section-content-bg
581
+
582
+ /* Content area padding */
583
+ $content-padding: $section-content-padding
584
+
585
+ /* Border size in pixels */
586
+ $section-border-size: $section-border-size
587
+
588
+ /* Border style */
589
+ $section-border-style: $section-border-style
590
+
591
+ /* Border color */
592
+ $section-border-color: $section-border-color', :css %>
593
+
594
+
595
+ <hr>
596
+
597
+ <h5>Auto Configuration</h5>
598
+ <p>The default use case for our section plugin is to create accordions on small screens and tabs on large screens.</p>
599
+ <%= code_example '
600
+ <div class="section-auto-sample" data-section="auto">
601
+ <section>
602
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
603
+ <div class="content-sample" data-slug="section1" data-section-content>
604
+ <p>Content of section 1.</p>
605
+ </div>
606
+ </section>
607
+ <section>
608
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
609
+ <div class="content-sample" data-slug="section2" data-section-content>
610
+ <p>Content of section 2.</p>
611
+ </div>
612
+ </section>
613
+ </div>', :html %>
614
+
615
+ <%= code_example '
616
+ .section-auto-sample {
617
+ @include section-container($section-type:accordion);
618
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
619
+
620
+ @media #{$small} {
621
+ @include section-container(false,$section-type:tabs);
622
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
623
+ }
624
+ }', :css %>
625
+
626
+ <div class="section-auto-sample" data-section="auto">
627
+ <section>
628
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
629
+ <div class="content-sample" data-slug="section1" data-section-content>
630
+ <p>Content of section 1.</p>
631
+ </div>
632
+ </section>
633
+ <section>
634
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
635
+ <div class="content-sample" data-slug="section2" data-section-content>
636
+ <p>Content of section 2.</p>
637
+ </div>
638
+ </section>
639
+ </div>
640
+
641
+ <hr>
642
+
643
+ <h5>Accordion Configuration</h5>
644
+ <p>You can have your section act like an accordion the entire time, like so:</p>
645
+ <%= code_example '
646
+ <div class="section-auto-sample-accordion" data-section="accordion">
647
+ <section>
648
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
649
+ <div class="content-sample" data-slug="section1" data-section-content>
650
+ <p>Content of section 1.</p>
651
+ </div>
652
+ </section>
653
+ <section>
654
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
655
+ <div class="content-sample" data-slug="section2" data-section-content>
656
+ <p>Content of section 2.</p>
657
+ </div>
658
+ </section>
659
+ </div>', :html %>
660
+
661
+ <%= code_example '
662
+ .section-auto-sample-accordion {
663
+ @include section-container($section-type:accordion);
664
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
665
+ }', :css %>
666
+
667
+ <div class="section-auto-sample-accordion" data-section="accordion">
668
+ <section>
669
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
670
+ <div class="content-sample" data-slug="section1" data-section-content>
671
+ <p>Content of section 1.</p>
672
+ </div>
673
+ </section>
674
+ <section>
675
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
676
+ <div class="content-sample" data-slug="section2" data-section-content>
677
+ <p>Content of section 2.</p>
678
+ </div>
679
+ </section>
680
+ </div>
681
+
682
+ <hr>
683
+
684
+ <h5>Tabs Configuration</h5>
685
+ <p>You can have your section act like tabs the entire time, like so:</p>
686
+ <%= code_example '
687
+ <div class="section-auto-sample-tabs" data-section="tabs">
688
+ <section>
689
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
690
+ <div class="content-sample" data-slug="section1" data-section-content>
691
+ <p>Content of section 1.</p>
692
+ </div>
693
+ </section>
694
+ <section>
695
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
696
+ <div class="content-sample" data-slug="section2" data-section-content>
697
+ <p>Content of section 2.</p>
698
+ </div>
699
+ </section>
700
+ </div>', :html %>
701
+
702
+ <%= code_example '
703
+ .section-auto-sample-tabs {
704
+ @include section-container($section-type:tabs);
705
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
706
+ }', :css %>
707
+
708
+ <div class="section-auto-sample-tabs" data-section="tabs">
709
+ <section>
710
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
711
+ <div class="content-sample" data-slug="section1" data-section-content>
712
+ <p>Content of section 1.</p>
713
+ </div>
714
+ </section>
715
+ <section>
716
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
717
+ <div class="content-sample" data-slug="section2" data-section-content>
718
+ <p>Content of section 2.</p>
719
+ </div>
720
+ </section>
721
+ </div>
722
+
723
+ <hr>
724
+
725
+ <h5>Vertical Tabs Configuration</h5>
726
+ <p>You can have your section act like vertical tabs on large screen and go back to accordion on small screens, like so:</p>
727
+ <%= code_example '
728
+ <div class="section-auto-sample-vtabs" data-section="vertical-tabs">
729
+ <section>
730
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
731
+ <div class="content-sample" data-slug="section1" data-section-content>
732
+ <p>Content of section 1.</p>
733
+ </div>
734
+ </section>
735
+ <section>
736
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
737
+ <div class="content-sample" data-slug="section2" data-section-content>
738
+ <p>Content of section 2.</p>
739
+ </div>
740
+ </section>
741
+ </div>', :html %>
742
+
743
+ <%= code_example '
744
+ .section-auto-sample-vtabs {
745
+ @include section-container($section-type:accordion);
746
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
747
+ }
748
+ @media #{$small} {
749
+ .section-auto-sample-vtabs {
750
+ @include section-container($section-type:vertical-tabs);
751
+ & > section { @include section($section-type:vertical-tabs, $title-selector:".title-sample", $content-selector:".content-sample"); }
752
+ }
753
+ }', :css %>
754
+
755
+ <div class="section-auto-sample-vtabs" data-section="vertical-tabs">
756
+ <section>
757
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
758
+ <div class="content-sample" data-slug="section1" data-section-content>
759
+ <p>Content of section 1.</p>
760
+ </div>
761
+ </section>
762
+ <section>
763
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
764
+ <div class="content-sample" data-slug="section2" data-section-content>
765
+ <p>Content of section 2.</p>
766
+ </div>
767
+ </section>
768
+ </div>
769
+
770
+ <hr>
771
+
772
+ <h5>Vertical Nav Configuration</h5>
773
+ <p>You can have your section act like vertical navigation the entire time, like so:</p>
774
+ <%= code_example '
775
+ <div class="nav-container">
776
+ <nav>
777
+ <div class="section-auto-sample-vnav" data-section="vertical-nav">
778
+ <section>
779
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
780
+ <div class="content-sample" data-slug="section1" data-section-content>
781
+ <p>Content of section 1.</p>
782
+ </div>
783
+ </section>
784
+ <section>
785
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
786
+ <div class="content-sample" data-slug="section2" data-section-content>
787
+ <p>Content of section 2.</p>
788
+ </div>
789
+ </section>
790
+ </div>
791
+ </nav>
792
+ <section class="page-content">
793
+ <p>Content...</p>
794
+ </section>
795
+ </div>', :html %>
796
+
797
+ <%= code_example '
798
+ .nav-container { @include grid-row($behavior:nest);
799
+ > nav { @include grid-column($columns:4); }
800
+ }
801
+
802
+ .section-auto-sample-vnav {
803
+ @include section-container($section-type:accordion);
804
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
805
+ }
806
+ @media #{$small} {
807
+ .section-auto-sample-vnav {
808
+ @include section-container($section-type:vertical-nav);
809
+ & > section { @include section($section-type:vertical-nav, $title-selector:".title-sample", $content-selector:".content-sample"); }
810
+ }
811
+ }', :css %>
812
+
813
+ <div class="nav-container">
814
+ <nav>
815
+ <div class="section-auto-sample-vnav" data-section="vertical-nav">
816
+ <section>
817
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
818
+ <div class="content-sample" data-slug="section1" data-section-content>
819
+ <p>Content of section 1.</p>
820
+ </div>
821
+ </section>
822
+ <section>
823
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
824
+ <div class="content-sample" data-slug="section2" data-section-content>
825
+ <p>Content of section 2.</p>
826
+ </div>
827
+ </section>
828
+ </div>
829
+ </nav>
830
+ <section class="page-content">
831
+ <p>Content...</p>
832
+ </section>
833
+ </div>
834
+ <hr>
835
+
836
+ <h5>Horizontal Nav Configuration</h5>
837
+ <p>You can have your section act like horizontal navigation the entire time, like so:</p>
838
+ <%= code_example '
839
+ <div class="section-auto-sample-hnav" data-section="horizontal-nav">
840
+ <section>
841
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
842
+ <div class="content-sample" data-slug="section1" data-section-content>
843
+ <p>Content of section 1.</p>
844
+ </div>
845
+ </section>
846
+ <section>
847
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
848
+ <div class="content-sample" data-slug="section2" data-section-content>
849
+ <p>Content of section 2.</p>
850
+ </div>
851
+ </section>
852
+ </div>', :html %>
853
+
854
+ <%= code_example '
855
+ .section-auto-sample-hnav {
856
+ @include section-container($section-type:accordion);
857
+ & > section { @include section($section-type:accordion, $title-selector:".title-sample", $content-selector:".content-sample"); }
858
+ }
859
+ @media #{$small} {
860
+ .section-auto-sample-hnav {
861
+ @include section-container($section-type:horizontal-nav);
862
+ & > section { @include section($section-type:horizontal-nav, $title-selector:".title-sample", $content-selector:".content-sample"); }
863
+ }
864
+ }', :css %>
865
+
866
+ <div class="section-auto-sample-hnav" data-section="horizontal-nav">
867
+ <section>
868
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
869
+ <div class="content-sample" data-slug="section1" data-section-content>
870
+ <p>Content of section 1.</p>
871
+ </div>
872
+ </section>
873
+ <section>
874
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
875
+ <div class="content-sample" data-slug="section2" data-section-content>
876
+ <p>Content of section 2.</p>
877
+ </div>
878
+ </section>
879
+ </div>
880
+
881
+ <hr>
882
+
883
+ <h5>Custom Styles Using the Mixin</h5>
884
+ <p>You have access to a few options that will make styling the sections really easy and you can add onto it as you want. You'll still need the data-section attribute to match the style you give the mixin.</p>
885
+ <%= code_example '
886
+ <div class="section-auto-sample-custom" data-section="tabs">
887
+ <section>
888
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
889
+ <div class="content-sample" data-slug="section1" data-section-content>
890
+ <p>Content of section 1.</p>
891
+ </div>
892
+ </section>
893
+ <section>
894
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
895
+ <div class="content-sample" data-slug="section2" data-section-content>
896
+ <p>Content of section 2.</p>
897
+ </div>
898
+ </section>
899
+ </div>', :html %>
900
+
901
+ <%= code_example '
902
+ .section-auto-sample-custom {
903
+ @include section-container($section-type:tabs);
904
+ & > section { @include section($section-type:tabs, $title-selector:".title-sample", $content-selector:".content-sample", $title-padding: 10px 50px, $title-color:#000, $title-bg:pink, $title-bg-hover:darken(pink,5%), $title-bg-active: #fff, $title-color-active: darken(pink,10%)); }
905
+ }', :css %>
906
+
907
+ <div class="section-auto-sample-custom" data-section="tabs">
908
+ <section>
909
+ <p class="title-sample" data-section-title><a href="#section1">Section 1</a></p>
910
+ <div class="content-sample" data-slug="section1" data-section-content>
911
+ <p>Content of section 1.</p>
912
+ </div>
913
+ </section>
914
+ <section>
915
+ <p class="title-sample" data-section-title><a href="#section1">Section 2</a></p>
916
+ <div class="content-sample" data-slug="section2" data-section-content>
917
+ <p>Content of section 2.</p>
918
+ </div>
919
+ </section>
920
+ </div>
921
+
922
+ <hr>
923
+
924
+ <h5>Default SCSS Variables</h5>
925
+ <%= code_example '
926
+ $include-html-section-classes: $include-html-classes !default;
927
+
928
+ /* We use these to set padding and hover factor */
929
+ $section-title-padding: emCalc(15px);
930
+ $section-content-padding: emCalc(15px);
931
+ $section-function-factor: 10%;
932
+
933
+ /* These style the titles */
934
+ $section-title-color: #333;
935
+ $section-title-bg: #efefef;
936
+ $section-title-bg-active: darken($section-title-bg, $section-function-factor);
937
+ $section-title-bg-active-tabs: #fff;
938
+ $section-title-bg-hover: darken($section-title-bg, $section-function-factor/2);
939
+
940
+ /* Want to control border size, here ya go! */
941
+ $section-border-size: 1px;
942
+ $section-border-style: solid;
943
+ $section-border-color: #ccc;
944
+
945
+ /* Font controls */
946
+ $section-font-size: emCalc(14px);
947
+
948
+ /* Control the color of the background and some size options */
949
+ $section-content-bg: #fff;
950
+ $section-vertical-nav-min-width: emCalc(200px);
951
+ $section-vertical-tabs-title-width: emCalc(200px);
952
+ $section-bottom-margin: emCalc(20px);
953
+ ', :css %>
954
+
955
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
956
+
957
+ <hr>
958
+
959
+ <h3>Using the JavaScript</h3>
960
+ <p>You'll need to include <code>zepto.js</code> and <code>abstractio.js</code> above the sections 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>
961
+
962
+ <p><a href="../javascript.html" title="How to install Abstractio JavaScript">Read how to install Abstractio JavaScript</a></p>
963
+
964
+ <p>Required Abstractio Library: <code>abstractio.section.js</code></p>
965
+
966
+ <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
967
+
968
+ <%= code_example '
969
+ <div class="section-container auto" data-section>
970
+ <section>
971
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
972
+ <div class="content" data-section-content>
973
+ <ul class="side-nav">
974
+ <li><a href="#">Link 1</a></li>
975
+ <li><a href="#">Link 2</a></li>
976
+ <li><a href="#">Link 3</a></li>
977
+ <li class="divider"></li>
978
+ <li><a href="#">Link 1</a></li>
979
+ </ul>
980
+ </div>
981
+ </section>
982
+ <section>
983
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
984
+ <div class="content" data-section-content>
985
+ <ul class="side-nav">
986
+ <li><a href="#">Link 1</a></li>
987
+ <li><a href="#">Link 2</a></li>
988
+ <li><a href="#">Link 3</a></li>
989
+ <li class="divider"></li>
990
+ <li><a href="#">Link 1</a></li>
991
+ </ul>
992
+ </div>
993
+ </section>
994
+ </div>
995
+ ', :html %>
996
+
997
+ <p><strong>Note:</strong> If you are using Sections in a Modal, or they are being loaded via AJAX, or they are hidden when Abstractio is initialized, you will need to reflow the sections to get tabs to display properly:</p>
998
+
999
+ <%= code_example "
1000
+ $('#myModal').on('opened', function () {
1001
+ $(this).abstractio('section', 'reflow');
1002
+ });
1003
+ ", :json %>
1004
+
1005
+ <h5>Optional JavaScript Configuration</h5>
1006
+
1007
+ <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>
1008
+
1009
+ <%= code_example "
1010
+ {
1011
+ deep_linking: false,
1012
+ one_up: true,
1013
+ rtl: false,
1014
+ callback: function (){}
1015
+ }", :js %>
1016
+
1017
+ </div>
1018
+ </div>
1019
+ </div>
1020
+ <div class="large-3 pull-9 columns">
1021
+ <%= render "_sidebar-components.html.erb" %>
1022
+ </div>
1023
+ </div>