wcc-styles 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README-GEM.md +43 -0
- data/lib/assets/images/wcc/styles/logo-dark.png +0 -0
- data/lib/assets/images/wcc/styles/logo-dark.svg +19 -0
- data/lib/assets/images/wcc/styles/logo-text.png +0 -0
- data/lib/assets/images/wcc/styles/logo.png +0 -0
- data/lib/assets/images/wcc/styles/logo.svg +15 -0
- data/lib/assets/javascripts/wcc/styles/application.js +3 -0
- data/lib/assets/javascripts/wcc/styles/selectize.js +13 -0
- data/lib/assets/javascripts/wcc/styles/tessa.js.coffee +173 -0
- data/lib/assets/javascripts/wcc/styles/wcc.datetimepicker.js +50 -0
- data/lib/assets/stylesheets/wcc/styles/admin/_admin_base.scss +24 -0
- data/lib/assets/stylesheets/wcc/styles/admin/_all.scss +1 -0
- data/lib/assets/stylesheets/wcc/styles/apps/_all.scss +2 -0
- data/lib/assets/stylesheets/wcc/styles/apps/_events.scss +22 -0
- data/lib/assets/stylesheets/wcc/styles/apps/_staff.scss +151 -0
- data/lib/assets/stylesheets/wcc/styles/base.css.scss +90 -0
- data/lib/assets/stylesheets/wcc/styles/base/all.css.scss +4 -0
- data/lib/assets/stylesheets/wcc/styles/base/custom_file_inputs.css.scss +7 -0
- data/lib/assets/stylesheets/wcc/styles/base/custom_selects.css.scss +8 -0
- data/lib/assets/stylesheets/wcc/styles/base/icons.css.scss +2 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_admin.scss +0 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_alerts.scss +95 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_all.scss +12 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_buttons.scss +126 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_datetimepicker.scss +555 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_elements.scss +174 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_forms.scss +236 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_grid.scss +183 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_labels.scss +117 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_navs.scss +146 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_normalize.scss +99 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_pagination.scss +135 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_selectize.scss +361 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_sidebar_slideout.scss +184 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_tables.scss +268 -0
- data/lib/assets/stylesheets/wcc/styles/snippets/_top_nav.scss +278 -0
- data/lib/assets/stylesheets/wcc/styles/variables/_colors.scss +28 -0
- data/lib/assets/stylesheets/wcc/styles/variables/_mixins.scss +14 -0
- data/lib/assets/stylesheets/wcc/styles/variables/_typography.scss +382 -0
- data/lib/wcc/styles.rb +16 -0
- data/lib/wcc/styles/engine.rb +32 -0
- data/lib/wcc/styles/helpers.rb +11 -0
- data/lib/wcc/styles/simple_form.rb +102 -0
- data/lib/wcc/styles/simple_form/asset_input.rb +46 -0
- data/lib/wcc/styles/simple_form/date_picker_input.rb +19 -0
- data/lib/wcc/styles/simple_form/historical_date_input.rb +50 -0
- data/lib/wcc/styles/simple_form/time_picker_input.rb +32 -0
- data/lib/wcc/styles/version.rb +5 -0
- metadata +190 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
// Color variables (SASS Only) - Managed in /sass/variables/_colors.scss
|
2
|
+
|
3
|
+
$red: #962D27;
|
4
|
+
$orange: #EB7F4C;
|
5
|
+
$dark-orange: darken($orange, 2%);
|
6
|
+
$yellow: #EBD15C;
|
7
|
+
$green: #53BD67;
|
8
|
+
$blue: #377CAD;
|
9
|
+
$pink: #FF3366;
|
10
|
+
|
11
|
+
$neutral1: #F6F5F3;
|
12
|
+
$neutral2: darken($neutral1, 2%);
|
13
|
+
$neutral3: darken($neutral2, 2%);
|
14
|
+
$neutral4: darken($neutral3, 2%);
|
15
|
+
$neutral5: darken($neutral4, 2%);
|
16
|
+
$neutral6: darken($neutral5, 2%);
|
17
|
+
$neutral7: darken($neutral6, 2%);
|
18
|
+
$neutral8: darken($neutral7, 2%);
|
19
|
+
$neutral9: darken($neutral8, 2%);
|
20
|
+
$neutral10: darken($neutral9, 2%);
|
21
|
+
|
22
|
+
$lightest-grey: #D9D9D9;
|
23
|
+
$light-grey: #999999;
|
24
|
+
$medium-grey: #595959;
|
25
|
+
$dark-grey: #393939;
|
26
|
+
|
27
|
+
$text: #292929;
|
28
|
+
$light-text: #a6a6a6;
|
@@ -0,0 +1,382 @@
|
|
1
|
+
// Typography variables (SASS Only) - Managed in /sass/variables/_typography.scss
|
2
|
+
|
3
|
+
@import "colors";
|
4
|
+
|
5
|
+
@import url(//fonts.googleapis.com/css?family=Droid+Serif|Open+Sans:300,400,600,700);
|
6
|
+
|
7
|
+
//Variables
|
8
|
+
$font-size: 100 !default;
|
9
|
+
$font-base: 16 * ($font-size/100) !default;
|
10
|
+
$line-height: 1.5;
|
11
|
+
$measure: $font-base * $line-height;
|
12
|
+
|
13
|
+
|
14
|
+
// styles for all headings, in the style of @csswizardry
|
15
|
+
%hN {
|
16
|
+
text-rendering: optimizeLegibility; // voodoo to enable ligatures and kerning
|
17
|
+
line-height: 1; // this fixes huge spaces when a heading wraps onto two lines
|
18
|
+
margin-top: 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
@mixin primary-font {
|
22
|
+
font-family: 'Open Sans', sans-serif;
|
23
|
+
}
|
24
|
+
|
25
|
+
@mixin secondary-font {
|
26
|
+
font-family: 'Droid Serif', serif;
|
27
|
+
}
|
28
|
+
|
29
|
+
@mixin secondary-font-black {
|
30
|
+
font-family: 'Droid Serif', serif;
|
31
|
+
}
|
32
|
+
|
33
|
+
small {
|
34
|
+
font-size: 85%;
|
35
|
+
}
|
36
|
+
|
37
|
+
cite {
|
38
|
+
font-style: normal;
|
39
|
+
}
|
40
|
+
|
41
|
+
hr {
|
42
|
+
margin-top: 20px;
|
43
|
+
margin-bottom: 20px;
|
44
|
+
border: 0;
|
45
|
+
border-top: 1px solid #eeeeee;
|
46
|
+
}
|
47
|
+
|
48
|
+
h1,
|
49
|
+
h2,
|
50
|
+
h3,
|
51
|
+
h4,
|
52
|
+
h5,
|
53
|
+
h6,
|
54
|
+
.h1,
|
55
|
+
.h2,
|
56
|
+
.h3,
|
57
|
+
.h4,
|
58
|
+
.h5,
|
59
|
+
.h6 {
|
60
|
+
font-family: inherit;
|
61
|
+
font-weight: 500;
|
62
|
+
color: inherit;
|
63
|
+
margin: 0 0 10px 0;
|
64
|
+
padding: 0;
|
65
|
+
}
|
66
|
+
|
67
|
+
h1 small,
|
68
|
+
h2 small,
|
69
|
+
h3 small,
|
70
|
+
h4 small,
|
71
|
+
h5 small,
|
72
|
+
h6 small,
|
73
|
+
.h1 small,
|
74
|
+
.h2 small,
|
75
|
+
.h3 small,
|
76
|
+
.h4 small,
|
77
|
+
.h5 small,
|
78
|
+
.h6 small,
|
79
|
+
h1 .small,
|
80
|
+
h2 .small,
|
81
|
+
h3 .small,
|
82
|
+
h4 .small,
|
83
|
+
h5 .small,
|
84
|
+
h6 .small,
|
85
|
+
.h1 .small,
|
86
|
+
.h2 .small,
|
87
|
+
.h3 .small,
|
88
|
+
.h4 .small,
|
89
|
+
.h5 .small,
|
90
|
+
.h6 .small {
|
91
|
+
font-weight: normal;
|
92
|
+
line-height: 1;
|
93
|
+
color: #999999;
|
94
|
+
}
|
95
|
+
|
96
|
+
h1 small,
|
97
|
+
.h1 small,
|
98
|
+
h2 small,
|
99
|
+
.h2 small,
|
100
|
+
h3 small,
|
101
|
+
.h3 small,
|
102
|
+
h1 .small,
|
103
|
+
.h1 .small,
|
104
|
+
h2 .small,
|
105
|
+
.h2 .small,
|
106
|
+
h3 .small,
|
107
|
+
.h3 .small {
|
108
|
+
font-size: 65%;
|
109
|
+
}
|
110
|
+
|
111
|
+
h4,
|
112
|
+
.h4,
|
113
|
+
h5,
|
114
|
+
.h5,
|
115
|
+
h6,
|
116
|
+
.h6 {
|
117
|
+
margin-top: 10px;
|
118
|
+
margin-bottom: 10px;
|
119
|
+
}
|
120
|
+
|
121
|
+
h4 small,
|
122
|
+
.h4 small,
|
123
|
+
h5 small,
|
124
|
+
.h5 small,
|
125
|
+
h6 small,
|
126
|
+
.h6 small,
|
127
|
+
h4 .small,
|
128
|
+
.h4 .small,
|
129
|
+
h5 .small,
|
130
|
+
.h5 .small,
|
131
|
+
h6 .small,
|
132
|
+
.h6 .small {
|
133
|
+
font-size: 75%;
|
134
|
+
}
|
135
|
+
h1,
|
136
|
+
.h1 { font-size: 36px; }
|
137
|
+
|
138
|
+
h2,
|
139
|
+
.h2 { font-size: 30px; }
|
140
|
+
|
141
|
+
h3,
|
142
|
+
.h3 { font-size: 24px; }
|
143
|
+
|
144
|
+
h4,
|
145
|
+
.h4 { font-size: 18px; font-weight: 800; }
|
146
|
+
|
147
|
+
h5,
|
148
|
+
.h5 { font-size: 14px; font-weight: 800; }
|
149
|
+
|
150
|
+
h6,
|
151
|
+
.h6 {
|
152
|
+
font-size: 12px;
|
153
|
+
}
|
154
|
+
|
155
|
+
p {
|
156
|
+
margin: 0 0 10px;
|
157
|
+
}
|
158
|
+
|
159
|
+
.border-bottom {
|
160
|
+
border-bottom: 1px solid $neutral2;
|
161
|
+
padding-bottom: 10px;
|
162
|
+
margin-bottom: 20px;
|
163
|
+
}
|
164
|
+
|
165
|
+
.lead {
|
166
|
+
margin-bottom: 20px;
|
167
|
+
font-size: 16px;
|
168
|
+
font-weight: 200;
|
169
|
+
line-height: 1.4;
|
170
|
+
}
|
171
|
+
|
172
|
+
@media (min-width: 70px) {
|
173
|
+
.lead {
|
174
|
+
font-size: 21px;
|
175
|
+
}
|
176
|
+
}
|
177
|
+
small, .small { font-size: 85%; }
|
178
|
+
|
179
|
+
cite { font-style: normal; }
|
180
|
+
|
181
|
+
.text-left { text-align: left; }
|
182
|
+
|
183
|
+
.text-right { text-align: right; }
|
184
|
+
|
185
|
+
.text-center { text-align: center; }
|
186
|
+
|
187
|
+
.text-justify { text-align: justify; }
|
188
|
+
|
189
|
+
.text-muted { color: $light-text; }
|
190
|
+
|
191
|
+
.text-primary { color: $text; }
|
192
|
+
a.text-primary:hover { color: darken($text, 4%); }
|
193
|
+
|
194
|
+
.text-success { color: $green; }
|
195
|
+
a.text-success:hover { color: darken($green, 4%); }
|
196
|
+
|
197
|
+
.text-warning { color: $orange; }
|
198
|
+
a.text-warning:hover { color: darken($orange, 4%); }
|
199
|
+
|
200
|
+
.text-danger { color: $red; }
|
201
|
+
a.text-danger:hover { color: darken($red, 4%); }
|
202
|
+
|
203
|
+
/*===========================================
|
204
|
+
List Styles
|
205
|
+
============================================*/
|
206
|
+
|
207
|
+
ul,
|
208
|
+
ol {
|
209
|
+
margin-top: 0;
|
210
|
+
margin-bottom: 10px;
|
211
|
+
}
|
212
|
+
ul ul,
|
213
|
+
ol ul,
|
214
|
+
ul ol,
|
215
|
+
ol ol {
|
216
|
+
margin-bottom: 0;
|
217
|
+
}
|
218
|
+
.list-unstyled {
|
219
|
+
padding-left: 0;
|
220
|
+
list-style: none;
|
221
|
+
}
|
222
|
+
.list-inline {
|
223
|
+
padding-left: 0;
|
224
|
+
list-style: none;
|
225
|
+
margin-left: -5px;
|
226
|
+
}
|
227
|
+
.list-inline > li {
|
228
|
+
display: inline-block;
|
229
|
+
padding-left: 5px;
|
230
|
+
padding-right: 5px;
|
231
|
+
}
|
232
|
+
dl {
|
233
|
+
margin-top: 0;
|
234
|
+
margin-bottom: 20px;
|
235
|
+
}
|
236
|
+
dt,
|
237
|
+
dd {
|
238
|
+
line-height: 1.42857143;
|
239
|
+
}
|
240
|
+
dt {
|
241
|
+
font-weight: bold;
|
242
|
+
}
|
243
|
+
dd {
|
244
|
+
margin-left: 0;
|
245
|
+
}
|
246
|
+
@media (min-width: 70px) {
|
247
|
+
.dl-horizontal dt {
|
248
|
+
float: left;
|
249
|
+
width: 160px;
|
250
|
+
clear: left;
|
251
|
+
text-align: right;
|
252
|
+
overflow: hidden;
|
253
|
+
text-overflow: ellipsis;
|
254
|
+
white-space: nowrap;
|
255
|
+
}
|
256
|
+
.dl-horizontal dd {
|
257
|
+
margin-left: 180px;
|
258
|
+
}
|
259
|
+
}
|
260
|
+
abbr[title],
|
261
|
+
abbr[data-original-title] {
|
262
|
+
cursor: help;
|
263
|
+
border-bottom: 1px dotted #999999;
|
264
|
+
}
|
265
|
+
.initialism {
|
266
|
+
font-size: 90%;
|
267
|
+
text-transform: uppercase;
|
268
|
+
}
|
269
|
+
|
270
|
+
/*===========================================
|
271
|
+
Code HTML Styles
|
272
|
+
============================================*/
|
273
|
+
|
274
|
+
code,
|
275
|
+
kbd,
|
276
|
+
pre,
|
277
|
+
samp {
|
278
|
+
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
|
279
|
+
}
|
280
|
+
code {
|
281
|
+
padding: 2px 4px;
|
282
|
+
font-size: 90%;
|
283
|
+
color: #c7254e;
|
284
|
+
background-color: #f9f2f4;
|
285
|
+
white-space: nowrap;
|
286
|
+
border-radius: 2px;
|
287
|
+
}
|
288
|
+
kbd {
|
289
|
+
padding: 2px 4px;
|
290
|
+
font-size: 90%;
|
291
|
+
color: #ffffff;
|
292
|
+
background-color: #333333;
|
293
|
+
border-radius: 2px;
|
294
|
+
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
|
295
|
+
}
|
296
|
+
pre {
|
297
|
+
display: block;
|
298
|
+
padding: 9.5px;
|
299
|
+
margin: 0 0 10px;
|
300
|
+
font-size: 13px;
|
301
|
+
line-height: 1.42857143;
|
302
|
+
word-break: break-all;
|
303
|
+
word-wrap: break-word;
|
304
|
+
color: #333333;
|
305
|
+
background-color: #f5f5f5;
|
306
|
+
border: 1px solid $neutral4;
|
307
|
+
border-radius: 2px;
|
308
|
+
}
|
309
|
+
pre code {
|
310
|
+
padding: 0;
|
311
|
+
font-size: inherit;
|
312
|
+
color: inherit;
|
313
|
+
white-space: pre-wrap;
|
314
|
+
background-color: transparent;
|
315
|
+
border-radius: 0;
|
316
|
+
}
|
317
|
+
.pre-scrollable {
|
318
|
+
max-height: 340px;
|
319
|
+
overflow-y: scroll;
|
320
|
+
}
|
321
|
+
|
322
|
+
/*===========================================
|
323
|
+
Blockquote Styles
|
324
|
+
============================================*/
|
325
|
+
|
326
|
+
blockquote {
|
327
|
+
padding: 10px 20px;
|
328
|
+
margin: 0 0 20px;
|
329
|
+
font-size: 17.5px;
|
330
|
+
border-left: 5px solid #eeeeee;
|
331
|
+
}
|
332
|
+
blockquote p:last-child,
|
333
|
+
blockquote ul:last-child,
|
334
|
+
blockquote ol:last-child {
|
335
|
+
margin-bottom: 0;
|
336
|
+
}
|
337
|
+
blockquote footer,
|
338
|
+
blockquote small,
|
339
|
+
blockquote .small {
|
340
|
+
display: block;
|
341
|
+
font-size: 80%;
|
342
|
+
line-height: 1.42857143;
|
343
|
+
color: #999999;
|
344
|
+
}
|
345
|
+
blockquote footer:before,
|
346
|
+
blockquote small:before,
|
347
|
+
blockquote .small:before {
|
348
|
+
content: '\2014 \00A0';
|
349
|
+
}
|
350
|
+
.blockquote-reverse,
|
351
|
+
blockquote.pull-right {
|
352
|
+
padding-right: 15px;
|
353
|
+
padding-left: 0;
|
354
|
+
border-right: 5px solid #eeeeee;
|
355
|
+
border-left: 0;
|
356
|
+
text-align: right;
|
357
|
+
}
|
358
|
+
.blockquote-reverse footer:before,
|
359
|
+
blockquote.pull-right footer:before,
|
360
|
+
.blockquote-reverse small:before,
|
361
|
+
blockquote.pull-right small:before,
|
362
|
+
.blockquote-reverse .small:before,
|
363
|
+
blockquote.pull-right .small:before {
|
364
|
+
content: '';
|
365
|
+
}
|
366
|
+
.blockquote-reverse footer:after,
|
367
|
+
blockquote.pull-right footer:after,
|
368
|
+
.blockquote-reverse small:after,
|
369
|
+
blockquote.pull-right small:after,
|
370
|
+
.blockquote-reverse .small:after,
|
371
|
+
blockquote.pull-right .small:after {
|
372
|
+
content: '\00A0 \2014';
|
373
|
+
}
|
374
|
+
blockquote:before,
|
375
|
+
blockquote:after {
|
376
|
+
content: "";
|
377
|
+
}
|
378
|
+
address {
|
379
|
+
margin-bottom: 20px;
|
380
|
+
font-style: normal;
|
381
|
+
line-height: 1.42857143;
|
382
|
+
}
|
data/lib/wcc/styles.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
module WCC
|
2
|
+
module Styles
|
3
|
+
PROJECT_ROOT = File.expand_path(File.join(__FILE__, "..", "..", ".."))
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
if defined?(Rails)
|
8
|
+
require 'coffee-rails'
|
9
|
+
require 'compass-rails'
|
10
|
+
require 'font-awesome-rails'
|
11
|
+
require 'rails-assets-selectize'
|
12
|
+
require 'rails-assets-dropzone'
|
13
|
+
require 'rails-assets-moment'
|
14
|
+
require 'rails-assets-datetimepicker'
|
15
|
+
require 'wcc/styles/engine'
|
16
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module WCC
|
2
|
+
module Styles
|
3
|
+
class Engine < Rails::Railtie
|
4
|
+
initializer 'wcc.styles.append_assets_path', group: :all do |app|
|
5
|
+
app.config.assets.paths.unshift(*[
|
6
|
+
asset_paths("lib/assets"),
|
7
|
+
asset_paths("vendor/assets"),
|
8
|
+
].flatten)
|
9
|
+
end
|
10
|
+
|
11
|
+
initializer 'wcc.styles.simple_form_watermark', group: :all do |app|
|
12
|
+
require 'wcc/styles/simple_form' if defined?(SimpleForm)
|
13
|
+
end
|
14
|
+
|
15
|
+
initializer 'wcc.styles.add_locales' do |app|
|
16
|
+
config.i18n.railties_load_path.concat(Dir[project_path("config/locales/*.yml")])
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def asset_paths(root)
|
22
|
+
%w(images javascripts stylesheets).collect do |type|
|
23
|
+
project_path(File.join(root, type))
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def project_path(relative_path)
|
28
|
+
File.join(WCC::Styles::PROJECT_ROOT, relative_path)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|