modularis 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +24 -0
  3. data/.idea/scopes/scope_settings.xml +5 -0
  4. data/.rbenv-version +1 -0
  5. data/CONTRIBUTING.md +53 -0
  6. data/Gemfile +4 -0
  7. data/Gemfile.lock +19 -0
  8. data/Gruntfile.js +27 -0
  9. data/LICENSE +22 -0
  10. data/README.md +27 -0
  11. data/Rakefile +2 -0
  12. data/docs/CHANGELOG.md +260 -0
  13. data/docs/Capfile +4 -0
  14. data/docs/Gemfile +13 -0
  15. data/docs/Gemfile.lock +45 -0
  16. data/docs/Procfile +2 -0
  17. data/docs/README.md +1 -0
  18. data/docs/_sidebar-components.html.erb +115 -0
  19. data/docs/_sidebar.html.erb +115 -0
  20. data/docs/changelog.html.erb +33 -0
  21. data/docs/compile.rb +34 -0
  22. data/docs/components/alert-boxes.html.erb +204 -0
  23. data/docs/components/block-grid.html.erb +132 -0
  24. data/docs/components/breadcrumbs.html.erb +156 -0
  25. data/docs/components/button-groups.html.erb +230 -0
  26. data/docs/components/buttons.html.erb +222 -0
  27. data/docs/components/clearing.html.erb +152 -0
  28. data/docs/components/custom-forms.html.erb +309 -0
  29. data/docs/components/dropdown-buttons.html.erb +235 -0
  30. data/docs/components/dropdown.html.erb +188 -0
  31. data/docs/components/flex-video.html.erb +95 -0
  32. data/docs/components/forms.html.erb +477 -0
  33. data/docs/components/global.html.erb +92 -0
  34. data/docs/components/grid.html.erb +366 -0
  35. data/docs/components/inline-lists.html.erb +91 -0
  36. data/docs/components/joyride.html.erb +183 -0
  37. data/docs/components/keystrokes.html.erb +76 -0
  38. data/docs/components/kitchen-sink.html.erb +870 -0
  39. data/docs/components/labels.html.erb +102 -0
  40. data/docs/components/magellan.html.erb +86 -0
  41. data/docs/components/orbit.html.erb +276 -0
  42. data/docs/components/pagination.html.erb +183 -0
  43. data/docs/components/panels.html.erb +123 -0
  44. data/docs/components/pricing-tables.html.erb +156 -0
  45. data/docs/components/progress-bars.html.erb +123 -0
  46. data/docs/components/reveal.html.erb +162 -0
  47. data/docs/components/section.html.erb +496 -0
  48. data/docs/components/side-nav.html.erb +124 -0
  49. data/docs/components/split-buttons.html.erb +220 -0
  50. data/docs/components/sub-nav.html.erb +122 -0
  51. data/docs/components/switch.html.erb +290 -0
  52. data/docs/components/tables.html.erb +125 -0
  53. data/docs/components/thumbnails.html.erb +89 -0
  54. data/docs/components/tooltips.html.erb +75 -0
  55. data/docs/components/top-bar.html.erb +283 -0
  56. data/docs/components/type.html.erb +396 -0
  57. data/docs/components/visibility.html.erb +110 -0
  58. data/docs/config/deploy.rb +36 -0
  59. data/docs/config.ru +12 -0
  60. data/docs/controller.rb +53 -0
  61. data/docs/css/_coderay.scss +116 -0
  62. data/docs/css/_settings.scss +1 -0
  63. data/docs/css/docs.scss +185 -0
  64. data/docs/css/normalize.scss +396 -0
  65. data/docs/css/qunit-composite.css +13 -0
  66. data/docs/css/qunit.css +235 -0
  67. data/docs/faq.html.erb +63 -0
  68. data/docs/img/demos/demo1-th.jpg +0 -0
  69. data/docs/img/demos/demo1.jpg +0 -0
  70. data/docs/img/demos/demo2-th.jpg +0 -0
  71. data/docs/img/demos/demo2.jpg +0 -0
  72. data/docs/img/demos/demo3-th.jpg +0 -0
  73. data/docs/img/demos/demo3.jpg +0 -0
  74. data/docs/img/demos/demo4-th.jpg +0 -0
  75. data/docs/img/demos/demo4.jpg +0 -0
  76. data/docs/img/demos/demo5-th.jpg +0 -0
  77. data/docs/img/demos/demo5.jpg +0 -0
  78. data/docs/index.html.erb +285 -0
  79. data/docs/javascript.html.erb +134 -0
  80. data/docs/js/docs.js +3 -0
  81. data/docs/js/qunit-composite.js +105 -0
  82. data/docs/js/qunit.js +1977 -0
  83. data/docs/js/tests/tabs/simple_tabs.html +57 -0
  84. data/docs/js/tests/tabs/simple_tabs.js +54 -0
  85. data/docs/js/tests/tooltips/tooltips.html +39 -0
  86. data/docs/js/tests/tooltips/tooltips.js +11 -0
  87. data/docs/layout.html.erb +128 -0
  88. data/docs/media-queries.html.erb +96 -0
  89. data/docs/rails.html.erb +76 -0
  90. data/docs/rtl.html.erb +53 -0
  91. data/docs/sass.html.erb +1295 -0
  92. data/docs/support.html.erb +143 -0
  93. data/docs/test/_test-scripts.html.erb +36 -0
  94. data/docs/test/cards.html.erb +77 -0
  95. data/docs/test/flexbox-grid.html.erb +68 -0
  96. data/docs/test/flip-nav.html.erb +54 -0
  97. data/docs/test/layout.html.erb +15 -0
  98. data/docs/test/off-canvas1.html.erb +64 -0
  99. data/docs/test/off-canvas2.html.erb +75 -0
  100. data/docs/test/off-canvas3.html.erb +65 -0
  101. data/docs/test_layout.html.erb +128 -0
  102. data/js/modularis/index.js +18 -0
  103. data/js/vendor/custom.modernizr.js +4 -0
  104. data/js/vendor/jquery.js +9597 -0
  105. data/js/vendor/zepto.js +1884 -0
  106. data/lib/modularis/engine.rb +18 -0
  107. data/lib/modularis/generators/USAGE +15 -0
  108. data/lib/modularis/generators/install_generator.rb +54 -0
  109. data/lib/modularis/generators/templates/application.html.erb +46 -0
  110. data/lib/modularis/generators/templates/application.html.haml +31 -0
  111. data/lib/modularis/generators/templates/application.html.slim +28 -0
  112. data/lib/modularis/version.rb +3 -0
  113. data/lib/modularis.rb +17 -0
  114. data/modularis.gemspec +20 -0
  115. data/package.json +15 -0
  116. data/scss/compagecss/_variables.scss +1192 -0
  117. data/scss/compagecss/components/_alert-boxes.scss +106 -0
  118. data/scss/compagecss/components/_block-grid.scss +70 -0
  119. data/scss/compagecss/components/_breadcrumbs.scss +124 -0
  120. data/scss/compagecss/components/_button-groups.scss +88 -0
  121. data/scss/compagecss/components/_buttons.scss +226 -0
  122. data/scss/compagecss/components/_clearing.scss +217 -0
  123. data/scss/compagecss/components/_custom-forms.scss +246 -0
  124. data/scss/compagecss/components/_dropdown-buttons.scss +114 -0
  125. data/scss/compagecss/components/_dropdown.scss +149 -0
  126. data/scss/compagecss/components/_flex-video.scss +45 -0
  127. data/scss/compagecss/components/_flexbox-grid.scss +225 -0
  128. data/scss/compagecss/components/_flip.scss +105 -0
  129. data/scss/compagecss/components/_forms.scss +361 -0
  130. data/scss/compagecss/components/_global.scss +289 -0
  131. data/scss/compagecss/components/_grid.scss +184 -0
  132. data/scss/compagecss/components/_inline-lists.scss +52 -0
  133. data/scss/compagecss/components/_joyride.scss +210 -0
  134. data/scss/compagecss/components/_keystrokes.scss +56 -0
  135. data/scss/compagecss/components/_labels.scss +84 -0
  136. data/scss/compagecss/components/_magellan.scss +21 -0
  137. data/scss/compagecss/components/_off-canvas.scss +86 -0
  138. data/scss/compagecss/components/_orbit.scss +209 -0
  139. data/scss/compagecss/components/_pagination.scss +99 -0
  140. data/scss/compagecss/components/_panels.scss +76 -0
  141. data/scss/compagecss/components/_pricing-tables.scss +130 -0
  142. data/scss/compagecss/components/_progress-bars.scss +70 -0
  143. data/scss/compagecss/components/_reveal.scss +131 -0
  144. data/scss/compagecss/components/_section.scss +303 -0
  145. data/scss/compagecss/components/_side-nav.scss +68 -0
  146. data/scss/compagecss/components/_split-buttons.scss +166 -0
  147. data/scss/compagecss/components/_sub-nav.scss +67 -0
  148. data/scss/compagecss/components/_switch.scss +249 -0
  149. data/scss/compagecss/components/_tables.scss +80 -0
  150. data/scss/compagecss/components/_thumbs.scss +47 -0
  151. data/scss/compagecss/components/_tooltips.scss +113 -0
  152. data/scss/compagecss/components/_top-bar.scss +462 -0
  153. data/scss/compagecss/components/_type.scss +422 -0
  154. data/scss/compagecss/components/_visibility.scss +320 -0
  155. data/scss/modularis.scss +49 -0
  156. data/scss/normalize.scss +402 -0
  157. data/templates/project/.gitignore +44 -0
  158. data/templates/project/MIT-LICENSE.txt +20 -0
  159. data/templates/project/config.rb +26 -0
  160. data/templates/project/humans.txt +8 -0
  161. data/templates/project/index.html +124 -0
  162. data/templates/project/manifest.rb +44 -0
  163. data/templates/project/robots.txt +4 -0
  164. data/templates/project/scss/app.scss +48 -0
  165. data/templates/upgrade/manifest.rb +34 -0
  166. metadata +235 -0
