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,222 @@
1
+ <% @side_nav = "buttons" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Buttons" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">Buttons are a convenient tool when it comes to more traditional actions. To that end, Abstractio has a lot of easy to use button styles that you can customize or override to fit your needs.</h4>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+
17
+ <div class="row">
18
+ <div class="small-6 large-6 columns">
19
+ <a href="#" class="tiny button">.tiny.button</a><br>
20
+ <a href="#" class="small button">.small.button</a><br>
21
+ <a href="#" class="button">.button</a><br>
22
+ </div>
23
+ <div class="small-6 large-6 columns">
24
+ <a href="#" class="tiny button secondary">.tiny.secondary</a><br>
25
+ <a href="#" class="small button success radius">.small.success.radius</a><br>
26
+ <a href="#" class="button alert round disabled">.round.disabled</a><br>
27
+ </div>
28
+ </div>
29
+ <a href="#" class="large button expand">.large.button.expand</a>
30
+
31
+ <hr>
32
+
33
+ <h3>Build With Predefined HTML Classes</h3>
34
+ <p>There are two ways to build buttons in Abstractio 4: with our predefined HTML classes or with our structure and mixins. Building buttons using our predefined classes is simple, you'll need an <code>&lt;a&gt;</code>, <code>&lt;button&gt;</code> or <code>&lt;input&gt;</code> with a class of <code>.button</code>. This will create a default medium button. You can also use size, color and radius classes to control more of the style.</p>
35
+
36
+ <p>The class options:</p>
37
+ <ul class="disc">
38
+ <li>The size classes include: <code>.tiny, .small, .medium</code> or <code>.large</code></li>
39
+ <li>The color classes include: <code>.secondary, .alert</code> or <code>.success</code></li>
40
+ <li>The radius classes include: <code>.radius</code> or <code>.round</code></li>
41
+ <li>You can also add <code>.disabled</code> to any button and it will look and act disabled</li>
42
+ </ul>
43
+
44
+ <%= code_example '
45
+ <!-- Size Classes -->
46
+ <a href="#" class="button">Default Button</a>
47
+ <a href="#" class="tiny button">Tiny Button</a>
48
+ <a href="#" class="small button">Small Button</a>
49
+ <a href="#" class="large button">Large Button</a>
50
+
51
+ <!-- Color Classes -->
52
+ <a href="#" class="button secondary">Secondary Button</a>
53
+ <a href="#" class="button success">Success Button</a>
54
+ <a href="#" class="button alert">Alert Button</a>
55
+
56
+ <!-- Radius Classes -->
57
+ <a href="#" class="button radius">Radius Button</a>
58
+ <a href="#" class="button round">Round Button</a>
59
+
60
+ <!-- Disabled Class -->
61
+ <a href="#" class="button disabled">Disabled Button</a>
62
+ ', :html %>
63
+
64
+ <p>You may chain one class from each group to build up desired default styles. For these styles to take effect, make sure you have the <strong>default Abstractio CSS package</strong> or that you've selected <strong>button from a custom package</strong>. These should be linked up following our default <a href="../index.html">HTML page structure</a>.</p>
65
+
66
+ <hr>
67
+
68
+ <h3>Build with Mixins</h3>
69
+ <p>We've included SCSS mixins used to style buttons. To use these mixins, 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/_buttons.scss">_buttons.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>
70
+
71
+ <%= code_example '
72
+ @import "abstractio/abstractio-global", "abstractio/components/global", "abstractio/components/buttons";
73
+ ', :css %>
74
+
75
+ <p>If you are using the mixins, you may include the styles on whatever class or ID you'd like, just make sure you follow our markup structure:</p>
76
+
77
+ <%= code_example '
78
+ <a href="#" class="your-class-name">Button Text</a>
79
+ ', :html %>
80
+
81
+ <h5>Quick Mixin</h5>
82
+ <p>You can quickly build an entire button using our global mixin by including it on your custom class or ID in your stylesheet. The global mixin will create the necessary style for the button. The global mixin looks like this:</p>
83
+
84
+ <%= code_example '
85
+ /* Using the default styles */
86
+ .your-class-name { @include button; }
87
+ ', :css %>
88
+
89
+ <a href="#" class="button">Default Button</a>
90
+
91
+ <p>There are also <strong>six options</strong> you can customize on the fly when writing this mixin. These controls things like: background color, border color, text color, size and state. Setting any of these options to <strong>false</strong> will negate those styles.</p>
92
+
93
+ <%= code_example '
94
+ /* Using the available options */
95
+ .your-class-name {
96
+ @include button($padding, $bg, $radius, $full-width, $disabled, $is-input);
97
+ }
98
+
99
+ /* This controls padding around the buttons. Use a variable or em value */
100
+ $padding: $button-med
101
+
102
+ /* This controls button color. Set to one of our variables or a custom hex value */
103
+ $bg: $primary-color
104
+
105
+ /* This controls button radius. Set to a variable, true/false, or custom px value */
106
+ $radius: false
107
+
108
+ /* This whether button is full-width. Set to true or false */
109
+ $full-width: false
110
+
111
+ /* This controls whether disabled styles are used. Set to true or false */
112
+ $disabled: false
113
+
114
+ /* This controls padding for inputs, they are a little different */
115
+ $is-input: false
116
+ ', :css %>
117
+
118
+ <a href="#" class="custom buttony">Custom Button</a>
119
+
120
+ <h5>Base Mixin</h5>
121
+ <p>You also have access to a few internal mixins that can create parts of the button as needed. The base mixin will create a button base that only include structural styles.</p>
122
+
123
+ <%= code_example '
124
+ .your-class-name { @include button-base; }
125
+ ', :css %>
126
+
127
+ <a href="#" class="button-base">Button Base</a>
128
+
129
+ <h5>Size Mixin</h5>
130
+ <p>The size mixin will let you control the padding, which adjusts text size. You can also choose whether the button is full-width or an input button.</p>
131
+
132
+ <%= code_example '
133
+ .your-class-name {
134
+ @include button-base;
135
+ @include button-size($padding, $full-width, $is-input);
136
+ }
137
+ ', :css %>
138
+
139
+ <a href="#" class="button-base size">Button Base &amp; Size</a>
140
+
141
+ <h5>Style Mixin</h5>
142
+ <p>The last internal mixin you have access to for buttons is the style mixin. This will help you style background color, text, border and radius.</p>
143
+
144
+ <%= code_example '
145
+ .your-class-name {
146
+ @include button-base;
147
+ @include button-size;
148
+ @include button-style($bg, $radius, $disabled);
149
+ }
150
+ ', :css %>
151
+
152
+ <a href="#" class="button-base size style">Button Base, Size &amp; Style</a>
153
+
154
+ <h5>Inset Shadow, Border Radius &amp; Transition Mixin</h5>
155
+ <p>Sometimes you want to add a nice fancy shine to the edge of your button. And sometimes you want to make that shine look like it gets depressed upon tap or click. We've got you covered with our quick inset shadow mixin. You can use our radius mixin to quickly apply rounded corners or a transition mixin to give the button a nice zero-fade.</p>
156
+
157
+ <%= code_example '
158
+ .your-class-name {
159
+ @include button-base;
160
+ @include button-size;
161
+ @include button-style;
162
+ @include radius;
163
+ @include single-transition;
164
+ @include inset-shadow($active);
165
+ }
166
+
167
+ /* This controls whether or not you get the depressed look on tap/click. */
168
+ /* Set to true or false, defaults to true. */
169
+ $active: true
170
+ ', :css %>
171
+
172
+ <a href="#" class="button-base size style radius shine">Button Base, Size, Style &amp; Shine</a>
173
+
174
+ <h5>Default SCSS Variables</h5>
175
+ <%= code_example '
176
+ /* We use these to build padding for buttons. */
177
+ $button-med: emCalc(12px);
178
+ $button-tny: emCalc(7px);
179
+ $button-sml: emCalc(9px);
180
+ $button-lrg: emCalc(16px);
181
+
182
+ /* We use this to control the display property. */
183
+ $button-display: inline-block;
184
+ $button-margin-bottom: emCalc(20px);
185
+
186
+ /* We use these to control button text styles. */
187
+ $button-font-color: #fff;
188
+ $button-font-color-alt: #333;
189
+ $button-font-med: emCalc(16px);
190
+ $button-font-tny: emCalc(11px);
191
+ $button-font-sml: emCalc(13px);
192
+ $button-font-lrg: emCalc(20px);
193
+ $button-font-weight: bold;
194
+ $button-font-align: center;
195
+
196
+ /* We use these to control various hover effects. */
197
+ $button-function-factor: 10%;
198
+
199
+ /* We use these to control button border styles. */
200
+ $button-border-width: 1px;
201
+ $button-border-style: solid;
202
+ $button-border-color: darken($primary-color, $button-function-factor);
203
+
204
+ /* We use this to set the default radius used throughout the core. */
205
+ $button-radius: $global-radius;
206
+
207
+ /* We use this to set default opacity for disabled buttons. */
208
+ $button-disabled-opacity: 0.6;
209
+ ', :css %>
210
+
211
+ <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>
212
+
213
+ </div>
214
+ </div>
215
+
216
+ </div>
217
+
218
+ <div class="large-3 pull-9 columns">
219
+ <%= render "_sidebar-components.html.erb" %>
220
+ </div>
221
+
222
+ </div>
@@ -0,0 +1,152 @@
1
+ <% @side_nav = "js" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Clearing" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">Since Orbit isn't intended for variable-height content, we decided it would be a great idea to create a plugin that would help in that regard. Clearing makes it easy to create responsive lightboxes with any size image.</h4>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+
17
+ <ul class="clearing-thumbs" data-clearing>
18
+ <li><a class="th" href="../img/demos/demo1.jpg"><img data-caption="Nulla vitae elit libero, a pharetra augue. Cras mattis consectetur purus sit amet fermentum." src="../img/demos/demo1-th.jpg"></a></li>
19
+ <li><a class="th" href="../img/demos/demo2.jpg"><img src="../img/demos/demo2-th.jpg"></a></li>
20
+ <li><a class="th" href="../img/demos/demo3.jpg"><img data-caption="Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus." src="../img/demos/demo3-th.jpg"></a></li>
21
+ <li><a class="th" href="../img/demos/demo4.jpg"><img src="../img/demos/demo4-th.jpg"></a></li>
22
+ <li><a class="th" href="../img/demos/demo5.jpg"><img data-caption="Integer posuere erat a ante venenatis dapibus posuere velit aliquet." src="../img/demos/demo5-th.jpg"></a></li>
23
+ </ul>
24
+
25
+ </div>
26
+ </div>
27
+
28
+ <div class="row">
29
+ <div class="large-12 columns">
30
+ <hr>
31
+ </div>
32
+ </div>
33
+
34
+ <div class="row">
35
+ <div class="large-12 columns">
36
+
37
+ <h3>Build Your Clearing Lightbox</h3>
38
+ <p>There is only one way to build a Clearing lightbox, using our predefined class and data-attribute structure. We've made it really easy: gather some images, decide on their order, and put them into a <code>&lt;ul class="clearing-thumbs"&gt;</code> of your choice. In order to get Clearing to build itself properly, you'll need to have Javascript properly included. We outline <a href="#js">Clearing JS</a> a bit further down the page.</p>
39
+
40
+ <p>Once you get your JS hooked up, you'll need to add <code>data-clearing</code> to your list container. Here's an example of the most basic markup needed:</p>
41
+
42
+ <%= code_example '
43
+ <ul class="clearing-thumbs" data-clearing>
44
+ <li><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
45
+ <li><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
46
+ <li><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
47
+ </ul>', :html %>
48
+
49
+ <h5>Styling the List</h5>
50
+ <p>We're using the <code>.th</code> class from Abstractio to style the thumbnails in the Clearing example at the top of the page. You can also use <code>@include thumb;</code> in SCSS to use those same styles.</p></aside>
51
+
52
+ <hr>
53
+
54
+ <h4>Start From a Featured Image</h4>
55
+ <p>Sometimes you don't want to show a gallery full of images on your site, but you want to open the gallery from a single image. By including all of your images in a <code>.clearing-feature</code> list and using <code>.clearing-featured-img</code> on the <code>&lt;li&gt;</code> of your choice, you'll be able to hide the rest of the images in the on-page gallery. If you want to show more than once, try using our <code>.hide</code> class to set the ones you don't want to <code>display: none;</code>.</p>
56
+
57
+ <%= code_example '
58
+ <ul class="clearing-thumbs clearing-feature" data-clearing>
59
+ <li><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
60
+ <li class="clearing-featured-img"><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
61
+ <li><a href="path/to/your/img"><img src="path/to/your/img-th"></a></li>
62
+ </ul>', :html %>
63
+
64
+ <div class="row">
65
+ <div class="large-12 columns">
66
+ <ul class="clearing-thumbs clearing-feature" data-clearing>
67
+ <li><a class="th" href="../img/demos/demo1.jpg"><img src="../img/demos/demo1-th.jpg"></a></li>
68
+ <li class="clearing-featured-img"><a class="th" href="../img/demos/demo2.jpg"><img src="../img/demos/demo2-th.jpg"></a></li>
69
+ <li><a class="th" href="../img/demos/demo3.jpg"><img src="../img/demos/demo3-th.jpg"></a></li>
70
+ </ul>
71
+ </div>
72
+ </div>
73
+
74
+ <hr>
75
+
76
+ <h4>Including Captions</h4>
77
+ <p>Another common use-case for Lightboxes is to include a caption per image. We've made this quick and easy by using data-attributes to hold the content. You'll just attach this attribute to the image it belongs to and voila!</code> Here's the code example:</p>
78
+
79
+ <%= code_example '
80
+ <ul class="clearing-thumbs" data-clearing>
81
+ <li><a href="path/to/your/img"><img data-caption="caption here..." src="path/to/your/img-th"></a></li>
82
+ <li><a href="path/to/your/img"><img data-caption="caption 2 here..." src="path/to/your/img-th"></a></li>
83
+ <li><a href="path/to/your/img"><img data-caption="caption 3 here..." src="path/to/your/img-th"></a></li>
84
+ </ul>', :html %>
85
+
86
+ <div class="row">
87
+ <div class="large-12 columns">
88
+ <ul class="clearing-thumbs" data-clearing>
89
+ <li><a class="th" href="../img/demos/demo1.jpg"><img data-caption="caption here..." src="../img/demos/demo1-th.jpg"></a></li>
90
+ <li><a class="th" href="../img/demos/demo2.jpg"><img data-caption="caption 2 here..." src="../img/demos/demo2-th.jpg"></a></li>
91
+ <li><a class="th" href="../img/demos/demo3.jpg"><img data-caption="caption 3 here..." src="../img/demos/demo3-th.jpg"></a></li>
92
+ </ul>
93
+ </div>
94
+ </div>
95
+
96
+ <hr>
97
+
98
+ <h3>Available SCSS Variables</h3>
99
+ <p>We opted not to create mixins for this plugin because it relies on classes in the JS to work. These variables should give you the control you need to change styles as you see fit:</p>
100
+ <%= code_example '
101
+ /* We use these to set the background colors for parts of Clearing. */
102
+ $clearing-bg: #111;
103
+ $clearing-caption-bg: $clearing-bg;
104
+ $clearing-carousel-bg: #111;
105
+ $clearing-img-bg: $clearing-bg;
106
+
107
+ /* We use these to style the close button */
108
+ $clearing-close-color: #fff;
109
+ $clearing-close-size: 40px;
110
+
111
+ /* We use these to style the arrows */
112
+ $clearing-arrow-size: 16px;
113
+ $clearing-arrow-color: $clearing-close-color;
114
+
115
+ /* We use these to style captions */
116
+ $clearing-caption-font-color: #fff;
117
+ $clearing-caption-padding: 10px 30px;
118
+
119
+ /* We use these to make the image and carousel height and style */
120
+ $clearing-active-img-height: 75%;
121
+ $clearing-carousel-height: 150px;
122
+ $clearing-carousel-thumb-width: 175px;
123
+ $clearing-carousel-thumb-active-border: 4px solid rgb(255,255,255);
124
+ ', :css %>
125
+
126
+ <hr>
127
+
128
+ <h3>Using the JavaScript</h3>
129
+ <p>To make sure Clearing works properly, you'll need to include <code>abstractio.clearing.js</code> 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 Clearing plugin. Above your closing </body> tag include the following line of code and make sure you have the JS in your directory:</p>
130
+
131
+ <p><a href="../javascript.html" title="How to install Abstractio JavaScript">Read how to install Abstractio JavaScript</a></p>
132
+
133
+ <h5>Optional JavaScript Configuration</h5>
134
+
135
+ <p>As of Clearing 4.1.2, you can now pass in options to <code>data-options</code> when the clearing is initialized on the page.</p>
136
+
137
+ <%= code_example "
138
+ {
139
+ // specify the classes or IDs will close clearing when clicked.
140
+ close_selectors : '.clearing-close'
141
+ }", :js %>
142
+
143
+ </div>
144
+ </div>
145
+
146
+ </div>
147
+
148
+ <div class="large-3 pull-9 columns">
149
+ <%= render "_sidebar-components.html.erb" %>
150
+ </div>
151
+
152
+ </div>
@@ -0,0 +1,309 @@
1
+ <% @side_nav = "forms" %>
2
+
3
+ <div class="row">
4
+ <div class="large-9 push-3 columns">
5
+
6
+ <% @page_title = "Custom Forms" %>
7
+ <div class="row">
8
+ <div class="large-12 columns">
9
+ <h2><%= @page_title %></h2>
10
+ <h4 class="subheader">It's so crazy easy to create easy-to-style custom forms. It's practically a crime.</h4>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row">
15
+ <div class="large-12 columns">
16
+
17
+ <form class="custom">
18
+ <div class="row">
19
+ <div class="large-4 columns">
20
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" style="display:none;" CHECKED><span class="custom radio checked"></span> Radio Button 1</label>
21
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" style="display:none;"><span class="custom radio"></span> Radio Button 2</label>
22
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" disabled style="display:none;"><span class="custom radio"></span> Radio Button 3</label>
23
+ </div>
24
+ <div class="large-4 columns">
25
+ <label for="checkbox1"><input type="checkbox" id="checkbox1" style="display: none;"><span class="custom checkbox"></span> Label for Checkbox</label>
26
+ <label for="checkbox2"><input type="checkbox" id="checkbox2" CHECKED style="display: none;"><span class="custom checkbox checked"></span> Label for Checkbox</label>
27
+ <label for="checkbox3"><input type="checkbox" CHECKED id="checkbox3" style="display: none;"><span class="custom checkbox checked"></span> Label for Checkbox</label>
28
+ </div>
29
+ <div class="large-4 columns">
30
+ <label for="customDropdown1">Medium Example</label>
31
+ <select id="customDropdown1" class="medium">
32
+ <option DISABLED>This is a dropdown</option>
33
+ <option>This is another option</option>
34
+ <option>This is another option too</option>
35
+ <option>Look, a third option</option>
36
+ </select>
37
+ </div>
38
+ </div>
39
+ </form>
40
+
41
+ <hr>
42
+
43
+ <p>We've learned a lot from our previous iteration of custom forms. Thanks to awesome community contributions, we have even better custom forms. The new implementation is cleaner and more succinct, with less duplication of code. You just need to make sure to have the right JS hooked up for things to work properly; <a href="#js">learn more about that below</a>. The example above looks like this:</p>
44
+
45
+ <%= code_example '
46
+ <form class="custom">
47
+ <div class="row">
48
+ <div class="large-4 columns">
49
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" style="display:none;" CHECKED><span class="custom radio checked"></span> Radio Button 1</label>
50
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" style="display:none;"><span class="custom radio"></span> Radio Button 2</label>
51
+ <label for="radio1"><input name="radio1" type="radio" id="radio1" disabled style="display:none;"><span class="custom radio"></span> Radio Button 3</label>
52
+ </div>
53
+ <div class="large-4 columns">
54
+ <label for="checkbox1"><input type="checkbox" id="checkbox1" style="display: none;"><span class="custom checkbox"></span> Label for Checkbox</label>
55
+ <label for="checkbox2"><input type="checkbox" id="checkbox2" CHECKED style="display: none;"><span class="custom checkbox checked"></span> Label for Checkbox</label>
56
+ <label for="checkbox3"><input type="checkbox" CHECKED id="checkbox3" style="display: none;"><span class="custom checkbox checked"></span> Label for Checkbox</label>
57
+ </div>
58
+ <div class="large-4 columns">
59
+ <label for="customDropdown1">Medium Example</label>
60
+ <select id="customDropdown1" class="medium">
61
+ <option DISABLED>This is a dropdown</option>
62
+ <option>This is another option</option>
63
+ <option>This is another option too</option>
64
+ <option>Look, a third option</option>
65
+ </select>
66
+ </div>
67
+ </div>
68
+ </form>', :html %>
69
+
70
+ <hr>
71
+
72
+ <h3>Building Custom Radio Inputs</h3>
73
+ <p>A radio input is a common form element that can look pretty ugly by default. We've simplified the look and feel with a custom <code>&lt;span&gt;</code> that you can customize if you need to. You can even use <code>&lt;input disabled&gt;</code> to make the radio inactive.</p>
74
+
75
+ <%= code_example '
76
+ <form class="custom">
77
+ <label for="radio1">
78
+ <input name="radio1" type="radio" id="radio1" style="display:none;">
79
+ <span class="custom radio"></span> Radio Button 1
80
+ </label>
81
+ </form>', :html %>
82
+
83
+ <form class="custom">
84
+ <label for="radio1">
85
+ <input name="radio1" type="radio" id="radio1" style="display:none;">
86
+ <span class="custom radio"></span> Radio Button 1
87
+ </label>
88
+ </form>
89
+
90
+ <hr>
91
+
92
+ <h3>Building Custom Checkboxes</h3>
93
+ <p>The checkbox input is another very common form element. These are handy for lists of options that can be selected in multiples, things like finding out which Ke$ha song should be used for a room name. You can build these using the same <code>&lt;span&gt;</code> technique. You can even use <code>&lt;input disabled&gt;</code> to make the radio inactive.</p>
94
+
95
+ <%= code_example '
96
+ <form class="custom">
97
+ <label for="checkbox1">
98
+ <input type="checkbox" id="checkbox1" style="display: none;">
99
+ <span class="custom checkbox"></span> Label for Checkbox
100
+ </label>
101
+ </form>', :html %>
102
+
103
+ <form class="custom">
104
+ <label for="checkbox1">
105
+ <input type="checkbox" id="checkbox1" style="display: none;">
106
+ <span class="custom checkbox"></span> Label for Checkbox
107
+ </label>
108
+ </form>
109
+
110
+ <hr>
111
+
112
+ <h3>Building Custom Selects</h3>
113
+ <p>Sometimes you need to let people select a single item from a long list of options. This is what <code>&lt;select&gt;</code> elements are for. We've taken these a step further by including our own custom style that looks a lot better than inconsistent browser defaults. You can set any of the <code>&lt;option&gt;</code> elements to <code>&lt;option disabled&gt;</code> to make them unable to select. Custom selects are built like you'd expect:</p>
114
+ <p>For those who may want to apply custom styles to a specific dropdown, any classes on the <code>&lt;select&gt;</code> element will be appended to the generated <code>&lt;div class=&quot;custom dropdown&quot;&gt;</code> element.</p>
115
+
116
+ <%= code_example '
117
+ <form class="custom">
118
+ <label for="customDropdown">Medium Example</label>
119
+ <select id="customDropdown">
120
+ <option DISABLED>This is a dropdown</option>
121
+ <option>This is another option</option>
122
+ <option>This is another option too</option>
123
+ <option>Look, a third option</option>
124
+ </select>
125
+ </form>', :html %>
126
+
127
+ <form class="custom">
128
+ <label for="customDropdown2">Default Example</label>
129
+ <select id="customDropdown2">
130
+ <option DISABLED>This is a dropdown</option>
131
+ <option>This is another option</option>
132
+ <option>This is another option too</option>
133
+ <option>Look, a third option</option>
134
+ </select>
135
+ </form>
136
+
137
+ <h5>Various Sizes</h5>
138
+ <p>You have access to classes that will control the size of the select element. They'll span 100% of their container by default.</p>
139
+
140
+ <%= code_example '
141
+ <select id="customDropdown" class="small"></select>
142
+ <select id="customDropdown" class="medium"></select>
143
+ <select id="customDropdown" class="large"></select>
144
+ ', :html %>
145
+
146
+ <div class="row">
147
+ <div class="large-3 columns">
148
+ <form class="custom">
149
+ <label for="customDropdown3">Small Example</label>
150
+ <select id="customDropdown3" class="small">
151
+ <option DISABLED>This is a dropdown</option>
152
+ <option>This is another option</option>
153
+ <option>This is another option too</option>
154
+ <option>Look, a third option</option>
155
+ </select>
156
+ </form>
157
+ </div>
158
+ </div>
159
+ <div class="row">
160
+ <div class="large-9 columns">
161
+ <form class="custom">
162
+ <label for="customDropdown4">Medium Example</label>
163
+ <select id="customDropdown4" class="medium">
164
+ <option DISABLED>This is a dropdown</option>
165
+ <option>This is another option</option>
166
+ <option>This is another option too</option>
167
+ <option>Look, a third option</option>
168
+ </select>
169
+ </form>
170
+ </div>
171
+ </div>
172
+ <div class="row">
173
+ <div class="large-12 columns">
174
+ <form class="custom">
175
+ <label for="customDropdown5">Large Example</label>
176
+ <select id="customDropdown5" class="large">
177
+ <option DISABLED>This is a dropdown</option>
178
+ <option>This is another option</option>
179
+ <option>This is another option too</option>
180
+ <option>Look, a third option</option>
181
+ </select>
182
+ </form>
183
+ </div>
184
+ </div>
185
+
186
+ <hr>
187
+
188
+ <h3>Using the Pre/postfix Concept With Custom Forms</h3>
189
+ <p>We showed you how to use the prefix and postfix elements on our <a href="forms.html">forms documentation page</a>. You can employ that same technique here and make custom forms act as your slave to create some very complex forms.</p>
190
+
191
+ <%= code_example '
192
+ <form class="custom">
193
+ <div class="row">
194
+ <div class="large-6 columns">
195
+ <div class="row collapse">
196
+ <div class="large-9 small-9 columns">
197
+ <span class="prefix">mysubdomain</span>
198
+ </div>
199
+ <div class="large-3 small-3 columns">
200
+ <select>
201
+ <option>.com</option>
202
+ <option>.co</option>
203
+ <option>.ca</option>
204
+ </select>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ <div class="large-6 columns">
209
+ <div class="row collapse">
210
+ <div class="large-10 small-10 columns">
211
+ <select>
212
+ <option>google</option>
213
+ <option>yahoo</option>
214
+ <option>bing</option>
215
+ </select>
216
+ </div>
217
+ <div class="large-2 small-2 columns">
218
+ <span class="postfix">.com</span>
219
+ </div>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ <div class="row collapse">
224
+ <div class="small-8 columns">
225
+ <select>
226
+ <option>google</option>
227
+ <option>yahoo</option>
228
+ <option>bing</option>
229
+ </select>
230
+ </div>
231
+ <div class="small-4 columns">
232
+ <a href="#" class="button postfix">Button</a>
233
+ </div>
234
+ </div>
235
+ </form>', :html %>
236
+
237
+ <form class="custom">
238
+ <div class="row">
239
+ <div class="large-6 columns">
240
+ <div class="row collapse">
241
+ <div class="large-9 small-9 columns">
242
+ <span class="prefix">mysubdomain</span>
243
+ </div>
244
+ <div class="large-3 small-3 columns">
245
+ <select>
246
+ <option>.com</option>
247
+ <option>.co</option>
248
+ <option>.ca</option>
249
+ </select>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ <div class="large-6 columns">
254
+ <div class="row collapse">
255
+ <div class="large-10 small-10 columns">
256
+ <select>
257
+ <option>google</option>
258
+ <option>yahoo</option>
259
+ <option>bing</option>
260
+ </select>
261
+ </div>
262
+ <div class="large-2 small-2 columns">
263
+ <span class="postfix">.com</span>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ <div class="row collapse">
269
+ <div class="small-8 columns">
270
+ <select>
271
+ <option>google</option>
272
+ <option>yahoo</option>
273
+ <option>bing</option>
274
+ </select>
275
+ </div>
276
+ <div class="small-4 columns">
277
+ <a href="#" class="button postfix">Button</a>
278
+ </div>
279
+ </div>
280
+ </form>
281
+
282
+ <hr>
283
+
284
+ <h3><a name="js"></a>Using the JavaScript</h3>
285
+ <p>In order to get the custom forms to function, you'll need to include <code>abstractio.forms.js</code>. You'll also need to make sure to include <code>zepto.js</code> and <code>abstractio.js</code> above the forms 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>
286
+
287
+ <p><a href="../javascript.html" title="How to install Abstractio JavaScript">Read how to install Abstractio JavaScript</a></p>
288
+
289
+ <p>Required Abstractio Library: <code>abstractio.forms.js</code></p>
290
+
291
+ <h5>Optional JavaScript Configuration</h5>
292
+
293
+ <p>Custom Form options can only be passed in during initialization at this time. However, you can bind to the <i>open</i>, <i>change</i>, and <i>click</i> events depending on the form elements.</p>
294
+
295
+ <%= code_example "
296
+ {
297
+ disable_class: 'no-custom'
298
+ }", :js %>
299
+
300
+ </div>
301
+ </div>
302
+
303
+ </div>
304
+
305
+ <div class="large-3 pull-9 columns">
306
+ <%= render "_sidebar-components.html.erb" %>
307
+ </div>
308
+
309
+ </div>