underoos 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. data/.gitignore +8 -0
  2. data/.rvmrc +1 -0
  3. data/Gemfile +5 -0
  4. data/Gemfile.lock +143 -0
  5. data/LICENSE +26 -0
  6. data/Procfile +1 -0
  7. data/README.md +13 -0
  8. data/Rakefile +12 -0
  9. data/app/assets/javascripts/styleguide.js +132 -0
  10. data/app/assets/javascripts/underoos.js +18 -0
  11. data/app/assets/stylesheets/base/_button-btn-mixin.sass +72 -0
  12. data/app/assets/stylesheets/base/_elements.sass +61 -0
  13. data/app/assets/stylesheets/base/_forms.sass +362 -0
  14. data/app/assets/stylesheets/base/_helpers.sass +54 -0
  15. data/app/assets/stylesheets/base/_normalize.sass +114 -0
  16. data/app/assets/stylesheets/base/_scaffold.sass +51 -0
  17. data/app/assets/stylesheets/base/_tables.sass +99 -0
  18. data/app/assets/stylesheets/base/_transitions.sass +17 -0
  19. data/app/assets/stylesheets/base/_typography.sass +185 -0
  20. data/app/assets/stylesheets/components/_accordions.sass +17 -0
  21. data/app/assets/stylesheets/components/_breadcrumbs.sass +22 -0
  22. data/app/assets/stylesheets/components/_button-groups.sass +46 -0
  23. data/app/assets/stylesheets/components/_carets.sass +24 -0
  24. data/app/assets/stylesheets/components/_carousels.sass +18 -0
  25. data/app/assets/stylesheets/components/_close.sass +25 -0
  26. data/app/assets/stylesheets/components/_decals.sass +27 -0
  27. data/app/assets/stylesheets/components/_dropdowns.sass +85 -0
  28. data/app/assets/stylesheets/components/_media.sass +33 -0
  29. data/app/assets/stylesheets/components/_modals.sass +28 -0
  30. data/app/assets/stylesheets/components/_nav-lists.sass +22 -0
  31. data/app/assets/stylesheets/components/_navbars.sass +105 -0
  32. data/app/assets/stylesheets/components/_notifications.sass +108 -0
  33. data/app/assets/stylesheets/components/_paddles.sass +34 -0
  34. data/app/assets/stylesheets/components/_pagination.sass +41 -0
  35. data/app/assets/stylesheets/components/_pills.sass +64 -0
  36. data/app/assets/stylesheets/components/_popovers.sass +55 -0
  37. data/app/assets/stylesheets/components/_progress-bars.sass +29 -0
  38. data/app/assets/stylesheets/components/_tabs.sass +93 -0
  39. data/app/assets/stylesheets/components/_tooltips.sass +46 -0
  40. data/app/assets/stylesheets/components/_wells.sass +16 -0
  41. data/app/assets/stylesheets/layouts/_containers.sass +15 -0
  42. data/app/assets/stylesheets/layouts/_print.sass +48 -0
  43. data/app/assets/stylesheets/layouts/_queries.sass +121 -0
  44. data/app/assets/stylesheets/layouts/_upgrades.sass +64 -0
  45. data/app/assets/stylesheets/mixins/_arrows.sass +40 -0
  46. data/app/assets/stylesheets/mixins/_clearfixins.sass +15 -0
  47. data/app/assets/stylesheets/mixins/_coloring.sass +6 -0
  48. data/app/assets/stylesheets/mixins/_columns.sass +19 -0
  49. data/app/assets/stylesheets/mixins/_conversions.sass +25 -0
  50. data/app/assets/stylesheets/mixins/_font-size.sass +6 -0
  51. data/app/assets/stylesheets/mixins/_image-tools.sass +13 -0
  52. data/app/assets/stylesheets/mixins/_ir.sass +9 -0
  53. data/app/assets/stylesheets/mixins/_mixins.sass +14 -0
  54. data/app/assets/stylesheets/mixins/_tab-focus.sass +7 -0
  55. data/app/assets/stylesheets/mixins/_timing-equations.sass +29 -0
  56. data/app/assets/stylesheets/mixins/_visibility.sass +43 -0
  57. data/app/assets/stylesheets/polyfills/_box-shadow.sass +7 -0
  58. data/app/assets/stylesheets/polyfills/_box-sizing.sass +8 -0
  59. data/app/assets/stylesheets/polyfills/_functions.sass +22 -0
  60. data/app/assets/stylesheets/polyfills/_inline-block.sass +8 -0
  61. data/app/assets/stylesheets/polyfills/_opacity.sass +6 -0
  62. data/app/assets/stylesheets/polyfills/_polyfills.sass +10 -0
  63. data/app/assets/stylesheets/polyfills/_transition.sass +9 -0
  64. data/app/assets/stylesheets/polyfills/_user-select.sass +8 -0
  65. data/app/assets/stylesheets/styleguide.sass +199 -0
  66. data/app/assets/stylesheets/themes/_default.sass +119 -0
  67. data/app/assets/stylesheets/underoos.sass +52 -0
  68. data/app/controllers/underoos/styleguides_controller.rb +79 -0
  69. data/app/views/shared/_upgrades.html.haml +12 -0
  70. data/app/views/underoos/styleguides/_assets.haml +42 -0
  71. data/app/views/underoos/styleguides/_components.haml +42 -0
  72. data/app/views/underoos/styleguides/_elements.haml +242 -0
  73. data/app/views/underoos/styleguides/_forms.haml +305 -0
  74. data/app/views/underoos/styleguides/_layouts.haml +76 -0
  75. data/app/views/underoos/styleguides/_palettes.haml +18 -0
  76. data/app/views/underoos/styleguides/_resources.haml +27 -0
  77. data/app/views/underoos/styleguides/_tables.haml +124 -0
  78. data/app/views/underoos/styleguides/_typography.haml +284 -0
  79. data/app/views/underoos/styleguides/_utilities.haml +270 -0
  80. data/app/views/underoos/styleguides/components/_accordions.haml +83 -0
  81. data/app/views/underoos/styleguides/components/_breadcrumbs.haml +42 -0
  82. data/app/views/underoos/styleguides/components/_button-groups.haml +162 -0
  83. data/app/views/underoos/styleguides/components/_carets.haml +28 -0
  84. data/app/views/underoos/styleguides/components/_close.haml +20 -0
  85. data/app/views/underoos/styleguides/components/_decals.haml +40 -0
  86. data/app/views/underoos/styleguides/components/_dropdowns.haml +189 -0
  87. data/app/views/underoos/styleguides/components/_media.haml +78 -0
  88. data/app/views/underoos/styleguides/components/_modals.haml +42 -0
  89. data/app/views/underoos/styleguides/components/_nav-lists.haml +52 -0
  90. data/app/views/underoos/styleguides/components/_navbars.haml +144 -0
  91. data/app/views/underoos/styleguides/components/_navs-showcase.haml +27 -0
  92. data/app/views/underoos/styleguides/components/_notifications.haml +169 -0
  93. data/app/views/underoos/styleguides/components/_paddles.haml +68 -0
  94. data/app/views/underoos/styleguides/components/_pagination.haml +64 -0
  95. data/app/views/underoos/styleguides/components/_popovers.haml +33 -0
  96. data/app/views/underoos/styleguides/components/_progress-bars.haml +72 -0
  97. data/app/views/underoos/styleguides/components/_tabs-pills.haml +241 -0
  98. data/app/views/underoos/styleguides/components/_tooltips.haml +37 -0
  99. data/app/views/underoos/styleguides/components/_wells.haml +29 -0
  100. data/app/views/underoos/styleguides/index.html.haml +259 -0
  101. data/app/views/underoos/styleguides/partials/_form-template.haml +171 -0
  102. data/app/views/underoos/styleguides/partials/_table-data.haml +33 -0
  103. data/app/views/underoos/styleguides/partials/_transitions.haml +136 -0
  104. data/config.ru +38 -0
  105. data/config/routes.rb +3 -0
  106. data/features/generator.feature +78 -0
  107. data/features/step_definitions/underoos_steps.rb +3 -0
  108. data/features/support/env.rb +9 -0
  109. data/lib/generators/underoos/assets_generator.rb +33 -0
  110. data/lib/underoos.rb +5 -0
  111. data/lib/underoos/engine.rb +8 -0
  112. data/lib/underoos/version.rb +3 -0
  113. data/public/apple-touch-icon-114x114-precomposed.png +0 -0
  114. data/public/apple-touch-icon-57x57-precomposed.png +0 -0
  115. data/public/apple-touch-icon-72x72-precomposed.png +0 -0
  116. data/public/apple-touch-icon-precomposed.png +0 -0
  117. data/public/apple-touch-icon.png +0 -0
  118. data/public/favicon.ico +0 -0
  119. data/script/javascripts +15 -0
  120. data/underoos.gemspec +29 -0
  121. data/vendor/assets/javascripts/bootstrap-alert.js +94 -0
  122. data/vendor/assets/javascripts/bootstrap-button.js +100 -0
  123. data/vendor/assets/javascripts/bootstrap-collapse.js +138 -0
  124. data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
  125. data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
  126. data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
  127. data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
  128. data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
  129. data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
  130. data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
  131. data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
  132. data/vendor/assets/javascripts/prettify.js +28 -0
  133. metadata +246 -0