@@ -0,0 +1,496 @@
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
+
12
+ <div class="row">
13
+ <div class="large-3 columns">
14
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
15
+ <section>
16
+ <p class="title"><a href="#">Section 1</a></p>
17
+ <div class="content">
18
+ <ul class="side-nav">
19
+ <li><a href="#">Link 1</a></li>
20
+ <li><a href="#">Link 2</a></li>
21
+ <li><a href="#">Link 3</a></li>
22
+ <li class="divider"></li>
23
+ <li><a href="#">Link 1</a></li>
24
+ </ul>
25
+ </div>
26
+ </section>
27
+ <section>
28
+ <p class="title"><a href="#">Section 2</a></p>
29
+ <div class="content">
30
+ <ul class="side-nav">
31
+ <li><a href="#">Link 1</a></li>
32
+ <li><a href="#">Link 2</a></li>
33
+ <li><a href="#">Link 3</a></li>
34
+ <li class="divider"></li>
35
+ <li><a href="#">Link 1</a></li>
36
+ </ul>
37
+ </div>
38
+ </section>
39
+ </div>
40
+ </div>
41
+ <div class="large-9 columns">
42
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
43
+ <section>
44
+ <p class="title"><a href="#">Section 1</a></p>
45
+ <div class="content">
46
+ <ul class="side-nav">
47
+ <li><a href="#">Link 1</a></li>
48
+ <li><a href="#">Link 2</a></li>
49
+ <li><a href="#">Link 3</a></li>
50
+ <li class="divider"></li>
51
+ <li><a href="#">Link 1</a></li>
52
+ </ul>
53
+ </div>
54
+ </section>
55
+ <section>
56
+ <p class="title"><a href="#">Section 2</a></p>
57
+ <div class="content">
58
+ <ul class="side-nav">
59
+ <li><a href="#">Link 1</a></li>
60
+ <li><a href="#">Link 2</a></li>
61
+ <li><a href="#">Link 3</a></li>
62
+ <li class="divider"></li>
63
+ <li><a href="#">Link 1</a></li>
64
+ </ul>
65
+ </div>
66
+ </section>
67
+ </div>
68
+ <div class="section-container auto" data-section data-options="deep_linking: true; one_up: false">
69
+ <section>
70
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
71
+ <div class="content" data-slug="panel1" data-section-content>
72
+ <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>
73
+ </div>
74
+ </section>
75
+ <section>
76
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
77
+ <div class="content" data-slug="panel2" data-section-content>
78
+ <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>
79
+ </div>
80
+ </section>
81
+ <div data-section-region class="section">
82
+ <p class="title" data-section-title><a href="#panel3">Section 3</a></p>
83
+ <div class="content" data-slug="panel3" data-section-content>
84
+ <form>
85
+ <div class="row collapse">
86
+ <div class="large-2 columns">
87
+ <label class="inline">Your Name</label>
88
+ </div>
89
+ <div class="large-10 columns">
90
+ <input type="text" id="yourName" placeholder="Jane Smith">
91
+ </div>
92
+ </div>
93
+ <div class="row collapse">
94
+ <div class="large-2 columns">
95
+ <label class="inline"> Your Email</label>
96
+ </div>
97
+ <div class="large-10 columns">
98
+ <input type="text" id="yourEmail" placeholder="jane@smithco.com">
99
+ </div>
100
+ </div>
101
+ <label>What's up?</label>
102
+ <textarea rows="4"></textarea>
103
+ <button type="submit" class="radius button">Submit</button>
104
+ </form>
105
+ </div>
106
+ </div>
107
+ </div>
108
+ </div>
109
+ </div>
110
+
111
+ <hr>
112
+
113
+ <h3>Sections Replace Accordion, Tabs, Vertical Nav &amp; Nav Bar</h3>
114
+ <p>Sections replace a few things that you are used to from Modularis 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>
115
+
116
+ <hr>
117
+
118
+ </div>
119
+ </div>
120
+
121
+ <div class="row">
122
+ <div class="large-12 columns">
123
+
124
+ <h3>Build With Predefined HTML Classes</h3>
125
+ <p>There are two ways to build sections in Modularis 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>
126
+
127
+ <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>
128
+
129
+ <%= code_example '
130
+ <div class="section-container auto" data-section>
131
+ <section>
132
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
133
+ <div class="content" data-section-content>
134
+ <p>Content of section 1.</p>
135
+ </div>
136
+ </section>
137
+ <section>
138
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
139
+ <div class="content" data-section-content>
140
+ <p>Content of section 2.</p>
141
+ </div>
142
+ </section>
143
+ </div>', :html %>
144
+ <p>This example will automatically switch between tabs and accordion based on the resolution of the device.</p>
145
+
146
+ <p>The class options:</p>
147
+ <ul class="disc">
148
+ <li>auto</li>
149
+ <li>tabs</li>
150
+ <li>accordion</li>
151
+ <li>vertical-nav</li>
152
+ <li>horizontal-nav</li>
153
+ </ul>
154
+
155
+ <p>For these styles to come across, make sure you have the <strong>default Modularis 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>
156
+
157
+ <hr>
158
+
159
+ <h3>Variations</h3>
160
+ <h6>Accordion</h6>
161
+ <p>Adding an <code>accordion</code> class to the section container will show an accordion on both small and large screens.</p>
162
+ <%= code_example '
163
+ <div class="section-container accordion" data-section="accordion">
164
+ <section>
165
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
166
+ <div class="content" data-section-content>
167
+ <p>Content of section 1.</p>
168
+ </div>
169
+ </section>
170
+ <section>
171
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
172
+ <div class="content" data-section-content>
173
+ <p>Content of section 2.</p>
174
+ </div>
175
+ </section>
176
+ </div>', :html %>
177
+
178
+ <h6>Tabs</h6>
179
+ <p>Adding a <code>tabs</code> class to the section container will enable tabs on both small and large screens.</p>
180
+ <%= code_example '
181
+ <div class="section-container tabs" data-section="tabs">
182
+ <section>
183
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
184
+ <div class="content" data-section-content>
185
+ <p>Content of section 1.</p>
186
+ </div>
187
+ </section>
188
+ <section>
189
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
190
+ <div class="content" data-section-content>
191
+ <p>Content of section 2.</p>
192
+ </div>
193
+ </section>
194
+ </div>', :html %>
195
+
196
+ <h6>Vertical Tabs</h6>
197
+ <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>
198
+
199
+ <%= code_example '
200
+ <div class="section-container vertical-tabs" data-section="vertical-tabs">
201
+ <section>
202
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
203
+ <div class="content" data-section-content>
204
+ <p>Content of section 1.</p>
205
+ </div>
206
+ </section>
207
+ <section>
208
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
209
+ <div class="content" data-section-content>
210
+ <p>Content of section 2.</p>
211
+ </div>
212
+ </section>
213
+ </div>', :html %>
214
+
215
+ <h6>Vertical Nav/Accordion</h6>
216
+ <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>
217
+
218
+ <p>Vertical navigation elements usually appear within the grid so the width can be controlled on desktop.</p>
219
+
220
+ <p>Use the <code>side-nav</code> class on the list to apply the Modularis navigation styles</p>
221
+
222
+ <%= code_example '
223
+ <div class="row">
224
+ <div class="large-3 columns">
225
+ <div class="section-container vertical-nav" data-section="vertical-nav" data-options="one_up: false;">
226
+ <section>
227
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
228
+ <div class="content" data-section-content>
229
+ <ul class="side-nav">
230
+ <li><a href="#">Link 1</a></li>
231
+ <li><a href="#">Link 2</a></li>
232
+ <li><a href="#">Link 3</a></li>
233
+ <li class="divider"></li>
234
+ <li><a href="#">Link 1</a></li>
235
+ </ul>
236
+ </div>
237
+ </section>
238
+ <section>
239
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
240
+ <div class="content" data-section-content>
241
+ <ul class="side-nav">
242
+ <li><a href="#">Link 1</a></li>
243
+ <li><a href="#">Link 2</a></li>
244
+ <li><a href="#">Link 3</a></li>
245
+ <li class="divider"></li>
246
+ <li><a href="#">Link 1</a></li>
247
+ </ul>
248
+ </div>
249
+ </section>
250
+ </div>
251
+ </div>
252
+ <div class="large-9 columns">
253
+ <p>Content to the right of the navigation.</p>
254
+ </div>
255
+ </div>', :html %>
256
+
257
+ <h6>Horizontal Nav/Nav Bar</h6>
258
+ <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>
259
+
260
+ <p>Horizontal navigation is a combination of the tab setting with vertical navigation drop downs.</p>
261
+
262
+ <p>Use the <code>side-nav</code> class on the list to apply the Modularis navigation styles</p>
263
+
264
+ <%= code_example '
265
+ <div class="section-container horizontal-nav" data-section="horizontal-nav" data-options="one_up: false;">
266
+ <section>
267
+ <p class="title" data-section-title><a href="#">Section 1</a></p>
268
+ <div class="content" data-section-content>
269
+ <ul class="side-nav">
270
+ <li><a href="#">Link 1</a></li>
271
+ <li><a href="#">Link 2</a></li>
272
+ <li><a href="#">Link 3</a></li>
273
+ <li class="divider"></li>
274
+ <li><a href="#">Link 1</a></li>
275
+ </ul>
276
+ </div>
277
+ </section>
278
+ <section>
279
+ <p class="title" data-section-title><a href="#">Section 2</a></p>
280
+ <div class="content" data-section-content>
281
+ <ul class="side-nav">
282
+ <li><a href="#">Link 1</a></li>
283
+ <li><a href="#">Link 2</a></li>
284
+ <li><a href="#">Link 3</a></li>
285
+ <li class="divider"></li>
286
+ <li><a href="#">Link 1</a></li>
287
+ </ul>
288
+ </div>
289
+ </section>
290
+ </div>
291
+ ', :html %>
292
+
293
+
294
+ <h6>Deep Linking</h6>
295
+ <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>
296
+
297
+ <%= code_example '
298
+ <div class="section-container auto" data-section data-options="deep_linking: true">
299
+ <section>
300
+ <p class="title" data-section-title><a href="#section1">Section 1</a></p>
301
+ <div class="content" data-slug="section1" data-section-content>
302
+ <p>Content of section 1.</p>
303
+ </div>
304
+ </section>
305
+ <section>
306
+ <p class="title" data-section-title><a href="#section2">Section 2</a></p>
307
+ <div class="content" data-slug="section2" data-section-content>
308
+ <p>Content of section 2.</p>
309
+ </div>
310
+ </section>
311
+ </div>', :html %>
312
+
313
+ <h6>Nested Sections</h6>
314
+ <p>You can infinitely nest Section elements to create more complicated Section layouts.</p>
315
+
316
+ <div class="section-container auto" data-section>
317
+ <section>
318
+ <p class="title"><a href="#section1">ROOT: Section 1</a></p>
319
+ <div class="content" data-slug="section1">
320
+ <p>Content 1 Summary Paragraphs</p>
321
+ <div class="section-container auto" data-section>
322
+ <section>
323
+ <p class="title"><a href="#section1-1">DETAIL: #1</a></p>
324
+ <div class="content">
325
+ <p>Detail awesome stuff!</p>
326
+ </div>
327
+ </section>
328
+ <section>
329
+ <p class="title"><a href="#section1-2">DETAIL: #2</a></p>
330
+ <div class="content">
331
+ <p>Detail awesome stuff numeroe duo.</p>
332
+ </div>
333
+ </section>
334
+ </div>
335
+ </div>
336
+ </section>
337
+ <section>
338
+ <p class="title"><a href="#section2">ROOT: Section 2</a></p>
339
+ <div class="content" data-slug="section2">
340
+ <p>Content 2</p>
341
+ </div>
342
+ </section>
343
+ </div>
344
+ <%= code_example '
345
+ <div class="section-container auto" data-section>
346
+ <section>
347
+ <p class="title"><a href="#section1">ROOT: Section 1</a></p>
348
+ <div class="content" data-slug="section1">
349
+ <p>Content 1 Summary Paragraphs</p>
350
+ <div class="section-container auto" data-section>
351
+ <section>
352
+ <p class="title"><a href="#section1-1">DETAIL: #1</a></p>
353
+ <div class="content">
354
+ <p>Detail awesome stuff!</p>
355
+ </div>
356
+ </section>
357
+ <section>
358
+ <p class="title"><a href="#section1-2">DETAIL: #2</a></p>
359
+ <div class="content">
360
+ <p>Detail awesome stuff numeroe duo.</p>
361
+ </div>
362
+ </section>
363
+ </div>
364
+ </div>
365
+ </section>
366
+ <section>
367
+ <p class="title"><a href="#section2">ROOT: Section 2</a></p>
368
+ <div class="content" data-slug="section2">
369
+ <p>Content 2</p>
370
+ </div>
371
+ </section>
372
+ </div>
373
+ ', :html %>
374
+
375
+ <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>
376
+
377
+ <hr>
378
+
379
+ <!-- <h3>Building with Mixins</h3>
380
+ <p>If you are keen on SCSS and use it for your Modularis 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>
381
+
382
+ <h5>Title and Content Elements</h5>
383
+ <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>
384
+
385
+ <p>Here's an example structure you might use with the section mixin:</p>
386
+
387
+ <%= code_example '
388
+ <div class="your-class-name" data-section="auto"> <!-- Can use "auto", "accordion", "tabs", "vertical-nav", or "horizontal-nav" -->
389
+ <section class="your-section-class">
390
+ <p class="your-title-class" data-section-title><a href="#section1">Section 1</a></p>
391
+ <div class="your-content-class" data-slug="section1" data-section-content>
392
+ <p>Content of section 1.</p>
393
+ </div>
394
+ </section>
395
+ <div data-section-region>
396
+ <p class="your-title-class" data-section-title><a href="#section2">Section 2</a></p>
397
+ <div class="your-content-class" data-slug="section2" data-section-content>
398
+ <p>Content of section 2.</p>
399
+ </div>
400
+ </div>
401
+ </div>', :html %>
402
+
403
+ <hr> -->
404
+
405
+ <h5>Default SCSS Variables</h5>
406
+ <%= code_example '
407
+ /* We use these to set padding and hover factor */
408
+ $section-padding: emCalc(15px);
409
+ $section-function-factor: 10%;
410
+
411
+ /* These style the titles */
412
+ $section-title-color: #333;
413
+ $section-title-bg: #efefef;
414
+ $section-title-bg-active: darken($section-title-bg, $section-function-factor);
415
+ $section-title-bg-active-tabs: #fff;
416
+
417
+ /* Want to control border size, here ya go! */
418
+ $section-border-size: 1px;
419
+ $section-border-style: solid;
420
+ $section-border-color: #ccc;
421
+
422
+ /* Control the color of the background and some size options */
423
+ $section-content-bg: #fff;
424
+ $section-vertical-nav-min-width: emCalc(200px);
425
+ $section-bottom-margin: emCalc(20px);
426
+ ', :css %>
427
+
428
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>.</p>
429
+
430
+ <hr>
431
+
432
+ <h3>Using the JavaScript</h3>
433
+ <p>You'll need to include <code>zepto.js</code> and <code>modularis.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>
434
+
435
+ <p><a href="../javascript.html" title="How to install Modularis JavaScript">Read how to install Modularis JavaScript</a></p>
436
+
437
+ <p>Required Modularis Library: <code>modularis.section.js</code></p>
438
+
439
+ <p>Then, you'll need to add a data-attribute to make the JS work properly on that element. That looks like:</p>
440
+
441
+ <%= code_example '
442
+ <div class="section-container auto" data-section>
443
+ <section>
444
+ <p class="title" data-section-title><a href="#panel1">Section 1</a></p>
445
+ <div class="content" data-section-content>
446
+ <ul class="side-nav">
447
+ <li><a href="#">Link 1</a></li>
448
+ <li><a href="#">Link 2</a></li>
449
+ <li><a href="#">Link 3</a></li>
450
+ <li class="divider"></li>
451
+ <li><a href="#">Link 1</a></li>
452
+ </ul>
453
+ </div>
454
+ </section>
455
+ <section>
456
+ <p class="title" data-section-title><a href="#panel2">Section 2</a></p>
457
+ <div class="content" data-section-content>
458
+ <ul class="side-nav">
459
+ <li><a href="#">Link 1</a></li>
460
+ <li><a href="#">Link 2</a></li>
461
+ <li><a href="#">Link 3</a></li>
462
+ <li class="divider"></li>
463
+ <li><a href="#">Link 1</a></li>
464
+ </ul>
465
+ </div>
466
+ </section>
467
+ </div>
468
+ ', :html %>
469
+
470
+ <p><strong>Note:</strong> If you are using Sections in a Modal, or they are being loaded via AJAX, or they are hidden when Modularis is initialized, you will need to reflow the sections to get tabs to display properly:</p>
471
+
472
+ <%= code_example "
473
+ $('#myModal').on('opened', function () {
474
+ $(this).modularis('section', 'reflow');
475
+ });
476
+ ", :json %>
477
+
478
+ <h5>Optional JavaScript Configuration</h5>
479
+
480
+ <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>
481
+
482
+ <%= code_example "
483
+ {
484
+ deep_linking: false,
485
+ one_up: true,
486
+ rtl: false,
487
+ callback: function (){}
488
+ }", :js %>
489
+
490
+ </div>
491
+ </div>
492
+ </div>
493
+ <div class="large-3 pull-9 columns">
494
+ <%= render "_sidebar-components.html.erb" %>
495
+ </div>
496
+ </div>
@@ -0,0 +1,124 @@
1
+ <% @side_nav = "nav" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Side Nav" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h1><%= @page_title %></h1>
10
+ <h4 class="subheader">Side nav, like you'll see on Modularis's main site, is useful for sections of either a site or a page.</h4>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+
17
+ <div class="row">
18
+ <div class="large-4 columns end">
19
+ <ul class="side-nav">
20
+ <li class="active"><a href="#">Link 1</a></li>
21
+ <li><a href="#">Link 2</a></li>
22
+ <li class="divider"></li>
23
+ <li><a href="#">Link 3</a></li>
24
+ <li><a href="#">Link 4</a></li>
25
+ </ul>
26
+ </div>
27
+ </div>
28
+
29
+ <hr>
30
+
31
+ <h3>Build With Predefined HTML Classes</h3>
32
+ <p>There are two ways to build a side nav in Modularis 4: either with our predefined HTML classes or our mixins. Building side nav using our predefined classes is simple, you'll just need to write a <code>&lt;ul class="side-nav"&gt;</code> and fill it full of list items. The width of the side nav is controlled by the columns you put it inside.</p>
33
+
34
+ <p>The list item options:</p>
35
+ <ul class="disc">
36
+ <li><code>active</code> Will add style to denote the active link.</li>
37
+ <li><code>divider</code> Creates a divider between list items.</li>
38
+ </ul>
39
+
40
+ <%= code_example '
41
+ <ul class="side-nav">
42
+ <li class="active"><a href="#">Link 1</a></li>
43
+ <li><a href="#">Link 2</a></li>
44
+ <li class="divider"></li>
45
+ <li><a href="#">Link 3</a></li>
46
+ <li><a href="#">Link 4</a></li>
47
+ </ul>', :html %>
48
+
49
+
50
+
51
+ <p>For these styles to come across, make sure you have the default Modularis CSS package or that you've selected side nav from a custom package. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
52
+
53
+ <hr>
54
+
55
+ <h3>Build with our Mixins</h3>
56
+ <p>We've included SCSS mixins used to style side nav. 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/modularis/blob/master/scss/modularis/_modularis-global.scss">_modularis-global.scss</a>, <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_global.scss">_global.scss</a> and <a href="https://github.com/themepile/modularis/blob/master/scss/modularis/components/_side-nav.scss">_side-nav.scss</a> from Github and throw them into a Modularis folder in your project directory. From there, you can import the files at the top of your own SCSS stylesheet, like so:</p>
57
+
58
+ <%= code_example '
59
+ @import "modularis/modularis-global", "modularis/components/global", "modularis/components/side-nav";
60
+ ', :css %>
61
+
62
+ <h5>Quick Mixin</h5>
63
+ <p>You can build your side nav using our global mixin by including it on a custom class or ID in your own stylesheet. The mixin contains options for changing the background color, which also controls the border and text color. You'll also have the ability to change the font-size and padding. The rest of the defaults can be modified using the available variables. The global mixin looks like this:</p>
64
+
65
+ <%= code_example '
66
+ /* Using the default styles */
67
+ .your-class-name { @include side-nav; }', :css %>
68
+
69
+ <p>There are also three options you can customize on the fly when writing this mixin. These controls things like: divider color, text size and font color.</p>
70
+
71
+ <%= code_example '
72
+ /* Using the available options */
73
+ .your-class-name { @include side-nav($divider-color, $font-size, $link-color); }
74
+
75
+ /* Control the color of the divider between links */
76
+ $divider-color: $side-nav-divider-color
77
+
78
+ /* Control your font-size per label */
79
+ $font-size: $side-nav-font-size
80
+
81
+ /* Change the background color for your labels */
82
+ $link-color: $side-nav-link-color
83
+ ', :css %>
84
+
85
+ <ul class="side-nav-custom large-3">
86
+ <li class="active"><a href="#">Link 1</a></li>
87
+ <li><a href="#">Link 2</a></li>
88
+ <li class="divider"></li>
89
+ <li><a href="#">Link 3</a></li>
90
+ <li><a href="#">Link 4</a></li>
91
+ </ul>
92
+
93
+
94
+ <h5>Default SCSS Variables</h5>
95
+
96
+ <%= code_example '
97
+ /* We use this to control padding. */
98
+ $side-nav-padding: emCalc(14px) 0;
99
+
100
+ /* We use these to control list styles. */
101
+ $side-nav-list-type: none;
102
+ $side-nav-list-position: inside;
103
+ $side-nav-list-margin: 0 0 emCalc(7px) 0;
104
+
105
+ /* We use these to control link styles. */
106
+ $side-nav-link-color: $primary-color;
107
+ $side-nav-link-color-active: lighten(#000, 30%);
108
+ $side-nav-font-size: emCalc(14px);
109
+ $side-nav-font-weight: bold;
110
+
111
+ /* We use these to control border styles */
112
+ $side-nav-divider-size: 1px;
113
+ $side-nav-divider-style: solid;
114
+ $side-nav-divider-color: darken(#fff, 10%);', :css %>
115
+
116
+ <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>_modularis-global.scss</strong>.</p>
117
+
118
+ </div>
119
+ </div>
120
+ </div>
121
+ <div class="large-3 pull-9 columns">
122
+ <%= render "_sidebar-components.html.erb" %>
123
+ </div>
124
+ </div>