underoos 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/.rvmrc +1 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +143 -0
- data/LICENSE +26 -0
- data/Procfile +1 -0
- data/README.md +13 -0
- data/Rakefile +12 -0
- data/app/assets/javascripts/styleguide.js +132 -0
- data/app/assets/javascripts/underoos.js +18 -0
- data/app/assets/stylesheets/base/_button-btn-mixin.sass +72 -0
- data/app/assets/stylesheets/base/_elements.sass +61 -0
- data/app/assets/stylesheets/base/_forms.sass +362 -0
- data/app/assets/stylesheets/base/_helpers.sass +54 -0
- data/app/assets/stylesheets/base/_normalize.sass +114 -0
- data/app/assets/stylesheets/base/_scaffold.sass +51 -0
- data/app/assets/stylesheets/base/_tables.sass +99 -0
- data/app/assets/stylesheets/base/_transitions.sass +17 -0
- data/app/assets/stylesheets/base/_typography.sass +185 -0
- data/app/assets/stylesheets/components/_accordions.sass +17 -0
- data/app/assets/stylesheets/components/_breadcrumbs.sass +22 -0
- data/app/assets/stylesheets/components/_button-groups.sass +46 -0
- data/app/assets/stylesheets/components/_carets.sass +24 -0
- data/app/assets/stylesheets/components/_carousels.sass +18 -0
- data/app/assets/stylesheets/components/_close.sass +25 -0
- data/app/assets/stylesheets/components/_decals.sass +27 -0
- data/app/assets/stylesheets/components/_dropdowns.sass +85 -0
- data/app/assets/stylesheets/components/_media.sass +33 -0
- data/app/assets/stylesheets/components/_modals.sass +28 -0
- data/app/assets/stylesheets/components/_nav-lists.sass +22 -0
- data/app/assets/stylesheets/components/_navbars.sass +105 -0
- data/app/assets/stylesheets/components/_notifications.sass +108 -0
- data/app/assets/stylesheets/components/_paddles.sass +34 -0
- data/app/assets/stylesheets/components/_pagination.sass +41 -0
- data/app/assets/stylesheets/components/_pills.sass +64 -0
- data/app/assets/stylesheets/components/_popovers.sass +55 -0
- data/app/assets/stylesheets/components/_progress-bars.sass +29 -0
- data/app/assets/stylesheets/components/_tabs.sass +93 -0
- data/app/assets/stylesheets/components/_tooltips.sass +46 -0
- data/app/assets/stylesheets/components/_wells.sass +16 -0
- data/app/assets/stylesheets/layouts/_containers.sass +15 -0
- data/app/assets/stylesheets/layouts/_print.sass +48 -0
- data/app/assets/stylesheets/layouts/_queries.sass +121 -0
- data/app/assets/stylesheets/layouts/_upgrades.sass +64 -0
- data/app/assets/stylesheets/mixins/_arrows.sass +40 -0
- data/app/assets/stylesheets/mixins/_clearfixins.sass +15 -0
- data/app/assets/stylesheets/mixins/_coloring.sass +6 -0
- data/app/assets/stylesheets/mixins/_columns.sass +19 -0
- data/app/assets/stylesheets/mixins/_conversions.sass +25 -0
- data/app/assets/stylesheets/mixins/_font-size.sass +6 -0
- data/app/assets/stylesheets/mixins/_image-tools.sass +13 -0
- data/app/assets/stylesheets/mixins/_ir.sass +9 -0
- data/app/assets/stylesheets/mixins/_mixins.sass +14 -0
- data/app/assets/stylesheets/mixins/_tab-focus.sass +7 -0
- data/app/assets/stylesheets/mixins/_timing-equations.sass +29 -0
- data/app/assets/stylesheets/mixins/_visibility.sass +43 -0
- data/app/assets/stylesheets/polyfills/_box-shadow.sass +7 -0
- data/app/assets/stylesheets/polyfills/_box-sizing.sass +8 -0
- data/app/assets/stylesheets/polyfills/_functions.sass +22 -0
- data/app/assets/stylesheets/polyfills/_inline-block.sass +8 -0
- data/app/assets/stylesheets/polyfills/_opacity.sass +6 -0
- data/app/assets/stylesheets/polyfills/_polyfills.sass +10 -0
- data/app/assets/stylesheets/polyfills/_transition.sass +9 -0
- data/app/assets/stylesheets/polyfills/_user-select.sass +8 -0
- data/app/assets/stylesheets/styleguide.sass +199 -0
- data/app/assets/stylesheets/themes/_default.sass +119 -0
- data/app/assets/stylesheets/underoos.sass +52 -0
- data/app/controllers/underoos/styleguides_controller.rb +79 -0
- data/app/views/shared/_upgrades.html.haml +12 -0
- data/app/views/underoos/styleguides/_assets.haml +42 -0
- data/app/views/underoos/styleguides/_components.haml +42 -0
- data/app/views/underoos/styleguides/_elements.haml +242 -0
- data/app/views/underoos/styleguides/_forms.haml +305 -0
- data/app/views/underoos/styleguides/_layouts.haml +76 -0
- data/app/views/underoos/styleguides/_palettes.haml +18 -0
- data/app/views/underoos/styleguides/_resources.haml +27 -0
- data/app/views/underoos/styleguides/_tables.haml +124 -0
- data/app/views/underoos/styleguides/_typography.haml +284 -0
- data/app/views/underoos/styleguides/_utilities.haml +270 -0
- data/app/views/underoos/styleguides/components/_accordions.haml +83 -0
- data/app/views/underoos/styleguides/components/_breadcrumbs.haml +42 -0
- data/app/views/underoos/styleguides/components/_button-groups.haml +162 -0
- data/app/views/underoos/styleguides/components/_carets.haml +28 -0
- data/app/views/underoos/styleguides/components/_close.haml +20 -0
- data/app/views/underoos/styleguides/components/_decals.haml +40 -0
- data/app/views/underoos/styleguides/components/_dropdowns.haml +189 -0
- data/app/views/underoos/styleguides/components/_media.haml +78 -0
- data/app/views/underoos/styleguides/components/_modals.haml +42 -0
- data/app/views/underoos/styleguides/components/_nav-lists.haml +52 -0
- data/app/views/underoos/styleguides/components/_navbars.haml +144 -0
- data/app/views/underoos/styleguides/components/_navs-showcase.haml +27 -0
- data/app/views/underoos/styleguides/components/_notifications.haml +169 -0
- data/app/views/underoos/styleguides/components/_paddles.haml +68 -0
- data/app/views/underoos/styleguides/components/_pagination.haml +64 -0
- data/app/views/underoos/styleguides/components/_popovers.haml +33 -0
- data/app/views/underoos/styleguides/components/_progress-bars.haml +72 -0
- data/app/views/underoos/styleguides/components/_tabs-pills.haml +241 -0
- data/app/views/underoos/styleguides/components/_tooltips.haml +37 -0
- data/app/views/underoos/styleguides/components/_wells.haml +29 -0
- data/app/views/underoos/styleguides/index.html.haml +259 -0
- data/app/views/underoos/styleguides/partials/_form-template.haml +171 -0
- data/app/views/underoos/styleguides/partials/_table-data.haml +33 -0
- data/app/views/underoos/styleguides/partials/_transitions.haml +136 -0
- data/config.ru +38 -0
- data/config/routes.rb +3 -0
- data/features/generator.feature +78 -0
- data/features/step_definitions/underoos_steps.rb +3 -0
- data/features/support/env.rb +9 -0
- data/lib/generators/underoos/assets_generator.rb +33 -0
- data/lib/underoos.rb +5 -0
- data/lib/underoos/engine.rb +8 -0
- data/lib/underoos/version.rb +3 -0
- data/public/apple-touch-icon-114x114-precomposed.png +0 -0
- data/public/apple-touch-icon-57x57-precomposed.png +0 -0
- data/public/apple-touch-icon-72x72-precomposed.png +0 -0
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/script/javascripts +15 -0
- data/underoos.gemspec +29 -0
- data/vendor/assets/javascripts/bootstrap-alert.js +94 -0
- data/vendor/assets/javascripts/bootstrap-button.js +100 -0
- data/vendor/assets/javascripts/bootstrap-collapse.js +138 -0
- data/vendor/assets/javascripts/bootstrap-dropdown.js +92 -0
- data/vendor/assets/javascripts/bootstrap-modal.js +210 -0
- data/vendor/assets/javascripts/bootstrap-popover.js +95 -0
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +125 -0
- data/vendor/assets/javascripts/bootstrap-tab.js +130 -0
- data/vendor/assets/javascripts/bootstrap-tooltip.js +270 -0
- data/vendor/assets/javascripts/bootstrap-transition.js +51 -0
- data/vendor/assets/javascripts/bootstrap-typeahead.js +271 -0
- data/vendor/assets/javascripts/prettify.js +28 -0
- metadata +246 -0
@@ -0,0 +1,305 @@
|
|
1
|
+
|
2
|
+
#forms_type.sg-spy-landing
|
3
|
+
.sg-subsection
|
4
|
+
%table.box.banded.thead-decorate
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
%th Name
|
8
|
+
%th Class
|
9
|
+
%th Description
|
10
|
+
%tfoot
|
11
|
+
%tr
|
12
|
+
%td(colspan="3") Apply the class directly on the <code>form</code> element
|
13
|
+
%tbody
|
14
|
+
%tr
|
15
|
+
%td
|
16
|
+
%strong Vertical
|
17
|
+
%td(style="color: #999;") <em>not required</em>
|
18
|
+
%td Stacked label, controls and hints
|
19
|
+
%tr
|
20
|
+
%td
|
21
|
+
%strong Horizontal
|
22
|
+
%td <code>.form-horizontal</code>
|
23
|
+
%td Labels and controls on the same line, stacked hints
|
24
|
+
%tr
|
25
|
+
%td
|
26
|
+
%strong Inline
|
27
|
+
%td <code>.form-inline</code>
|
28
|
+
%td All controls on the same line
|
29
|
+
%tr
|
30
|
+
%td
|
31
|
+
%strong Search
|
32
|
+
%td <code>.form-search</code>
|
33
|
+
%td Similar to inline, but targets a search field
|
34
|
+
|
35
|
+
#forms_example.sg-spy-landing
|
36
|
+
.sg-subsection
|
37
|
+
%h3.sg-subheading Example forms <span>forms.sass</span>
|
38
|
+
.sg-quarter.pull
|
39
|
+
%h4 Basic form
|
40
|
+
%p Small sample of form control elements using the default layout.
|
41
|
+
.sg-threequarter.push
|
42
|
+
%form.well.dark
|
43
|
+
%ol
|
44
|
+
%li
|
45
|
+
%label.label(for="example_url") Domain Name<abbr title="required">*</abbr>
|
46
|
+
%input.input-medium(id="example_url" type="url" name="example[url]" placeholder="www.example.com")
|
47
|
+
%p.hint Enter your domain name!
|
48
|
+
%li.boolean
|
49
|
+
%label(for="example_check" name="example[check]")
|
50
|
+
%input(id="example_check" name="example[check]" type="checkbox" value="0")
|
51
|
+
Check this box!
|
52
|
+
%li.form-actions.dark
|
53
|
+
%button.btn(type="submit") Submit
|
54
|
+
|
55
|
+
.sg-subsection
|
56
|
+
.sg-quarter.pull
|
57
|
+
%h4 Search form
|
58
|
+
%p Add the class <code>search-query</code> to input elements for rounded corners.
|
59
|
+
.sg-threequarter.push
|
60
|
+
%form.form-search.well.dark
|
61
|
+
%ol
|
62
|
+
%li
|
63
|
+
%input.search-query.input-small(type="search" name="test[search]" placeholder="google")
|
64
|
+
%button.btn(type="submit") Search
|
65
|
+
|
66
|
+
.sg-subsection
|
67
|
+
.sg-quarter.pull
|
68
|
+
%h4 Inline form
|
69
|
+
%p Use the inline form for small forms needing a compact style.
|
70
|
+
.sg-threequarter.push
|
71
|
+
%form.form-inline.well.dark
|
72
|
+
%ol
|
73
|
+
%li
|
74
|
+
%input.input-small(type="email" name="test[email]" placeholder="email")
|
75
|
+
%input.input-small(type="password" name="test[password]" placeholder="password")
|
76
|
+
%button.btn(type="submit") Go
|
77
|
+
|
78
|
+
#forms_vertical.sg-spy-landing
|
79
|
+
.sg-subsection
|
80
|
+
%h3.sg-subheading Vertical form
|
81
|
+
%form
|
82
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "vert_", :legend => 'I am Legend', :state => "", :disabled => "", :dark => ""}
|
83
|
+
|
84
|
+
#forms_horizontal.sg-spy-landing
|
85
|
+
.sg-subsection
|
86
|
+
%h3.sg-subheading Horizontal form
|
87
|
+
%form.form-horizontal.well.dark
|
88
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "horz_", :legend => 'Legend, starring Tom Cruise', :state => "", :disabled => "", :dark => "dark"}
|
89
|
+
.notification.important.fade.in
|
90
|
+
%p <strong>Tip!</strong> Add one of the <code>.well</code> classes to the <code>form</code> element to contain it from other items on the page
|
91
|
+
|
92
|
+
#forms_structure.sg-spy-landing
|
93
|
+
.sg-subsection
|
94
|
+
%h3.sg-subheading Form structure
|
95
|
+
%p Forms are built around the structure output from <a href="https://github.com/justinfrench/formtastic">formtastic</a>.
|
96
|
+
%pre.prettyprint.html
|
97
|
+
= preserve do
|
98
|
+
:escaped
|
99
|
+
<form class="form-horizontal well dark">
|
100
|
+
<ol>
|
101
|
+
<li>
|
102
|
+
<label class="label" for="example_url">Domain Name<abbr title="required">*</abbr></label>
|
103
|
+
<input class="input-medium" id="example_url" name="example[url]" placeholder="www.example.com" type="url">
|
104
|
+
<p class="hint">Enter your domain name!</p>
|
105
|
+
</li>
|
106
|
+
<li class="boolean">
|
107
|
+
<label for="example_check" name="example[check]">
|
108
|
+
<input id="example_check" name="example[check]" type="checkbox" value="0">
|
109
|
+
Check this box!
|
110
|
+
</label>
|
111
|
+
</li>
|
112
|
+
<li class="form-actions dark">
|
113
|
+
<button class="btn" type="submit">Submit</button>
|
114
|
+
</li>
|
115
|
+
</ol>
|
116
|
+
</form>
|
117
|
+
%pre.haml.hidden
|
118
|
+
= preserve do
|
119
|
+
:escaped
|
120
|
+
%form.form-horizontal.well.dark
|
121
|
+
%ol
|
122
|
+
%li
|
123
|
+
%label.label(for="example_url")
|
124
|
+
Domain Name
|
125
|
+
%abbr(title="required") *
|
126
|
+
%input#example_url.input-medium(name="example[url]" placeholder="www.example.com" type="url")
|
127
|
+
%p.hint Enter your domain name!
|
128
|
+
%li.boolean
|
129
|
+
%label(for="example_check" name="example[check]")
|
130
|
+
%input#example_check(name="example[check]" type="checkbox" value="0") Check this box!
|
131
|
+
%li.form-actions dark
|
132
|
+
%button.btn(type="submit") Submit
|
133
|
+
|
134
|
+
#forms_state.sg-spy-landing
|
135
|
+
.sg-subsection
|
136
|
+
%h3.sg-subheading Form states
|
137
|
+
.sg-half.pull
|
138
|
+
%form.form-horizontal.well
|
139
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "disabled_", :legend => 'Disabled states', :state => "", :disabled => "disabled", :dark => ""}
|
140
|
+
.notification.important.fade.in
|
141
|
+
%p <strong>Note!</strong> Add <code>.disable</code> to the <code>li</code> and a <code>disable</code> attribute to form controls
|
142
|
+
.sg-half.push
|
143
|
+
%form.form-horizontal.well
|
144
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "errors_", :legend => 'Error states', :state => "error", :disabled => "", :dark => ""}
|
145
|
+
.notification.important.fade.in
|
146
|
+
%p <strong>Note!</strong> Add the <code>.error</code> class to the <code>li</code> for the problem element
|
147
|
+
|
148
|
+
.sg-subsection
|
149
|
+
.sg-half.pull
|
150
|
+
%form.form-horizontal.well
|
151
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "warn_", :legend => 'Warning states', :state => "warning", :disabled => "", :dark => ""}
|
152
|
+
.notification.important.fade.in
|
153
|
+
%p <strong>Note!</strong> Add the <code>.warning</code> class to the <code>li</code> for the problem element
|
154
|
+
.sg-half.push
|
155
|
+
%form.form-horizontal.well
|
156
|
+
= render :partial => 'underoos/styleguides/partials/form-template', :locals => {:uid => "success_", :legend => 'Success states', :state => "success", :disabled => "", :dark => ""}
|
157
|
+
.notification.important.fade.in
|
158
|
+
%p <strong>Note!</strong> Add the <code>.success</code> class to the <code>li</code> for the winning element
|
159
|
+
|
160
|
+
#forms_inputs.sg-spy-landing
|
161
|
+
.sg-subsection
|
162
|
+
%h3.sg-subheading Additional input controls
|
163
|
+
%table.box.banded.thead-decorate
|
164
|
+
%thead
|
165
|
+
%tr
|
166
|
+
%th Control
|
167
|
+
%th Type
|
168
|
+
%th Description
|
169
|
+
%tfoot
|
170
|
+
%tr
|
171
|
+
%td(colspan="3") Descriptions courtesy <a href="https://developer.mozilla.org">Mozilla Developer Network</a>
|
172
|
+
%tbody
|
173
|
+
%tr
|
174
|
+
%td
|
175
|
+
%input.input-xlarge(type="email" name="email" placeholder="name@example.com")
|
176
|
+
%td <code>email</code>
|
177
|
+
%td Text field for editing an e-mail address, <code>:valid</code> and <code>:invalid</code> pseudo-classes are applied
|
178
|
+
%tr
|
179
|
+
%td
|
180
|
+
%input.input-xlarge(type="password" name="password" placeholder="password")
|
181
|
+
%td <code>password</code>
|
182
|
+
%td A single-line text field whose value is obscured
|
183
|
+
%tr
|
184
|
+
%td
|
185
|
+
%input.input-xlarge(type="url" name="url" placeholder="www.example.com")
|
186
|
+
%td <code>url</code>
|
187
|
+
%td Text field for editing a URL, <code>:valid</code> and <code>:invalid</code> pseudo-classes are applied
|
188
|
+
%tr
|
189
|
+
%td
|
190
|
+
%input.input-xlarge(type="tel" name="tel" placeholder="303-867-5309")
|
191
|
+
%td <code>tel</code>
|
192
|
+
%td Text field for entering a telephone number, <code>:valid</code> and <code>:invalid</code> pseudo-classes are applied
|
193
|
+
%tr
|
194
|
+
%td
|
195
|
+
%input.input-xlarge(type="datetime" name="datetime" placeholder="2012-01-29 12:06:23:21")
|
196
|
+
%td <code>datetime</code>
|
197
|
+
%td Date and time control with the time zone set to UTC
|
198
|
+
%tr
|
199
|
+
%td
|
200
|
+
%input.input-xlarge(type="datetime-local" name="datetime-local" placeholder="2012-01-29 12:06:23:21")
|
201
|
+
%td <code>datetime-local</code>
|
202
|
+
%td Date and time control with no time zone
|
203
|
+
%tr
|
204
|
+
%td
|
205
|
+
%input.input-xlarge(type="time" name="time" placeholder="12:06:23:21")
|
206
|
+
%td <code>time</code>
|
207
|
+
%td Time control with no time zone
|
208
|
+
%tr
|
209
|
+
%td
|
210
|
+
%input.input-xlarge(type="date" name="date" placeholder="2012-01-29")
|
211
|
+
%td <code>date</code>
|
212
|
+
%td Date control with no time zone
|
213
|
+
%tr
|
214
|
+
%td
|
215
|
+
%input.input-xlarge(type="month" name="month" placeholder="2012-01")
|
216
|
+
%td <code>month</code>
|
217
|
+
%td Date control consisting of a year and a month with no time zone
|
218
|
+
%tr
|
219
|
+
%td
|
220
|
+
%input.input-xlarge(type="week" name="week" placeholder="42")
|
221
|
+
%td <code>week</code>
|
222
|
+
%td Date control consisting of a week-year number and a week number with no time zone
|
223
|
+
%tr
|
224
|
+
%td
|
225
|
+
%input.input-xlarge(type="number" name="number" placeholder="5" min="0" max="10")
|
226
|
+
%td <code>number</code>
|
227
|
+
%td Control for floating point values, add <code>min</code> and <code>max</code> attributes to create a spinner
|
228
|
+
%tr
|
229
|
+
%td
|
230
|
+
%input.input-xlarge(type="range" name="range" placeholder="5" min="0" max="10" step=".5")
|
231
|
+
%td <code>range</code>
|
232
|
+
%td Slider control for numbers where exact value is not important, add <code>min</code>, <code>max</code> and <code>step</code> attributes
|
233
|
+
%tr
|
234
|
+
%td
|
235
|
+
%input.input-xlarge(type="color" name="color" placeholder="#fff" alt="color")
|
236
|
+
%td <code>color</code>
|
237
|
+
%td A control for specifying a color
|
238
|
+
%tr
|
239
|
+
%td
|
240
|
+
%input.input-xlarge(type="hidden" name="hidden" placeholder="hidden")
|
241
|
+
%td <code>hidden</code>
|
242
|
+
%td A control that is not displayed, but whose value is submitted to the server
|
243
|
+
|
244
|
+
#forms_typeahead.sg-spy-landing
|
245
|
+
.sg-subsection
|
246
|
+
%h3.sg-subheading Typeahead <span>forms.sass, dropdowns.sass</span>
|
247
|
+
.sg-onethird.pull
|
248
|
+
%p For quick auto-complete functionality, utilize the typeahead component. It's a combination of an input with a <code>data-provide="typeahead"</code> attribute and a drop down menu.
|
249
|
+
%br
|
250
|
+
%p The component requires <a href="http://twitter.github.com/bootstrap/javascript.html#typeahead">Bootstrap's typeahead plugin</a>.
|
251
|
+
%br
|
252
|
+
%p The plugin, appends a <code>ul.typeahead.dropdown-menu</code> list to the <code>body</code> element. There are no specific styles included within underoos for typeaheads as they are primarily a combination of existing components.
|
253
|
+
.sg-twothird.push
|
254
|
+
.well
|
255
|
+
%form
|
256
|
+
%ol
|
257
|
+
%li
|
258
|
+
%input.input-medium#superfriends(type="text" data-provide="typeahead" autocomplete="off" placeholder="Add Superfriends")
|
259
|
+
%pre.prettyprint.html
|
260
|
+
= preserve do
|
261
|
+
:escaped
|
262
|
+
<form>
|
263
|
+
<ol>
|
264
|
+
<li>
|
265
|
+
<input id="superfriends" data-provide="typeahead" autocomplete="off" placeholder="Add" type="text">
|
266
|
+
</li>
|
267
|
+
</ol>
|
268
|
+
</form>
|
269
|
+
%pre.prettyprint.haml.hidden
|
270
|
+
= preserve do
|
271
|
+
:escaped
|
272
|
+
%form
|
273
|
+
%ol
|
274
|
+
%li
|
275
|
+
%input#superfriends(type="text" data-provide="typeahead" autocomplete="off" placeholder="Add")
|
276
|
+
%pre.prettyprint
|
277
|
+
= preserve do
|
278
|
+
:escaped
|
279
|
+
// Instantiate the typeahead instance based off an id
|
280
|
+
$('#superfriends').typeahead({source:['Aquaman', 'Superman'] , items:10})
|
281
|
+
|
282
|
+
.notification.important.fade.in
|
283
|
+
%p <strong>Tip!</strong> Make sure to include the attribute <code>autocomplete="off"</code> to disable the browser's default behavior
|
284
|
+
|
285
|
+
|
286
|
+
#forms_editable.sg-spy-landing
|
287
|
+
.sg-subsection
|
288
|
+
%h3.sg-subheading Content editable elements <span>forms.sass</span>
|
289
|
+
.sg-onethird.pull
|
290
|
+
%p Applying the attribute <code>contenteditable="true"</code> to elements allows the user to change the contents within the item. Elements that are editable typically include states for <code>hover</code> and <code>focus</code> while a user is editing.
|
291
|
+
.sg-twothird.push
|
292
|
+
.well
|
293
|
+
%h3(contenteditable="true") Edit Title
|
294
|
+
%p(contenteditable="true") Edit Description
|
295
|
+
%pre.prettyprint.html
|
296
|
+
= preserve do
|
297
|
+
:escaped
|
298
|
+
<h3 contenteditable="true">Edit Title</h3>
|
299
|
+
<p contenteditable="true">Edit Description</p>
|
300
|
+
%pre.prettyprint.haml.hidden
|
301
|
+
= preserve do
|
302
|
+
:escaped
|
303
|
+
%h3(contenteditable="true") Edit Title
|
304
|
+
%p(contenteditable="true") Edit Description
|
305
|
+
|
@@ -0,0 +1,76 @@
|
|
1
|
+
|
2
|
+
#layouts_containers.sg-spy-landing
|
3
|
+
.sg-subsection
|
4
|
+
%h3.sg-subheading Containers <span>containers.sass</span>
|
5
|
+
%p(style="width:67%;") Containers are used to "contain" elements of content within a page or section. All containers inject a <a href="http://nicolasgallagher.com/micro-clearfix-hack/">micro clearfix</a> to clear any floats from interior elements.
|
6
|
+
.sg-subsection
|
7
|
+
%table.box.banded.thead-decorate
|
8
|
+
%thead
|
9
|
+
%tr
|
10
|
+
%th Class
|
11
|
+
%th Usage
|
12
|
+
%tbody
|
13
|
+
%tr
|
14
|
+
%td
|
15
|
+
%code .container
|
16
|
+
%td The default container is a fluid width container with a <code>max-width</code> set to the <code>$base_width</code> variable.
|
17
|
+
%tr
|
18
|
+
%td
|
19
|
+
%code .container.outer
|
20
|
+
%td Adding the <code>.outer</code> class to a <code>container</code> adds left and right padding, which creates a little breathing room in fluid layouts from the browser's edges.
|
21
|
+
%tr
|
22
|
+
%td
|
23
|
+
%code .container.fluid
|
24
|
+
%td Adding the <code>.fluid</code> class to a <code>container</code> will remove the <code>max-width</code> setting and allow the container to fill the browser window.
|
25
|
+
%tr
|
26
|
+
%td
|
27
|
+
%code .container.fixed
|
28
|
+
%td Adding the <code>.fixed</code> class to a <code>container</code> will render it using fixed width pixels with no responsive behavior.
|
29
|
+
|
30
|
+
#layouts_queries.sg-spy-landing
|
31
|
+
.sg-subsection
|
32
|
+
%h3.sg-subheading Media Queries <span>queries.sass</span>
|
33
|
+
%p.sg-twothird.pull Some default media queries are put into place and are tuned for some of the components. These should be adjusted based on the application's needs. At the moment, we are not rolling mobile first, but rather override as the viewport becomes smaller.
|
34
|
+
.sg-subsection
|
35
|
+
%table.box.banded.thead-decorate
|
36
|
+
%thead
|
37
|
+
%tr
|
38
|
+
%th Media Query
|
39
|
+
%th Usage
|
40
|
+
%tbody
|
41
|
+
%tr
|
42
|
+
%td
|
43
|
+
%code @media min-width: 1200px
|
44
|
+
%td Used for larger screens primarily on desktop and laptop devices.
|
45
|
+
%tr
|
46
|
+
%td
|
47
|
+
%code @media min-width: 890px
|
48
|
+
%td Smaller desktop, laptop devices, tablets, this number should change based on the type of navigation being rolled
|
49
|
+
%tr
|
50
|
+
%td
|
51
|
+
%code @media max-width: 889px
|
52
|
+
%td For this specific application, it's where the navigation breaks down and we need to go to the responsive "toggle" style
|
53
|
+
%tr
|
54
|
+
%td
|
55
|
+
%code @media max-width: 768px
|
56
|
+
%td Typically portrait tablet
|
57
|
+
%tr
|
58
|
+
%td
|
59
|
+
%code @media max-width: 480px
|
60
|
+
%td Typically landscape phones
|
61
|
+
%tr
|
62
|
+
%td
|
63
|
+
%code @media max-width: 320px
|
64
|
+
%td Typically portrait phones
|
65
|
+
.notification.important.fade.in
|
66
|
+
%p <strong>Note!</strong> Based on the design and needs of the application, you may need more queries put in place or less
|
67
|
+
|
68
|
+
#layouts_upgrades.sg-spy-landing
|
69
|
+
.sg-subsection
|
70
|
+
%h3.sg-subheading Upgrade Messaging <span>upgrades.sass</span>
|
71
|
+
.sg-half.pull
|
72
|
+
%p Upgrade messaging is enabled if certain conditions are established by <a href="http://www.modernizr.com/">Modernizr</a>. Mainly it's testing for a certain threshold of Internet Explorer and if JavaScript is enabled. After clicking the test button, hover over the <span class="decal danger">!</span> icon to see the upgrade message.
|
73
|
+
.sg-half.push
|
74
|
+
.well
|
75
|
+
%button.btn.primary#upgrade_test(href="#") Test Upgrade Message
|
76
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
- @palettes.each do |palette|
|
3
|
+
.sg-subsection
|
4
|
+
%h4=palette[:title]
|
5
|
+
%table.box.banded.thead-decorate
|
6
|
+
%thead
|
7
|
+
%tr
|
8
|
+
%th Swatch
|
9
|
+
%th Variable
|
10
|
+
%th Hex
|
11
|
+
%tbody
|
12
|
+
- palette[:colors].each do |color|
|
13
|
+
%tr
|
14
|
+
%td
|
15
|
+
%span.sg-swatch(style="background-color:#{color[:hex]};")
|
16
|
+
%td <code>#{color[:prop]}</code>
|
17
|
+
%td <code>#{color[:hex]}</code>
|
18
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
.sg-subsection
|
3
|
+
%h3.sg-subheading References
|
4
|
+
.well
|
5
|
+
%p » <a href="http://dochub.io/">Dochub search for HTML, CSS, JavaScript, DOM, jQuery</a>
|
6
|
+
%p » <a href="http://www.w3schools.com/html5/default.asp">W3 Schools, for tag definitions</a>
|
7
|
+
%p » <a href="http://sass-lang.com/">SASS</a>
|
8
|
+
%p » <a href="http://compass-style.org/">Compass</a>
|
9
|
+
%p » <a href="http://thoughtbot.com/bourbon/">Bourbon</a>
|
10
|
+
%p » <a href="http://twitter.github.com/bootstrap/">Twitter's Bootstrap Library</a>
|
11
|
+
%p » <a href="http://twitter.github.com/bootstrap/javascript.html">Twitter's Bootstrap JavaScript Library</a>
|
12
|
+
%p » <a href="https://github.com/twitter/bootstrap">Twitter's Bootstrap Source Files</a>
|
13
|
+
%p » <a href="https://www.pivotaltracker.com/projects/485221">Pivotal Tracker Project</a>
|
14
|
+
|
15
|
+
.sg-subsection
|
16
|
+
%h3.sg-subheading Tips
|
17
|
+
.notification.important.fade.in
|
18
|
+
%p <strong>Pro Tip!</strong> Type the bang symbol (<kbd>!</kbd>) to toggle all example markup between <code>html</code> and <code>haml</code>
|
19
|
+
|
20
|
+
.sg-subsection
|
21
|
+
%p
|
22
|
+
%small The Bootstrap library is licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License v2.0</a>
|
23
|
+
%p
|
24
|
+
%small The Bootstrap documentation is licensed under <a href="http://creativecommons.org/licenses/by/3.0/">CC BY 3.0</a>
|
25
|
+
%p
|
26
|
+
%small Anything created by <a href="http://www.modeset.com/">mode set</a> is <a href="https://raw.github.com/modeset/underoos/master/LICENSE">MIT Licensed</a>
|
27
|
+
|
@@ -0,0 +1,124 @@
|
|
1
|
+
|
2
|
+
.sg-subsection
|
3
|
+
%h3.sg-subheading Table styles <span>tables.sass</span>
|
4
|
+
%p Building tables is additive around the classes applied to the top level <code>table</code> element.
|
5
|
+
|
6
|
+
.sg-subsection
|
7
|
+
.sg-onethird.pull
|
8
|
+
%h4 Base
|
9
|
+
%p The base table creates division in data with horizontal dividers.
|
10
|
+
%pre.prettyprint.html
|
11
|
+
= preserve do
|
12
|
+
:escaped
|
13
|
+
<table>
|
14
|
+
...
|
15
|
+
</table>
|
16
|
+
%pre.prettyprint.haml.hidden
|
17
|
+
= preserve do
|
18
|
+
:escaped
|
19
|
+
%table
|
20
|
+
...
|
21
|
+
.sg-twothird.push
|
22
|
+
%table
|
23
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
24
|
+
|
25
|
+
.sg-subsection
|
26
|
+
.sg-onethird.pull
|
27
|
+
%h4 Box
|
28
|
+
%p Adding the <code>.box</code> class renders the table with exterior boundries for all <code>table rows</code>.
|
29
|
+
%pre.prettyprint.html
|
30
|
+
= preserve do
|
31
|
+
:escaped
|
32
|
+
<table class="box">
|
33
|
+
...
|
34
|
+
</table>
|
35
|
+
%pre.prettyprint.haml.hidden
|
36
|
+
= preserve do
|
37
|
+
:escaped
|
38
|
+
%table.box
|
39
|
+
...
|
40
|
+
.sg-twothird.push
|
41
|
+
%table.box
|
42
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
43
|
+
|
44
|
+
.sg-subsection
|
45
|
+
.sg-onethird.pull
|
46
|
+
%h4 Vertical border
|
47
|
+
%p Adding the <code>.vborder</code> class renders the table with vertical divisions for <code>table data</code>.
|
48
|
+
%pre.prettyprint.html
|
49
|
+
= preserve do
|
50
|
+
:escaped
|
51
|
+
<table class="vborder">
|
52
|
+
...
|
53
|
+
</table>
|
54
|
+
%pre.prettyprint.haml.hidden
|
55
|
+
= preserve do
|
56
|
+
:escaped
|
57
|
+
%table.vborder
|
58
|
+
...
|
59
|
+
.sg-twothird.push
|
60
|
+
%table.vborder
|
61
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
62
|
+
|
63
|
+
.sg-subsection
|
64
|
+
.sg-onethird.pull
|
65
|
+
%h4 Box & Vertical border
|
66
|
+
%p Combining the <code>.box</code> class combined with the <code>.vborder</code> class renders the table with full borders around <code>tr</code> and <code>td</code> elements.
|
67
|
+
%pre.prettyprint.html
|
68
|
+
= preserve do
|
69
|
+
:escaped
|
70
|
+
<table class="box vborder">
|
71
|
+
...
|
72
|
+
</table>
|
73
|
+
%pre.prettyprint.haml.hidden
|
74
|
+
= preserve do
|
75
|
+
:escaped
|
76
|
+
%table.box.vborder
|
77
|
+
...
|
78
|
+
.sg-twothird.push
|
79
|
+
%table.box.vborder
|
80
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
81
|
+
|
82
|
+
.sg-subsection
|
83
|
+
.sg-onethird.pull
|
84
|
+
%h4 Banded
|
85
|
+
%p To add coloring to alternate <code>tbody</code> rows, add the class <code>.banded</code>.
|
86
|
+
%pre.prettyprint.html
|
87
|
+
= preserve do
|
88
|
+
:escaped
|
89
|
+
<table class="banded">
|
90
|
+
...
|
91
|
+
</table>
|
92
|
+
%pre.prettyprint.haml.hidden
|
93
|
+
= preserve do
|
94
|
+
:escaped
|
95
|
+
%table.banded
|
96
|
+
...
|
97
|
+
.sg-twothird.push
|
98
|
+
%table.banded
|
99
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
100
|
+
.notification.important.fade.in
|
101
|
+
%p <strong>Note!</strong> You can also add <code>.odd</code> or <code>.even</code> to <code>tr</code> instead of relying on <code>:nth-child(<em>odd|even</em>)</code>
|
102
|
+
|
103
|
+
|
104
|
+
.sg-subsection
|
105
|
+
.sg-onethird.pull
|
106
|
+
%h4 Kitchen sink
|
107
|
+
%p Combine all of the available classes including <code>thead-decorate</code> and <code>tfoot-decorate</code> to style the <code>thead</code> and <code>tfoot</code> elements.
|
108
|
+
%pre.prettyprint.html
|
109
|
+
= preserve do
|
110
|
+
:escaped
|
111
|
+
<table class="box vborder banded thead-decorate tfoot-decorate">
|
112
|
+
...
|
113
|
+
</table>
|
114
|
+
%pre.prettyprint.haml.hidden
|
115
|
+
= preserve do
|
116
|
+
:escaped
|
117
|
+
%table.box.vborder.banded.thead-decorate.tfoot-decorate
|
118
|
+
...
|
119
|
+
.sg-twothird.push
|
120
|
+
%table.box.vborder.banded.thead-decorate.tfoot-decorate
|
121
|
+
= render :partial => 'underoos/styleguides/partials/table-data'
|
122
|
+
.notification.important.fade.in
|
123
|
+
%p <strong>Note!</strong> Add <code>.ascending</code> or <code>.descending</code> to <code>th > a</code> elements with enclosed <code>span caret</code> for sorting icons
|
124
|
+
|