@@ -0,0 +1,37 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Tooltips <span>tooltips.sass</span>
4
+ %p(style="width:50%;")
5
+ Tool tips utilize <a href="http://twitter.github.com/bootstrap/javascript.html#tooltips">Bootstrap's Tooltip plugin</a>. You can control various options of how a tool tip is shown based on attributes set in the link.
6
+ %br
7
+ %br
8
+ Styles are automatically generated based on the inverted colors of the body's <code>background-color</code> and font <code>color</code>.
9
+
10
+ .sg-subsection
11
+ %table.box.banded.thead-decorate.tools
12
+ %thead
13
+ %tr
14
+ %th Position
15
+ %th Markup
16
+ %tbody
17
+ %tr
18
+ %td <a href="#" rel="tooltip" data-placement="top" data-original-title="Top">Top</a>
19
+ %td.html <code>&lt;a href="#" rel="tooltip" data-placement="top" data-original-title="Top"&gt;Top&lt;/a&gt;</code>
20
+ %td.haml.hidden <code>%a(href="#" rel="tooltip" data-placement="top" data-original-title="Top") Top</code>
21
+ %tr
22
+ %td <a href="#" rel="tooltip" data-placement="bottom" data-original-title="Bottom">Bottom</a>
23
+ %td.html <code>&lt;a href="#" rel="tooltip" data-placement="bottom" data-original-title="Bottom"&gt;Bottom&lt;/a&gt;</code>
24
+ %td.haml.hidden <code>%a(href="#" rel="tooltip" data-placement="bottom" data-original-title="Bottom") Bottom</code>
25
+ %tr
26
+ %td <a href="#" rel="tooltip" data-placement="left" data-original-title="Left">Left</a>
27
+ %td.html <code>&lt;a href="#" rel="tooltip" data-placement="left" data-original-title="Left"&gt;Left&lt;/a&gt;</code>
28
+ %td.haml.hidden <code>%a(href="#" rel="tooltip" data-placement="left" data-original-title="Left") Left</code>
29
+ %tr
30
+ %td <a href="#" rel="tooltip" data-placement="right" data-original-title="Right" data-offset="10">Right</a>
31
+ %td.html <code>&lt;a href="#" rel="tooltip" data-placement="right" data-original-title="Right"&gt;Right&lt;/a&gt;</code>
32
+ %td.haml.hidden <code>%a(href="#" rel="tooltip" data-placement="right" data-original-title="Right") Right</code>
33
+
34
+ .notification.important.fade.in
35
+ %p <strong>Note!</strong> Tooltips are opt in and will only be instantiated if called directly from JavaScript:
36
+ %code $("a[rel=tooltip]").tooltip()
37
+
@@ -0,0 +1,29 @@
1
+
2
+ .sg-subsection
3
+ %h3.sg-subheading Wells <span>wells.sass</span>
4
+ .sg-half.pull
5
+ %p Wells are simple containers for popping elements off the page. They come in a few different flavors.
6
+ %pre.prettyprint.html
7
+ = preserve do
8
+ :escaped
9
+ <div class="well">...</div>
10
+ <div class="well lite">...</div>
11
+ <div class="well dark">...</div>
12
+ <div class="well primary">...</div>
13
+ %pre.prettyprint.haml.hidden
14
+ = preserve do
15
+ :escaped
16
+ .well ...
17
+ .well.lite ...
18
+ .well.dark ...
19
+ .well.primary ...
20
+ .sg-half
21
+ .well
22
+ %code .well
23
+ .well.lite
24
+ %code .well.lite
25
+ .well.dark
26
+ %code .well.dark
27
+ .well.primary
28
+ %code .well.primary
29
+
@@ -0,0 +1,259 @@
1
+ !!! 5
2
+ %html
3
+ %head
4
+ %title underoos.
5
+ %meta(content="IE=edge,chrome=1" http-equiv="X-UA-Compatible")
6
+ %meta(content="text/html; charset=UTF-8" http-equiv="Content-Type")
7
+ %meta(name="description" content="")
8
+ %meta(name="author" content="mode set")
9
+ %meta(name="keywords" content="")
10
+ %meta(name="imagetoolbar" content="no")
11
+ %meta(name="viewport" content="width=device-width, initial-scale=1.0")
12
+ %meta(name="apple-touch-fullscreen" content="YES")
13
+ %meta(name="apple-mobile-web-app-capable" content="YES")
14
+ %meta(name="apple-mobile-web-app-status-bar-style" content="black")
15
+
16
+ <!--[if lt IE 9]>
17
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
18
+ <![endif]-->
19
+
20
+ = stylesheet_link_tag 'underoos'
21
+ = stylesheet_link_tag 'styleguide'
22
+
23
+ %body(data-spy="scroll" data-target=".spy")
24
+ .navbar.fixed.sg-navbar
25
+ .navbar-inner
26
+ .container.outer
27
+ %a.btn.info.btn-navbar(data-toggle="collapse" data-target=".nav-collapse")
28
+ %span.icon-bar
29
+ %span.icon-bar
30
+ %span.icon-bar
31
+ %a#page_title.brand(href="/styleguide") underoos.
32
+ %nav.spy.nav-collapse
33
+ %ul.nav
34
+ %li.dropdown
35
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Typography<span class="caret"></span>
36
+ %ul.dropdown-menu
37
+ %li
38
+ %a(href="#typography") Description
39
+ %li
40
+ %a(href="#type_headings") Headings
41
+ %li
42
+ %a(href="#type_paragraphs") Inline Paragraph Elements
43
+ %li
44
+ %a(href="#type_rules") Rules
45
+ %li
46
+ %a(href="#type_lists") Lists
47
+ %li
48
+ %a(href="#type_code") Code
49
+
50
+ %li
51
+ %a(href="#palettes") Palettes
52
+
53
+ %li.dropdown
54
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Elements<span class="caret"></span>
55
+ %ul.dropdown-menu
56
+ %li
57
+ %a(href="#elements") Description
58
+ %li
59
+ %a(href="#elements_basenav") Base Nav
60
+ %li
61
+ %a(href="#elements_buttons") Buttons
62
+ %li
63
+ %a(href="#elements_images") Images
64
+ %li
65
+ %a(href="#elements_video") Video
66
+
67
+ %li.dropdown
68
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Components<span class="caret"></span>
69
+ %ul.dropdown-menu
70
+ %li
71
+ %a(href="#components") Description
72
+ %li
73
+ %a(href="#components_buttongroups") Button Groups
74
+ %li
75
+ %a(href="#components_dropdowns") Dropdowns
76
+ %li
77
+ %a(href="#components_tabs_pills") Tabs &amp; Pills
78
+ %li
79
+ %a(href="#components_nav_lists") Navigation Lists
80
+ %li
81
+ %a(href="#components_breadcrumbs") Breadcrumbs
82
+ %li
83
+ %a(href="#components_pagination") Pagination
84
+ %li
85
+ %a(href="#components_navs_showcase") Navs Showcase
86
+ %li
87
+ %a(href="#components_accordions") Accordions
88
+ %li
89
+ %a(href="#components_navbars") Navbars
90
+ %li
91
+ %a(href="#components_paddles") Paddles
92
+ %li
93
+ %a(href="#components_modals") Modals
94
+ %li
95
+ %a(href="#components_notifications") Notifications
96
+ %li
97
+ %a(href="#components_decals") Decals
98
+ %li
99
+ %a(href="#components_tooltips") Tooltips
100
+ %li
101
+ %a(href="#components_popovers") Popovers
102
+ %li
103
+ %a(href="#components_progress_bars") Progress Bars
104
+ %li
105
+ %a(href="#components_carets") Carets
106
+ %li
107
+ %a(href="#components_close") Close Icons
108
+ %li
109
+ %a(href="#components_wells") Wells
110
+ %li
111
+ %a(href="#components_media") Media Grid
112
+ %li
113
+ %a(href="#tables") Tables
114
+
115
+ %li.dropdown
116
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Forms<span class="caret"></span>
117
+ %ul.dropdown-menu
118
+ %li
119
+ %a(href="#forms") Description
120
+ %li
121
+ %a(href="#forms_type") Form Types
122
+ %li
123
+ %a(href="#forms_example") Example Forms
124
+ %li
125
+ %a(href="#forms_vertical") Vertical Form
126
+ %li
127
+ %a(href="#forms_horizontal") Horizontal Form
128
+ %li
129
+ %a(href="#forms_structure") Form Structure
130
+ %li
131
+ %a(href="#forms_state") Form States
132
+ %li
133
+ %a(href="#forms_inputs") Additional Input Controls
134
+ %li
135
+ %a(href="#forms_typeahead") Typeahead
136
+ %li
137
+ %a(href="#forms_editable") Content Editable
138
+
139
+ %li.dropdown
140
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Layouts<span class="caret"></span>
141
+ %ul.dropdown-menu
142
+ %li
143
+ %a(href="#layouts") Description
144
+ %li
145
+ %a(href="#layouts_containers") Containers
146
+ %li
147
+ %a(href="#layouts_queries") Media Queries
148
+ %li
149
+ %a(href="#layouts_upgrades") Upgrades
150
+
151
+ %li.dropdown
152
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Assets<span class="caret"></span>
153
+ %ul.dropdown-menu
154
+ %li
155
+ %a(href="#assets") Description
156
+ %li
157
+ %a(href="#assets_icons") Favicon &amp; Touch Icons
158
+ %li
159
+ %a(href="#assets_gui") UI Elements
160
+
161
+ %li.dropdown
162
+ %a.dropdown-toggle(href="#" data-toggle="dropdown") Utilities<span class="caret"></span>
163
+ %ul.dropdown-menu
164
+ %li
165
+ %a(href="#utilities") Description
166
+ %li
167
+ %a(href="#utils_helpers") Helpers
168
+ %li
169
+ %a(href="#utils_transitions") Transitions
170
+ %li
171
+ %a(href="#utils_mixins") Mixins
172
+ %li
173
+ %a(href="#utils_functions") Functions
174
+ %li
175
+ %a(href="#utils_polyfill") Polyfills
176
+
177
+
178
+ .container.outer
179
+
180
+ #typography.sg-spy-landing
181
+ .sg-section
182
+ .well.dark
183
+ %h2.sg-heading Typography
184
+ %p.sg-note Heading, paragraph, lists, and inline typographic elements.
185
+ = render :partial => 'typography'
186
+
187
+ #palettes.sg-spy-landing
188
+ .sg-section
189
+ .well.dark
190
+ %h2.sg-heading Palettes
191
+ %p.sg-note Various color palettes and themes used in the application. All properties are found under the themes directory
192
+ = render :partial => 'palettes'
193
+
194
+
195
+ #elements.sg-spy-landing
196
+ .sg-section
197
+ .well.dark
198
+ %h2.sg-heading Elements
199
+ %p.sg-note Base class styles to enhance common elements found in an application.
200
+ = render :partial => 'elements'
201
+
202
+ #components.sg-spy-landing
203
+ .sg-section
204
+ .well.dark
205
+ %h2.sg-heading Components
206
+ %p.sg-note Components are common patterns used in many applications but are not defined as base element tags.
207
+ = render :partial => 'components'
208
+
209
+ #tables.sg-spy-landing
210
+ .sg-section
211
+ .well.dark
212
+ %h2.sg-heading Tables
213
+ %p.sg-note Tables are used to represent tabular data.
214
+ = render :partial => 'tables'
215
+
216
+ #forms.sg-spy-landing
217
+ .sg-section
218
+ .well.dark
219
+ %h2.sg-heading Forms
220
+ %p.sg-note Inputs, textarea, labels, selects, and other controls associated with form elements. Tuned to play with <a href="https://github.com/justinfrench/formtastic">formtastic</a>.
221
+ = render :partial => 'forms'
222
+
223
+ #layouts.sg-spy-landing
224
+ .sg-section
225
+ .well.dark
226
+ %h2.sg-heading Layouts
227
+ %p.sg-note Layouts consists of various templates that are specific to the application.
228
+ = render :partial => 'layouts'
229
+
230
+ #assets.sg-spy-landing
231
+ .sg-section
232
+ .well.dark
233
+ %h2.sg-heading Assets
234
+ %p.sg-note Showcases the various assets in use by the application.
235
+ = render :partial => 'assets'
236
+
237
+ #utilities.sg-spy-landing
238
+ .sg-section
239
+ .well.dark
240
+ %h2.sg-heading Utilities
241
+ %p.sg-note Various utility, helpers and miscellaneous classes, commonly used for extension.
242
+ = render :partial => 'utilities'
243
+
244
+
245
+ #resources.sg-spy-landing
246
+ .sg-section
247
+ .well.dark
248
+ %h2.sg-heading Resources
249
+ %p.sg-note References, links, credits, and various information related to the styleguide.
250
+ = render :partial => 'resources'
251
+
252
+ #flash_messages.flash-messages
253
+
254
+ = render :partial => 'shared/upgrades'
255
+
256
+ = javascript_include_tag 'underoos'
257
+ = javascript_include_tag 'prettify'
258
+ = javascript_include_tag 'styleguide'
259
+
@@ -0,0 +1,171 @@
1
+
2
+ %fieldset
3
+ %legend=legend
4
+ %ol
5
+ -# Text Input
6
+ %li(class="#{state} #{disabled}" id="#{uid}test_text_input")
7
+ %label.label(for="#{uid}test_text") Text Input<abbr title="required">*</abbr>
8
+ - if disabled == "disabled"
9
+ %input.input-medium(id="#{uid}test_text" type="text" name="test[text]" placeholder="text input" disabled)
10
+ - else
11
+ %input.input-medium(id="#{uid}test_text" type="text" name="test[text]" placeholder="text input")
12
+ %p.hint This is a hint for the text element!
13
+
14
+ -# Block Checkboxes
15
+ %li.boolean(class="#{state} #{disabled}")
16
+ %label(for="#{uid}test_check1" name="test[check1]")
17
+ - if disabled == "disabled"
18
+ %input(id="#{uid}test_check1" name="test[check1]" type="checkbox" checked="checked" value="0" disabled)
19
+ - else
20
+ %input(id="#{uid}test_check1" name="test[check1]" type="checkbox" checked="checked" value="0")
21
+ Checkboxes for multiple selections
22
+ %li.boolean(class="#{state} #{disabled}")
23
+ %label(for="#{uid}test_check2" name="test[check2]")
24
+ - if disabled == "disabled"
25
+ %input(id="#{uid}test_check2" name="test[check2]" type="checkbox" value="1" disabled)
26
+ - else
27
+ %input(id="#{uid}test_check2" name="test[check2]" type="checkbox" value="1")
28
+ Go ahead and select this one too
29
+
30
+ -# Block Radio Group
31
+ %li
32
+ %ol.choices-group
33
+ %li.choice(class="#{state} #{disabled}")
34
+ %label(for="#{uid}test_radio1")
35
+ - if disabled == "disabled"
36
+ %input(id="#{uid}test_radio1" name="test[radio]" type="radio" value="true" disabled)
37
+ - else
38
+ %input(id="#{uid}test_radio1" name="test[radio]" type="radio" value="true")
39
+ Yes, to radio buttons
40
+ %li.choice(class="#{state} #{disabled}")
41
+ %label(for="#{uid}test_radio2")
42
+ - if disabled == "disabled"
43
+ %input(id="#{uid}test_radio2" name="test[radio]" type="radio" value="false" disabled)
44
+ - else
45
+ %input(id="#{uid}test_radio2" name="test[radio]" type="radio" value="false")
46
+ No, to radio buttons
47
+
48
+ -# Inline Checkboxes
49
+ %li.boolean.inline(class="#{state} #{disabled}")
50
+ %label(for="#{uid}test_check3" name="test[check3]")
51
+ - if disabled == "disabled"
52
+ %input(id="#{uid}test_check3" name="test[check3]" type="checkbox" checked="checked" value="0" disabled)
53
+ - else
54
+ %input(id="#{uid}test_check3" name="test[check3]" type="checkbox" checked="checked" value="0")
55
+ Checkbox inline 1
56
+ %li.boolean.inline(class="#{state} #{disabled}")
57
+ %label(for="#{uid}test_check4" name="test[check4]")
58
+ - if disabled == "disabled"
59
+ %input(id="#{uid}test_check4" name="test[check4]" type="checkbox" value="1" disabled)
60
+ - else
61
+ %input(id="#{uid}test_check4" name="test[check4]" type="checkbox" value="1")
62
+ Checkbox inline 2
63
+
64
+ -# Inline Radio Group
65
+ %li
66
+ %ol.choices-group
67
+ %li.choice.inline(class="#{state} #{disabled}")
68
+ %label(for="#{uid}test_radio3")
69
+ - if disabled == "disabled"
70
+ %input(id="#{uid}test_radio3" name="test[radio]" type="radio" value="true" disabled)
71
+ - else
72
+ %input(id="#{uid}test_radio3" name="test[radio]" type="radio" value="true")
73
+ Yes, radio inline
74
+ %li.choice.inline(class="#{state} #{disabled}")
75
+ %label(for="#{uid}test_radio4")
76
+ - if disabled == "disabled"
77
+ %input(id="#{uid}test_radio4" name="test[radio]" type="radio" value="false" disabled)
78
+ - else
79
+ %input(id="#{uid}test_radio4" name="test[radio]" type="radio" value="false")
80
+ No, radio inline
81
+
82
+ -# Select
83
+ %li(id="#{uid}test_select_input" class="#{state} #{disabled}")
84
+ %label.label(for="#{uid}test_select") Select
85
+ - if disabled == "disabled"
86
+ %select.input-medium(id="#{uid}test_select" name="test[select]" disabled)
87
+ %optgroup(label="Colorado")
88
+ %option(value="denver" selected="selected") Denver
89
+ %option(value="boulder") Boulder
90
+ %optgroup(label="California")
91
+ %option(value="los angeles") Los Angeles
92
+ %option(value="san francisco") San Francisco
93
+ - else
94
+ %select.input-medium(id="#{uid}test_select" name="test[select]")
95
+ %optgroup(label="Colorado")
96
+ %option(value="denver" selected="selected") Denver
97
+ %option(value="boulder") Boulder
98
+ %optgroup(label="California")
99
+ %option(value="los angeles") Los Angeles
100
+ %option(value="san francisco") San Francisco
101
+
102
+ -# Multi Select
103
+ %li(id="#{uid}test_multi_input" class="#{state} #{disabled}")
104
+ %label.label(for="#{uid}test_multi") Multi
105
+ - if disabled == "disabled"
106
+ %select.input-medium(id="#{uid}test_multi" name="test[multi]" multiple disabled)
107
+ %option(value="1") One
108
+ %option(value="2" selected="selected") Two
109
+ %option(value="3") Three
110
+ %option(value="4") Four
111
+ %option(value="5") Five
112
+ - else
113
+ %select.input-medium(id="#{uid}test_multi" name="test[multi]" multiple)
114
+ %option(value="1") One
115
+ %option(value="2" selected="selected") Two
116
+ %option(value="3") Three
117
+ %option(value="4") Four
118
+ %option(value="5") Five
119
+
120
+ -# Text Area
121
+ %li(id="#{uid}test_textarea_textarea.optional" class="#{state} #{disabled}")
122
+ %label.label(for="#{uid}test_textarea") Text Area
123
+ - if disabled == "disabled"
124
+ %textarea.input-medium(id="#{uid}test_textarea" name="test[textarea]" placeholder="Enter some text..." rows="2" disabled)
125
+ - else
126
+ %textarea.input-medium(id="#{uid}test_textarea" name="test[textarea]" placeholder="Enter some text..." rows="2")
127
+
128
+ -# Uneditable Text Input
129
+ %li(class="#{state} #{disabled}" id="#{uid}test_uneditable")
130
+ %label.label(for="#{uid}test_uneditable") Uneditable Input
131
+ - if disabled == "disabled"
132
+ %span.input-medium.uneditable(id="#{uid}test_uneditable" class="disabled") Hammer time
133
+ - else
134
+ %span.input-medium.uneditable(id="#{uid}test_uneditable") Hammer time
135
+ %p.hint Can't touch this!
136
+
137
+ -# File Browser
138
+ %li.commit.button(class="#{state} #{disabled}")
139
+ %label.label(for="#{uid}test_file") File Browser
140
+ - if disabled == "disabled"
141
+ %input.file(id="#{uid}test_file" name="file" type="file" value="file" disabled)
142
+ - else
143
+ %input.file(id="#{uid}test_file" name="file" type="file" value="file")
144
+
145
+ -# Action Group
146
+ %li
147
+ %ol.form-actions(class="#{dark}")
148
+ %li.commit.button(class="#{state} #{disabled}")
149
+ - if disabled == "disabled"
150
+ %input.submit.btn(name="submit" type="submit" value="Submit" disabled)
151
+ - else
152
+ %input.submit.btn(name="submit" type="submit" value="Submit")
153
+
154
+ %li.commit.button(class="#{state} #{disabled}")
155
+ - if disabled == "disabled"
156
+ %input.reset.btn(name="reset" type="reset" value="Reset" disabled)
157
+ - else
158
+ %input.reset.btn(name="reset" type="reset" value="Reset")
159
+
160
+ %li.commit.button(class="#{state} #{disabled}")
161
+ - if disabled == "disabled"
162
+ %input.button.btn(name="button" type="button" value="Button" disabled)
163
+ - else
164
+ %input.button.btn(name="button" type="button" value="Button")
165
+
166
+ %li.commit.button(class="#{state} #{disabled}")
167
+ - if disabled == "disabled"
168
+ %input.image(name="image" type="image" src="http://placehold.it/68x28&text=IMG" value="Image" disabled)
169
+ - else
170
+ %input.image(name="image" type="image" src="http://placehold.it/68x28&text=IMG" value="Image")
171
+