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,123 @@
1
+ <% @side_nav = "css" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Panels" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">A panel is a simple, helpful Modularis component that enables you to outline sections of your page easily. This allows you to view your page sections as you add content to them or add emphasis to a section. The width is controlled by the grid columns you put them inside.</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-6 columns">
19
+ <div class="panel">
20
+ <h5>This is a regular panel.</h5>
21
+ <p>It has an easy to override visual style, and is appropriately subdued.</p>
22
+ </div>
23
+ </div>
24
+ <div class="large-6 columns">
25
+ <div class="panel callout radius">
26
+ <h5>This is a callout panel.</h5>
27
+ <p>It's a little ostentatious, but useful for important content.</p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <hr>
33
+
34
+ <h3>Build With Predefined HTML Classes</h3>
35
+ <p>There are two ways to build panels in Modularis 4, either with our predefined HTML or with our mixin. Building panels using our predefined class isn't hard at all. You'll start with <code>&lt;div&gt;</code> and add a class of <code>.panel</code> to it. From there, you just need to add content inside, anything will do.</p>
36
+
37
+ <p>Available HTML class options:</p>
38
+ <ul class="disc">
39
+ <li>Adding <code>.callout</code> to your panel will make it our default blue and add a shiny top edge to help it stand out.</li>
40
+ <li>You may also you <code>.radius</code> to add a tasteful border-radius to the mix.</li>
41
+ </ul>
42
+
43
+ <%= code_example '
44
+ <div class="panel">
45
+ <!-- Content here -->
46
+ </div>', :html %>
47
+
48
+ <div class="panel">Basic panel with content.</div>
49
+
50
+ <p>For these styles to come across, make sure you have the default Modularis CSS package or that you've selected panels from a custom package. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
51
+
52
+ <hr>
53
+
54
+ <h3>Build with a Mixin</h3>
55
+ <p>We've included SCSS mixins used to style panels so that you can code smarter. 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/_panels.scss">_panels.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>
56
+
57
+ <%= code_example '
58
+ @import "modularis/modularis-global", "modularis/components/global", "modularis/components/panels";
59
+ ', :css %>
60
+
61
+ <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like to the <code>&lt;div&gt;</code>.</p>
62
+
63
+ <%= code_example '
64
+ <div class="your-class-name">
65
+ <!-- Content here -->
66
+ </div>', :html %>
67
+
68
+ <h5>Quick Mixin</h5>
69
+ <p>You can build your panel using our global mixin by including it on your own custom class or ID. The mixin contains all the necessary styles and they can be customized a bit within the mixin. The rest of the important styles are controlled by variables. The code looks like this:</p>
70
+
71
+ <%= code_example '
72
+ .your-class-name { @include panel; }', :css %>
73
+
74
+ <div class="panel">
75
+ Panel content goes here...
76
+ </div>
77
+
78
+ <p>You also have <strong>two options</strong> available to customize the panel within the mixin. These control the background color (which also effect border and font color) and the interior padding of the panel itself.</p>
79
+
80
+ <%= code_example '
81
+ .your-class-name { @include panel($bg, $padding); }
82
+
83
+ /* This controls the background color, border color and type color based on brightness of the bg. */
84
+ $bg: $secondary-color
85
+
86
+ /* This controls the interior padding */
87
+ $padding: $panel-padding
88
+ ', :css %>
89
+
90
+ <div class="panel-custom">
91
+ Custom panel. Hell yeah! We used @include panel(pink, 40px);
92
+ </div>
93
+
94
+ <h5>Default SCSS Variables</h5>
95
+
96
+ <%= code_example '
97
+ /* We use these to control the background and border styles */
98
+ $panel-bg: darken(#fff, 5%);
99
+ $panel-border-style: solid;
100
+ $panel-border-size: 1px;
101
+
102
+ /* We use this % to control how much we darken things on hover */
103
+ $panel-function-factor: 10%;
104
+ $panel-border-color: darken($panel-bg, $panel-function-factor);
105
+
106
+ /* We use these to set default inner padding and bottom margin */
107
+ $panel-margin-bottom: emCalc(20px);
108
+ $panel-padding: emCalc(20px);
109
+
110
+ /* We use these to set default font colors */
111
+ $panel-font-color: #333;
112
+ $panel-font-color-alt: #fff;', :css %>
113
+
114
+ <p><strong>Note:</strong> <code>emCalc();</code> is a function we wrote to convert <code>px</code> to <code>em</code>. It is included in <strong>_modularis-global.scss</strong>.</p>
115
+
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,156 @@
1
+ <% @side_nav = "css" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Pricing Tables" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">If you're making a rockin' marketing site for a subscription-based product, you are likely in need of a pricing table. These fill 100% of their container and are made from a simple unordered list.</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 large-centered">
19
+ <ul class="pricing-table">
20
+ <li class="title">Standard</li>
21
+ <li class="price">$99.99</li>
22
+ <li class="description">An awesome description</li>
23
+ <li class="bullet-item">1 Database</li>
24
+ <li class="bullet-item">5GB Storage</li>
25
+ <li class="bullet-item">20 Users</li>
26
+ <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
27
+ </ul>
28
+ </div>
29
+ </div>
30
+
31
+ <hr>
32
+
33
+ <h3>Build With Predefined HTML Classes</h3>
34
+ <p>There are two ways to build pricing tables in Modularis 4: with our predefined HTML or with our mixins. Building pricing tables with our predefined classes is quite easy. You'll start with an <code>&lt;ul&gt;</code> and add a class of <code>.pricing-table</code> to it. From there, you just need to add list items inside that represent each piece of the table.</p>
35
+
36
+ <p>Available HTML class options for the list items:</p>
37
+ <ul class="disc">
38
+ <li><code>&lt;li class="title"&gt;</code>: Creates the styles for a title.</li>
39
+ <li><code>&lt;li class="price"&gt;</code>: Add a price that stands out.</li>
40
+ <li><code>&lt;li class="description"&gt;</code>: If you need to describe the plan, add this.</li>
41
+ <li><code>&lt;li class="bullet-item"&gt;</code>: To call out features, use this list item.</li>
42
+ <li><code>&lt;li class="cta-button"&gt;</code>: To add a button inside a list item, use this.</li>
43
+ </ul>
44
+
45
+ <%= code_example '
46
+ <ul class="pricing-table">
47
+ <li class="title">Standard</li>
48
+ <li class="price">$99.99</li>
49
+ <li class="description">An awesome description</li>
50
+ <li class="bullet-item">1 Database</li>
51
+ <li class="bullet-item">5GB Storage</li>
52
+ <li class="bullet-item">20 Users</li>
53
+ <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
54
+ </ul>', :html %>
55
+
56
+ <p>For these styles to come across, make sure you have the default Modularis CSS package or that you've selected pricing-tables from a custom package. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
57
+
58
+ <hr>
59
+
60
+ <h3>Build with a Mixin</h3>
61
+ <p>We've included SCSS mixins used to style pricing tables so that you can code how you want to. 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/_pricing-tables.scss">_pricing-tables.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>
62
+
63
+ <%= code_example '
64
+ @import "modularis/modularis-global", "modularis/components/global", "modularis/components/pricing-tables";
65
+ ', :css %>
66
+
67
+ <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like with the <code>&lt;ul&gt;</code> and the list items inside it.</p>
68
+
69
+ <%= code_example '
70
+ <ul class="your-pricing-class">
71
+ <li class="your-title-class">Title</li>
72
+ <li class="your-price-class">$$$</li>
73
+ <li class="your-desc-class">...</li>
74
+ <li class="your-bullet-class">Bullet</li>
75
+ <li class="your-cta-class"><a class="your-button-class" href="#">Button</a></li>
76
+ </ul>', :html %>
77
+
78
+ <h5>The Container Mixin</h5>
79
+ <p>Pricing tables are built up from an unordered list. We give this container some necessary styles by using our container mixin. There are no customizable options within the mixin, but everything can be changed using the SCSS variables below.</p>
80
+
81
+ <%= code_example '
82
+ .your-pricing-class { @include pricing-table-container;
83
+ .your-title-class { @include pricing-table-title; }
84
+ .your-price-class { @include pricing-table-price; }
85
+ .your-desc-class { @include pricing-table-description; }
86
+ .your-bullet-class { @include pricing-table-bullet; }
87
+ .your-cta-class { @include pricing-table-cta; }
88
+ }', :css %>
89
+
90
+ <ul class="pricing-table">
91
+ <li class="title">Standard</li>
92
+ <li class="price">$99.99</li>
93
+ <li class="description">An awesome description</li>
94
+ <li class="bullet-item">1 Database</li>
95
+ <li class="bullet-item">5GB Storage</li>
96
+ <li class="bullet-item">20 Users</li>
97
+ <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
98
+ </ul>
99
+
100
+ <h5>Default SCSS Variables</h5>
101
+
102
+ <%= code_example '
103
+ /* We use this to control the border color */
104
+ $price-table-border: solid 1px #ddd;
105
+
106
+ /* We use this to control the bottom margin of the pricing table */
107
+ $price-table-margin-bottom: emCalc(20px);
108
+
109
+ /* We use these to control the title styles */
110
+ $price-title-bg: #ddd;
111
+ $price-title-padding: emCalc(15px) emCalc(20px);
112
+ $price-title-align: center;
113
+ $price-title-color: #333;
114
+ $price-title-weight: bold;
115
+ $price-title-size: emCalc(16px);
116
+
117
+ /* We use these to control the price styles */
118
+ $price-money-bg: #eee;
119
+ $price-money-padding: emCalc(15px) emCalc(20px);
120
+ $price-money-align: center;
121
+ $price-money-color: #333;
122
+ $price-money-weight: normal;
123
+ $price-money-size: emCalc(20px);
124
+
125
+ /* We use these to control the description styles */
126
+ $price-bg: #fff;
127
+ $price-desc-color: #777;
128
+ $price-desc-padding: emCalc(15px);
129
+ $price-desc-align: center;
130
+ $price-desc-font-size: emCalc(12px);
131
+ $price-desc-weight: normal;
132
+ $price-desc-line-height: 1.4;
133
+ $price-desc-bottom-border: dotted 1px #ddd;
134
+
135
+ /* We use these to control the list item styles */
136
+ $price-item-color: #333;
137
+ $price-item-padding: emCalc(15px);
138
+ $price-item-align: center;
139
+ $price-item-font-size: emCalc(14px);
140
+ $price-item-weight: normal;
141
+ $price-item-bottom-border: dotted 1px #ddd;
142
+
143
+ /* We use these to control the CTA area styles */
144
+ $price-cta-bg: #f5f5f5;
145
+ $price-cta-align: center;
146
+ $price-cta-padding: emCalc(20px) emCalc(20px) 0;', :css %>
147
+
148
+ <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>
149
+
150
+ </div>
151
+ </div>
152
+ </div>
153
+ <div class="large-3 pull-9 columns">
154
+ <%= render "_sidebar-components.html.erb" %>
155
+ </div>
156
+ </div>
@@ -0,0 +1,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 Modularis 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 Modularis 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/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/_progress-bars.scss">_progress-bars.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>
50
+
51
+ <%= code_example '
52
+ @import "modularis/modularis-global", "modularis/components/global", "modularis/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>_modularis-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. Modularis 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 Modularis 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').modularis('reveal', 'open');
60
+ $('#myModal').modularis('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>_modularis-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 Modularis. The only reason you'll need to include <code>modularis.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>modularis.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 Modularis JavaScript">Read how to install Modularis JavaScript</a></p>
99
+
100
+ <p>Required Modularis Library: <code>modularis.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
+