semantic-ui-sass 0.19.3.1 → 1.7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +5 -6
- data/app/assets/fonts/semantic-ui/icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/icons.otf +0 -0
- data/app/assets/fonts/semantic-ui/icons.svg +472 -367
- data/app/assets/fonts/semantic-ui/icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/images/semantic-ui/flags.png +0 -0
- data/app/assets/javascripts/semantic-ui.js +9 -5
- data/app/assets/javascripts/semantic-ui/accordion.js +169 -102
- data/app/assets/javascripts/semantic-ui/api.js +840 -0
- data/app/assets/javascripts/semantic-ui/checkbox.js +203 -46
- data/app/assets/javascripts/semantic-ui/{behavior/colorize.js → colorize.js} +4 -2
- data/app/assets/javascripts/semantic-ui/dimmer.js +110 -76
- data/app/assets/javascripts/semantic-ui/dropdown.js +897 -285
- data/app/assets/javascripts/semantic-ui/{behavior/form.js → form.js} +127 -42
- data/app/assets/javascripts/semantic-ui/modal.js +294 -219
- data/app/assets/javascripts/semantic-ui/nag.js +120 -186
- data/app/assets/javascripts/semantic-ui/popup.js +491 -223
- data/app/assets/javascripts/semantic-ui/progress.js +779 -0
- data/app/assets/javascripts/semantic-ui/rating.js +66 -22
- data/app/assets/javascripts/semantic-ui/search.js +219 -99
- data/app/assets/javascripts/semantic-ui/shape.js +72 -29
- data/app/assets/javascripts/semantic-ui/sidebar.js +678 -142
- data/app/assets/javascripts/semantic-ui/site.js +487 -0
- data/app/assets/javascripts/semantic-ui/{behavior/state.js → state.js} +116 -151
- data/app/assets/javascripts/semantic-ui/sticky.js +771 -0
- data/app/assets/javascripts/semantic-ui/tab.js +680 -603
- data/app/assets/javascripts/semantic-ui/transition.js +269 -158
- data/app/assets/javascripts/semantic-ui/video.js +113 -32
- data/app/assets/javascripts/semantic-ui/visibility.js +970 -0
- data/app/assets/javascripts/semantic-ui/visit.js +513 -0
- data/app/assets/stylesheets/semantic-ui.scss +2 -0
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +58 -14
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +464 -372
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +1385 -533
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +482 -655
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +238 -139
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +631 -280
- data/app/assets/stylesheets/semantic-ui/elements/_all.scss +3 -2
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +1614 -657
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +143 -80
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +1018 -0
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +302 -145
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +1653 -1365
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +160 -59
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +247 -118
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +501 -470
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +888 -0
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +189 -98
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +125 -0
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +147 -212
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +328 -190
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +261 -185
- data/app/assets/stylesheets/semantic-ui/globals/_all.scss +2 -0
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +430 -0
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +128 -0
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +190 -106
- data/app/assets/stylesheets/semantic-ui/modules/_all.scss +2 -1
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +303 -201
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +72 -63
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +711 -331
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +262 -140
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +82 -71
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +163 -119
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +435 -0
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +163 -68
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +223 -150
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +39 -40
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +413 -147
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +80 -0
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +49 -20
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +542 -568
- data/app/assets/stylesheets/semantic-ui/modules/_video.scss +69 -37
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +265 -0
- data/app/assets/stylesheets/semantic-ui/views/_all.scss +1 -1
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +758 -0
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +133 -92
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +200 -87
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +298 -523
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +390 -12
- data/lib/semantic/ui/sass/version.rb +2 -2
- data/tasks/converter.rb +99 -216
- metadata +22 -27
- data/app/assets/fonts/semantic-ui/basic.icons.eot +0 -0
- data/app/assets/fonts/semantic-ui/basic.icons.svg +0 -450
- data/app/assets/fonts/semantic-ui/basic.icons.ttf +0 -0
- data/app/assets/fonts/semantic-ui/basic.icons.woff +0 -0
- data/app/assets/images/semantic-ui/loader-large-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-large.gif +0 -0
- data/app/assets/images/semantic-ui/loader-medium-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-medium.gif +0 -0
- data/app/assets/images/semantic-ui/loader-mini-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-mini.gif +0 -0
- data/app/assets/images/semantic-ui/loader-small-inverted.gif +0 -0
- data/app/assets/images/semantic-ui/loader-small.gif +0 -0
- data/app/assets/javascripts/semantic-ui/behavior/api.js +0 -634
- data/app/assets/javascripts/semantic-ui/chatroom.js +0 -772
- data/app/assets/stylesheets/semantic-ui/depends/_basic.icon.scss +0 -4
- data/app/assets/stylesheets/semantic-ui/depends/_icon.scss +0 -4
- data/app/assets/stylesheets/semantic-ui/depends/_loader.scss +0 -8
- data/app/assets/stylesheets/semantic-ui/elements/_basic.icon.scss +0 -1124
- data/app/assets/stylesheets/semantic-ui/elements/_progress.scss +0 -280
- data/app/assets/stylesheets/semantic-ui/modules/_chatroom.scss +0 -299
- data/app/assets/stylesheets/semantic-ui/modules/_reveal.scss +0 -322
- data/app/assets/stylesheets/semantic-ui/views/_list.scss +0 -700
@@ -1,32 +1,410 @@
|
|
1
|
-
/*
|
2
|
-
* #
|
3
|
-
*
|
1
|
+
/*
|
2
|
+
* # Semantic UI
|
3
|
+
* https://github.com/Semantic-Org/Semantic-UI
|
4
|
+
* http://www.semantic-ui.com/
|
4
5
|
*
|
5
6
|
* Copyright 2014 Contributors
|
6
7
|
* Released under the MIT license
|
7
8
|
* http://opensource.org/licenses/MIT
|
8
9
|
*
|
9
|
-
* Released: Aug 20, 2014
|
10
10
|
*/
|
11
11
|
|
12
|
+
|
13
|
+
|
12
14
|
/*******************************
|
13
15
|
Statistic
|
14
16
|
*******************************/
|
15
17
|
|
18
|
+
|
19
|
+
/* Standalone */
|
16
20
|
.ui.statistic {
|
17
|
-
|
21
|
+
display: inline-block;
|
22
|
+
margin: 1em 0em;
|
23
|
+
max-width: 175px;
|
24
|
+
}
|
25
|
+
.ui.statistic + .ui.statistic {
|
26
|
+
margin: 0em 0em 0em 1em;
|
27
|
+
}
|
28
|
+
.ui.statistic:first-child {
|
29
|
+
margin-top: 0em;
|
30
|
+
}
|
31
|
+
.ui.statistic:last-child {
|
32
|
+
margin-bottom: 0em;
|
18
33
|
}
|
19
34
|
|
35
|
+
/* Grouped */
|
36
|
+
.ui.statistics > .statistic {
|
37
|
+
display: block;
|
38
|
+
float: left;
|
39
|
+
margin: 0em 1em 2em;
|
40
|
+
max-width: 175px;
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
/*******************************
|
45
|
+
Group
|
46
|
+
*******************************/
|
47
|
+
|
48
|
+
.ui.statistics {
|
49
|
+
display: block;
|
50
|
+
margin: 1em -1em;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* Clearing */
|
54
|
+
.ui.statistics:after {
|
55
|
+
display: block;
|
56
|
+
content: ' ';
|
57
|
+
height: 0px;
|
58
|
+
clear: both;
|
59
|
+
overflow: hidden;
|
60
|
+
visibility: hidden;
|
61
|
+
}
|
62
|
+
.ui.statistics:first-child {
|
63
|
+
margin-top: 0em;
|
64
|
+
}
|
65
|
+
.ui.statistics:last-child {
|
66
|
+
margin-bottom: 0em;
|
67
|
+
}
|
68
|
+
|
69
|
+
|
20
70
|
/*******************************
|
21
71
|
Content
|
22
72
|
*******************************/
|
23
73
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
74
|
+
|
75
|
+
/*--------------
|
76
|
+
Value
|
77
|
+
---------------*/
|
78
|
+
|
79
|
+
.ui.statistics .statistic > .value,
|
80
|
+
.ui.statistic > .value {
|
81
|
+
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
82
|
+
font-size: 4rem;
|
83
|
+
font-weight: normal;
|
84
|
+
line-height: 1em;
|
85
|
+
color: #1b1c1d;
|
86
|
+
text-transform: uppercase;
|
87
|
+
text-align: center;
|
88
|
+
}
|
89
|
+
|
90
|
+
/*--------------
|
91
|
+
Label
|
92
|
+
---------------*/
|
93
|
+
|
94
|
+
.ui.statistics .statistic > .label,
|
95
|
+
.ui.statistic > .label {
|
96
|
+
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
|
97
|
+
font-size: 1rem;
|
98
|
+
font-weight: normal;
|
99
|
+
color: rgba(0, 0, 0, 0.4);
|
100
|
+
text-transform: none;
|
101
|
+
text-align: center;
|
102
|
+
}
|
103
|
+
|
104
|
+
/* Top Label */
|
105
|
+
.ui.statistics .statistic > .label ~ .value,
|
106
|
+
.ui.statistic > .label ~ .value {
|
107
|
+
margin-top: 0rem;
|
108
|
+
}
|
109
|
+
|
110
|
+
/* Bottom Label */
|
111
|
+
.ui.statistics .statistic > .value ~ .label,
|
112
|
+
.ui.statistic > .value ~ .label {
|
113
|
+
margin-top: 0.25rem;
|
114
|
+
}
|
115
|
+
|
116
|
+
|
117
|
+
/*******************************
|
118
|
+
Types
|
119
|
+
*******************************/
|
120
|
+
|
121
|
+
|
122
|
+
/*--------------
|
123
|
+
Icon Value
|
124
|
+
---------------*/
|
125
|
+
|
126
|
+
.ui.statistics .statistic > .value .icon,
|
127
|
+
.ui.statistic > .value .icon {
|
128
|
+
opacity: 1;
|
129
|
+
width: auto;
|
130
|
+
margin: 0em;
|
131
|
+
}
|
132
|
+
|
133
|
+
/*--------------
|
134
|
+
Text Value
|
135
|
+
---------------*/
|
136
|
+
|
137
|
+
.ui.statistics .statistic > .text.value,
|
138
|
+
.ui.statistic > .text.value {
|
139
|
+
line-height: 1em;
|
140
|
+
min-height: 2em;
|
141
|
+
text-align: center;
|
142
|
+
}
|
143
|
+
.ui.statistics .statistic > .text.value + .label,
|
144
|
+
.ui.statistic > .text.value + .label {
|
145
|
+
text-align: center;
|
146
|
+
}
|
147
|
+
|
148
|
+
/*--------------
|
149
|
+
Image Value
|
150
|
+
---------------*/
|
151
|
+
|
152
|
+
.ui.statistics .statistic > .value img,
|
153
|
+
.ui.statistic > .value img {
|
154
|
+
max-height: 3rem;
|
155
|
+
vertical-align: baseline;
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
/*******************************
|
160
|
+
Variations
|
161
|
+
*******************************/
|
162
|
+
|
163
|
+
|
164
|
+
/*--------------
|
165
|
+
Horizontal
|
166
|
+
---------------*/
|
167
|
+
|
168
|
+
.ui.horizontal.statistics,
|
169
|
+
.ui.horizontal.statistic {
|
170
|
+
display: block;
|
171
|
+
margin: 0em;
|
172
|
+
max-width: 9999px;
|
173
|
+
}
|
174
|
+
.ui.horizontal.statistics .statistic {
|
175
|
+
float: none;
|
176
|
+
margin: 1em 0em;
|
177
|
+
max-width: 9999px;
|
178
|
+
}
|
179
|
+
.ui.horizontal.statistic > .text.value,
|
180
|
+
.ui.horizontal.statistics > .statistic > .text.value {
|
181
|
+
min-height: 0em !important;
|
182
|
+
}
|
183
|
+
.ui.horizontal.statistics .statistic > .value .icon,
|
184
|
+
.ui.horizontal.statistic > .value .icon {
|
185
|
+
width: 1.18em;
|
186
|
+
}
|
187
|
+
.ui.horizontal.statistics .statistic > .value,
|
188
|
+
.ui.horizontal.statistic > .value {
|
189
|
+
display: inline-block;
|
190
|
+
vertical-align: middle;
|
191
|
+
}
|
192
|
+
.ui.horizontal.statistics .statistic > .label,
|
193
|
+
.ui.horizontal.statistic > .label {
|
194
|
+
display: inline-block;
|
195
|
+
vertical-align: middle;
|
196
|
+
margin: 0em 0em 0em 0.75em;
|
197
|
+
}
|
198
|
+
|
199
|
+
/*--------------
|
200
|
+
Colors
|
201
|
+
---------------*/
|
202
|
+
|
203
|
+
.ui.blue.statistics .statistic > .value,
|
204
|
+
.ui.statistics .blue.statistic > .value,
|
205
|
+
.ui.blue.statistic > .value {
|
206
|
+
color: #3b83c0;
|
207
|
+
}
|
208
|
+
.ui.green.statistics .statistic > .value,
|
209
|
+
.ui.statistics .green.statistic > .value,
|
210
|
+
.ui.green.statistic > .value {
|
211
|
+
color: #5bbd72;
|
212
|
+
}
|
213
|
+
.ui.orange.statistics .statistic > .value,
|
214
|
+
.ui.statistics .orange.statistic > .value,
|
215
|
+
.ui.orange.statistic > .value {
|
216
|
+
color: #e07b53;
|
217
|
+
}
|
218
|
+
.ui.pink.statistics .statistic > .value,
|
219
|
+
.ui.statistics .pink.statistic > .value,
|
220
|
+
.ui.pink.statistic > .value {
|
221
|
+
color: #d9499a;
|
222
|
+
}
|
223
|
+
.ui.purple.statistics .statistic > .value,
|
224
|
+
.ui.statistics .purple.statistic > .value,
|
225
|
+
.ui.purple.statistic > .value {
|
226
|
+
color: #564f8a;
|
227
|
+
}
|
228
|
+
.ui.red.statistics .statistic > .value,
|
229
|
+
.ui.statistics .red.statistic > .value,
|
230
|
+
.ui.red.statistic > .value {
|
231
|
+
color: #d95c5c;
|
232
|
+
}
|
233
|
+
.ui.teal.statistics .statistic > .value,
|
234
|
+
.ui.statistics .teal.statistic > .value,
|
235
|
+
.ui.teal.statistic > .value {
|
236
|
+
color: #00b5ad;
|
237
|
+
}
|
238
|
+
.ui.yellow.statistics .statistic > .value,
|
239
|
+
.ui.statistics .yellow.statistic > .value,
|
240
|
+
.ui.yellow.statistic > .value {
|
241
|
+
color: #f2c61f;
|
242
|
+
}
|
243
|
+
|
244
|
+
/*--------------
|
245
|
+
Floated
|
246
|
+
---------------*/
|
247
|
+
|
248
|
+
.ui[class*="left floated"].statistic {
|
249
|
+
float: left;
|
250
|
+
margin: 0em 2em 1em 0em;
|
251
|
+
}
|
252
|
+
.ui[class*="right floated"].statistic {
|
253
|
+
float: right;
|
254
|
+
margin: 0em 0em 1em 2em;
|
255
|
+
}
|
256
|
+
.ui.floated.statistic:last-child {
|
257
|
+
margin-bottom: 0em;
|
258
|
+
}
|
259
|
+
|
260
|
+
/*--------------
|
261
|
+
Inverted
|
262
|
+
---------------*/
|
263
|
+
|
264
|
+
.ui.inverted.statistic .value {
|
265
|
+
color: #ffffff;
|
266
|
+
}
|
267
|
+
.ui.inverted.statistic .label {
|
268
|
+
color: rgba(255, 255, 255, 0.8);
|
269
|
+
}
|
270
|
+
.ui.inverted.blue.statistics .statistic > .value,
|
271
|
+
.ui.statistics .inverted.blue.statistic > .value,
|
272
|
+
.ui.inverted.blue.statistic > .value {
|
273
|
+
color: #54c8ff;
|
274
|
+
}
|
275
|
+
.ui.inverted.green.statistics .statistic > .value,
|
276
|
+
.ui.statistics .inverted.green.statistic > .value,
|
277
|
+
.ui.inverted.green.statistic > .value {
|
278
|
+
color: #2ecc40;
|
279
|
+
}
|
280
|
+
.ui.inverted.orange.statistics .statistic > .value,
|
281
|
+
.ui.statistics .inverted.orange.statistic > .value,
|
282
|
+
.ui.inverted.orange.statistic > .value {
|
283
|
+
color: #ff851b;
|
284
|
+
}
|
285
|
+
.ui.inverted.pink.statistics .statistic > .value,
|
286
|
+
.ui.statistics .inverted.pink.statistic > .value,
|
287
|
+
.ui.inverted.pink.statistic > .value {
|
288
|
+
color: #ff8edf;
|
289
|
+
}
|
290
|
+
.ui.inverted.purple.statistics .statistic > .value,
|
291
|
+
.ui.statistics .inverted.purple.statistic > .value,
|
292
|
+
.ui.inverted.purple.statistic > .value {
|
293
|
+
color: #cdc6ff;
|
294
|
+
}
|
295
|
+
.ui.inverted.red.statistics .statistic > .value,
|
296
|
+
.ui.statistics .inverted.red.statistic > .value,
|
297
|
+
.ui.inverted.red.statistic > .value {
|
298
|
+
color: #ff695e;
|
299
|
+
}
|
300
|
+
.ui.inverted.teal.statistics .statistic > .value,
|
301
|
+
.ui.statistics .inverted.teal.statistic > .value,
|
302
|
+
.ui.inverted.teal.statistic > .value {
|
303
|
+
color: #6dffff;
|
304
|
+
}
|
305
|
+
.ui.inverted.yellow.statistics .statistic > .value,
|
306
|
+
.ui.statistics .inverted.yellow.statistic > .value,
|
307
|
+
.ui.inverted.yellow.statistic > .value {
|
308
|
+
color: #ffe21f;
|
309
|
+
}
|
310
|
+
|
311
|
+
/*--------------
|
312
|
+
Sizes
|
313
|
+
---------------*/
|
314
|
+
|
315
|
+
|
316
|
+
/* Mini */
|
317
|
+
.ui.mini.statistics .statistic > .value,
|
318
|
+
.ui.mini.statistic > .value {
|
319
|
+
font-size: 1.5rem;
|
28
320
|
}
|
321
|
+
.ui.mini.horizontal.statistics .statistic > .value,
|
322
|
+
.ui.mini.horizontal.statistic > .value {
|
323
|
+
font-size: 1.5rem;
|
324
|
+
}
|
325
|
+
.ui.mini.statistics .statistic > .text.value,
|
326
|
+
.ui.mini.statistic > .text.value {
|
327
|
+
font-size: 1rem;
|
328
|
+
}
|
329
|
+
|
330
|
+
/* Tiny */
|
331
|
+
.ui.tiny.statistics .statistic > .value,
|
332
|
+
.ui.tiny.statistic > .value {
|
333
|
+
font-size: 2rem;
|
334
|
+
}
|
335
|
+
.ui.tiny.horizontal.statistics .statistic > .value,
|
336
|
+
.ui.tiny.horizontal.statistic > .value {
|
337
|
+
font-size: 2rem;
|
338
|
+
}
|
339
|
+
.ui.tiny.statistics .statistic > .text.value,
|
340
|
+
.ui.tiny.statistic > .text.value {
|
341
|
+
font-size: 1rem;
|
342
|
+
}
|
343
|
+
|
344
|
+
/* Small */
|
345
|
+
.ui.small.statistics .statistic > .value,
|
346
|
+
.ui.small.statistic > .value {
|
347
|
+
font-size: 3rem;
|
348
|
+
}
|
349
|
+
.ui.small.horizontal.statistics .statistic > .value,
|
350
|
+
.ui.small.horizontal.statistic > .value {
|
351
|
+
font-size: 2rem;
|
352
|
+
}
|
353
|
+
.ui.small.statistics .statistic > .text.value,
|
354
|
+
.ui.small.statistic > .text.value {
|
355
|
+
font-size: 1.5rem;
|
356
|
+
}
|
357
|
+
|
358
|
+
/* Medium */
|
359
|
+
.ui.statistics .statistic > .value,
|
360
|
+
.ui.statistic > .value {
|
361
|
+
font-size: 4rem;
|
362
|
+
}
|
363
|
+
.ui.horizontal.statistics .statistic > .value,
|
364
|
+
.ui.horizontal.statistic > .value {
|
365
|
+
font-size: 3rem;
|
366
|
+
}
|
367
|
+
.ui.statistics .statistic > .text.value,
|
368
|
+
.ui.statistic > .text.value {
|
369
|
+
font-size: 2rem;
|
370
|
+
}
|
371
|
+
|
372
|
+
/* Large */
|
373
|
+
.ui.large.statistics .statistic > .value,
|
374
|
+
.ui.large.statistic > .value {
|
375
|
+
font-size: 5rem;
|
376
|
+
}
|
377
|
+
.ui.large.horizontal.statistics .statistic > .value,
|
378
|
+
.ui.large.horizontal.statistic > .value {
|
379
|
+
font-size: 4rem;
|
380
|
+
}
|
381
|
+
.ui.large.statistics .statistic > .text.value,
|
382
|
+
.ui.large.statistic > .text.value {
|
383
|
+
font-size: 2.5rem;
|
384
|
+
}
|
385
|
+
|
386
|
+
/* Huge */
|
387
|
+
.ui.huge.statistics .statistic > .value,
|
388
|
+
.ui.huge.statistic > .value {
|
389
|
+
font-size: 6rem;
|
390
|
+
}
|
391
|
+
.ui.huge.horizontal.statistics .statistic > .value,
|
392
|
+
.ui.huge.horizontal.statistic > .value {
|
393
|
+
font-size: 5rem;
|
394
|
+
}
|
395
|
+
.ui.huge.statistics .statistic > .text.value,
|
396
|
+
.ui.huge.statistic > .text.value {
|
397
|
+
font-size: 2.5rem;
|
398
|
+
}
|
399
|
+
|
400
|
+
|
401
|
+
/*******************************
|
402
|
+
Theme Overrides
|
403
|
+
*******************************/
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
/*******************************
|
408
|
+
User Variable Overrides
|
409
|
+
*******************************/
|
29
410
|
|
30
|
-
.ui.statistic > .description {
|
31
|
-
opacity: 0.8;
|
32
|
-
}
|
data/tasks/converter.rb
CHANGED
@@ -6,218 +6,126 @@ require 'json'
|
|
6
6
|
require 'fileutils'
|
7
7
|
require "pry"
|
8
8
|
require "dotenv"
|
9
|
-
|
9
|
+
|
10
|
+
require 'pathname'
|
10
11
|
|
11
12
|
Dotenv.load
|
12
13
|
|
13
14
|
class Converter
|
14
15
|
|
15
16
|
GIT_DATA = 'https://api.github.com/repos'
|
16
|
-
GIT_RAW = 'https://raw.
|
17
|
+
GIT_RAW = 'https://raw.githubusercontent.com'
|
17
18
|
TOKEN = ENV['TOKEN']
|
18
|
-
|
19
|
-
|
20
|
-
# DEPENDS = {
|
21
|
-
# icon: %Q{
|
22
|
-
# //= depend_on_asset "semantic-ui/icons.eot"
|
23
|
-
# //= depend_on_asset "semantic-ui/icons.svg"
|
24
|
-
# //= depend_on_asset "semantic-ui/icons.woff"
|
25
|
-
# //= depend_on_asset "semantic-ui/icons.ttf"
|
26
|
-
# },
|
27
|
-
# basic_icon: %Q{
|
28
|
-
# //= depend_on_asset "semantic-ui/basic.icons.eot"
|
29
|
-
# //= depend_on_asset "semantic-ui/basic.icons.svg"
|
30
|
-
# //= depend_on_asset "semantic-ui/basic.icons.woff"
|
31
|
-
# //= depend_on_asset "semantic-ui/basic.icons.ttf"
|
32
|
-
# },
|
33
|
-
# loader: %Q{
|
34
|
-
# //= depend_on_asset "semantic-ui/loader-large.gif"
|
35
|
-
# //= depend_on_asset "semantic-ui/loader-mini.gif"
|
36
|
-
# //= depend_on_asset "semantic-ui/loader-small.gif"
|
37
|
-
# //= depend_on_asset "semantic-ui/loader-medium.gif"
|
38
|
-
# //= depend_on_asset "semantic-ui/loader-mini-inverted.gif"
|
39
|
-
# //= depend_on_asset "semantic-ui/loader-small-inverted.gif"
|
40
|
-
# //= depend_on_asset "semantic-ui/loader-medium-inverted.gif"
|
41
|
-
# //= depend_on_asset "semantic-ui/loader-large-inverted.gif"
|
42
|
-
# }
|
43
|
-
# }
|
19
|
+
|
44
20
|
|
45
21
|
def initialize(branch)
|
46
22
|
@repo = 'Semantic-Org/Semantic-UI'
|
47
23
|
@repo_url = "https://github.com/#@repo"
|
48
24
|
@branch = branch || 'master'
|
49
25
|
@git_data_trees = "#{GIT_DATA}/#{@repo}/git/trees"
|
50
|
-
@git_raw_src = "#{GIT_RAW}/#{@repo}/#{@branch}/
|
26
|
+
@git_raw_src = "#{GIT_RAW}/#{@repo}/#{@branch}/dist"
|
51
27
|
@branch_sha = get_tree_sha
|
52
|
-
@less_paths = ['collections', 'elements', 'views', 'modules']
|
53
|
-
@js_paths = ['modules', 'behavior']
|
54
|
-
@fonts_images_paths = ['fonts', 'images']
|
55
|
-
@save_at = { js: 'app/assets/javascripts/semantic-ui',
|
56
|
-
scss: 'app/assets/stylesheets/semantic-ui',
|
57
|
-
images: 'app/assets/images/semantic-ui',
|
58
|
-
fonts: 'app/assets/fonts/semantic-ui'
|
59
|
-
}
|
60
28
|
end
|
61
29
|
|
62
30
|
def process
|
63
|
-
#
|
31
|
+
# process_stylesheets_assets
|
32
|
+
|
33
|
+
# process_images_and_fonts_assets
|
34
|
+
# store_version
|
35
|
+
|
36
|
+
checkout_repository
|
37
|
+
choose_version(@branch)
|
64
38
|
process_stylesheets_assets
|
65
39
|
process_javascript_assets
|
66
|
-
process_images_and_fonts_assets
|
67
40
|
store_version
|
68
41
|
end
|
69
42
|
|
70
|
-
def
|
71
|
-
|
72
|
-
semantic_ui_less_paths.each do |path, sha|
|
73
|
-
content = ''
|
74
|
-
semantic_ui_less_files(sha).each do |name|
|
75
|
-
file_name = name.gsub('.less', '')
|
76
|
-
file = open_git_file("#{@git_raw_src}/#{path}/#{name}")
|
77
|
-
file = convert(file)
|
78
|
-
begin
|
79
|
-
file = AutoprefixerRails.compile(file, BROWSERS)
|
80
|
-
rescue
|
81
|
-
puts "======== #{file_name} autoprefixer fail ========="
|
82
|
-
end
|
83
|
-
save_file(name, file, path)
|
84
|
-
content += "@import '#{file_name}';\n"
|
85
|
-
end
|
86
|
-
save_file('all', content, path)
|
87
|
-
main_content += "@import 'semantic-ui/#{path}/all';\n";
|
88
|
-
end
|
89
|
-
File.open("app/assets/stylesheets/semantic-ui.scss", "w+") { |file| file.write(main_content) }
|
43
|
+
def paths
|
44
|
+
@gem_paths ||= Paths.new
|
90
45
|
end
|
91
46
|
|
92
|
-
def
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
if path == 'modules'
|
98
|
-
file = open_git_file("#{@git_raw_src}/#{path}/#{name}")
|
99
|
-
save_file(name, file, nil, 'js')
|
100
|
-
content += "//= require semantic-ui/#{file_name}\n"
|
101
|
-
else
|
102
|
-
file = open_git_file("#{@git_raw_src}/modules/behavior/#{name}")
|
103
|
-
save_file(name, file, 'behavior', 'js')
|
104
|
-
content += "//= require semantic-ui/behavior/#{file_name}\n"
|
105
|
-
end
|
106
|
-
end
|
47
|
+
def checkout_repository
|
48
|
+
if Dir.exist?(paths.tmp_semantic_ui)
|
49
|
+
system %Q{cd '#{paths.tmp_semantic_ui}' && git fetch --quiet}
|
50
|
+
else
|
51
|
+
system %Q{git clone --quiet git@github.com:Semantic-Org/Semantic-UI.git '#{paths.tmp_semantic_ui}'}
|
107
52
|
end
|
108
|
-
File.open("app/assets/javascripts/semantic-ui.js", "w+") { |file| file.write(content) }
|
109
53
|
end
|
110
54
|
|
111
|
-
def
|
112
|
-
|
113
|
-
semantic_ui_fonts_images_files(sha).each do |name|
|
114
|
-
file_name = name.gsub('.less', '')
|
115
|
-
file = open_git_file("#{@git_raw_src}/#{path}/#{name}")
|
116
|
-
save_file(name, file, nil, path)
|
117
|
-
end
|
118
|
-
end
|
55
|
+
def choose_version(version)
|
56
|
+
system %Q{cd '#{paths.tmp_semantic_ui}' && git checkout --quiet #{version}}
|
119
57
|
end
|
120
58
|
|
59
|
+
def process_stylesheets_assets
|
60
|
+
# content = ""
|
61
|
+
Dir[File.join(paths.tmp_semantic_ui_definitions, '*')].each do |path|
|
62
|
+
# all = ""
|
121
63
|
|
122
|
-
|
64
|
+
Dir[File.join(path, "*.less")].each do |file|
|
123
65
|
|
124
|
-
|
125
|
-
def get_tree_sha
|
126
|
-
sha = nil
|
127
|
-
trees = get_json("#{@git_data_trees}/#{@branch}")
|
128
|
-
trees['tree'].find{|t| t['path'] == 'src'}['sha']
|
129
|
-
end
|
66
|
+
filename = File.basename(file).gsub(".less", '.css')
|
130
67
|
|
131
|
-
|
132
|
-
|
133
|
-
paths['tree'].select{|f| f['type'] == 'tree' && @less_paths.include?(f['path']) }.map{|f| [f['path'], f['sha']] }
|
134
|
-
end
|
68
|
+
Dir[File.join(paths.tmp_semantic_ui_components, "*.css")].each do |src|
|
69
|
+
name = File.basename(src)
|
135
70
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
71
|
+
if name == filename
|
72
|
+
file = open(src).read
|
73
|
+
file = convert(file)
|
74
|
+
save_file(name, file, File.basename(path))
|
140
75
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
end
|
76
|
+
# all << "@import '#{name.gsub(".css", "")}';\n"
|
77
|
+
end #filename
|
78
|
+
end
|
79
|
+
end
|
80
|
+
# save_file("all", all, File.basename(path)) if all != ''
|
81
|
+
# content << "@import 'semantic-ui/#{File.basename(path)}/all';\n";
|
148
82
|
|
149
|
-
|
150
|
-
|
151
|
-
files['tree'].select{|f| f['type'] == 'blob' && f['path'] =~ /\.js$/ }.map{|f| f['path'] }
|
83
|
+
end
|
84
|
+
# File.open("app/assets/stylesheets/semantic-ui.scss", "w+") { |file| file.write(content) }
|
152
85
|
end
|
153
86
|
|
154
|
-
|
155
|
-
|
156
|
-
|
87
|
+
|
88
|
+
def process_javascript_assets
|
89
|
+
# js = ""
|
90
|
+
Dir[File.join(paths.tmp_semantic_ui_definitions, '**/*.js')].each do |src|
|
91
|
+
name = File.basename(src).gsub(".js", '')
|
92
|
+
# js << "//= require #{name}\n"
|
93
|
+
FileUtils.cp(src, paths.javascripts)
|
94
|
+
end
|
95
|
+
# File.open("app/assets/javascripts/semantic-ui.js", "w+") { |file| file.write(js) }
|
157
96
|
end
|
158
97
|
|
159
|
-
|
160
|
-
|
161
|
-
|
98
|
+
|
99
|
+
private
|
100
|
+
|
101
|
+
# Get the sha of less branch
|
102
|
+
def get_tree_sha
|
103
|
+
sha = nil
|
104
|
+
trees = get_json("#{@git_data_trees}/#{@branch}")
|
105
|
+
trees['tree'].find{|t| t['path'] == 'dist'}['sha']
|
162
106
|
end
|
163
107
|
|
164
108
|
|
165
109
|
def convert(file)
|
166
|
-
file = replace_interpolation(file)
|
167
|
-
file = replace_vars(file)
|
168
|
-
file = replace_fonts(file)
|
169
|
-
# file = replace_font_family(file)
|
170
110
|
file = replace_fonts_url(file)
|
171
|
-
file = replace_grads(file)
|
172
|
-
file = replace_mixins(file)
|
173
|
-
file = replace_less_extend(file)
|
174
|
-
file = replace_includes(file)
|
175
|
-
file = replace_spin(file)
|
176
|
-
file = replace_opacity(file)
|
177
111
|
file = replace_image_urls(file)
|
178
112
|
file = replace_image_paths(file)
|
179
|
-
file = replace_escaping(file)
|
180
113
|
|
181
114
|
file
|
182
115
|
end
|
183
116
|
|
184
|
-
def open_git_file(file)
|
185
|
-
open(file).read
|
186
|
-
end
|
187
117
|
|
188
118
|
def save_file(name, content, path, type='stylesheets')
|
189
|
-
case type
|
190
|
-
when 'stylesheets'
|
191
|
-
name = name.gsub(/\.less/, '')
|
192
|
-
file = "#{@save_at[:scss]}/#{path}/_#{name}.scss"
|
193
|
-
# Check depent asset
|
194
|
-
|
195
|
-
if name == "icon"
|
196
|
-
content = "@import '../depends/icon';\n" + content
|
197
|
-
end
|
198
|
-
|
199
|
-
if name == "basic.icon"
|
200
|
-
content = "@import '../depends/basic.icon';\n" + content
|
201
|
-
end
|
202
|
-
|
203
|
-
content = check_depend_asset(content)
|
204
119
|
|
205
|
-
|
206
|
-
|
207
|
-
end
|
120
|
+
name = name.gsub(/\.css/, '')
|
121
|
+
file = "#{paths.stylesheets}/#{path}/_#{name}.scss"
|
208
122
|
dir = File.dirname(file)
|
209
123
|
FileUtils.mkdir_p(dir) unless File.directory?(file)
|
210
124
|
File.open(file, 'w+') { |f| f.write(content) }
|
211
|
-
puts "Saved #{name} at #{path}\n"
|
125
|
+
# puts "Saved #{name} at #{path}\n"
|
212
126
|
end
|
213
127
|
|
214
|
-
|
215
|
-
if content.scan(/loader-\w+.gif/).length > 0
|
216
|
-
"@import '../depends/loader';\n" + content
|
217
|
-
else
|
218
|
-
content
|
219
|
-
end
|
220
|
-
end
|
128
|
+
|
221
129
|
|
222
130
|
def get_json(url)
|
223
131
|
url += "?access_token=#{TOKEN}" unless TOKEN.nil?
|
@@ -225,85 +133,60 @@ private
|
|
225
133
|
data = JSON.parse data
|
226
134
|
end
|
227
135
|
|
136
|
+
def open_git_file(file)
|
137
|
+
open(file).read
|
138
|
+
end
|
139
|
+
|
228
140
|
def store_version
|
229
141
|
path = 'lib/semantic/ui/sass/version.rb'
|
230
142
|
content = File.read(path).sub(/SEMANTIC_UI_SHA\s*=\s*['"][\w]+['"]/, "SEMANTIC_UI_SHA = '#@branch_sha'")
|
231
143
|
File.open(path, 'w') { |f| f.write(content) }
|
232
144
|
end
|
233
145
|
|
234
|
-
def replace_interpolation(less)
|
235
|
-
less.gsub(/@{([^}]+)}/, '#{$\1}')
|
236
|
-
end
|
237
|
-
|
238
|
-
def replace_vars(less)
|
239
|
-
less = less.dup
|
240
|
-
# skip header comment
|
241
|
-
less =~ %r(\A/\*(.*?)\*/)m
|
242
|
-
from = $~ ? $~.to_s.length : 0
|
243
|
-
less[from..-1] = less[from..-1].
|
244
|
-
gsub(/(?!@mixin|@media|@page|@keyframes|@font-face|@-\w)@/, '$').
|
245
|
-
# variables that would be ignored by gsub above: e.g. @page-header-border-color
|
246
|
-
gsub(/@(page[\w-]+)/, '$\1')
|
247
|
-
less
|
248
|
-
end
|
249
|
-
|
250
|
-
def fix_progress_bar(less)
|
251
|
-
less = less.gsub(/(\$)(-webkit-keyframes progress-bar-stripes)/, '@\2')
|
252
|
-
less = less.gsub(/(\$)(-moz-keyframes)/, '@\2')
|
253
|
-
less = less.gsub(/(\$)(keyframes progress-bar-stripes)/, '@\2')
|
254
|
-
end
|
255
|
-
|
256
|
-
def replace_fonts(less)
|
257
|
-
less.gsub(/#font \> \.([\w-]+)/, '@include ctb-font-\1')
|
258
|
-
end
|
259
|
-
|
260
146
|
def replace_fonts_url(less)
|
261
|
-
less.gsub(/url\(\.\.\/fonts\/?(.*?)\)/) {|s| "url(\"semantic-ui/#{$1}\")" }
|
262
|
-
end
|
263
|
-
|
264
|
-
def replace_font_family(less)
|
265
|
-
less.gsub(/#font \> #family \> \.([\w-]+)/, '@include ctb-font-family-\1')
|
147
|
+
less.gsub(/url\(\"\.\.\/themes\/default\/assets\/fonts\/?(.*?)\"\)/) {|s| "font-url(\"semantic-ui/#{$1}\")" }
|
266
148
|
end
|
267
149
|
|
268
|
-
def
|
269
|
-
less.gsub(
|
270
|
-
end
|
271
|
-
|
272
|
-
def replace_mixins(less)
|
273
|
-
less.gsub(/^\.([\w-]*)(\(.*\))([\s\{]+)$/, '@mixin \1\2\3')
|
150
|
+
def replace_image_urls(less)
|
151
|
+
less.gsub(/url\("?(.*?).png"?\)/) {|s| "image-url(\"#{$1}.png\")" }
|
274
152
|
end
|
275
153
|
|
276
|
-
def
|
277
|
-
less.gsub(
|
154
|
+
def replace_image_paths(less)
|
155
|
+
less.gsub('../themes/default/assets/images/', 'semantic-ui/')
|
278
156
|
end
|
279
157
|
|
280
|
-
|
281
|
-
less.gsub(/\#(\w+) \> \.([\w-]*)(\(.*\));?/, '@include ctb-\1-\2\3;')
|
282
|
-
end
|
158
|
+
end
|
283
159
|
|
284
|
-
|
285
|
-
|
286
|
-
|
160
|
+
class Paths
|
161
|
+
attr_reader :root
|
162
|
+
attr_reader :tmp
|
163
|
+
attr_reader :tmp_semantic_ui
|
164
|
+
attr_reader :tmp_semantic_ui_src
|
165
|
+
attr_reader :tmp_semantic_ui_definitions
|
166
|
+
attr_reader :tmp_semantic_ui_dist
|
167
|
+
attr_reader :tmp_semantic_ui_components
|
287
168
|
|
288
|
-
|
289
|
-
|
290
|
-
|
169
|
+
attr_reader :fonts
|
170
|
+
attr_reader :images
|
171
|
+
attr_reader :javascripts
|
172
|
+
attr_reader :stylesheets
|
291
173
|
|
292
|
-
def replace_image_urls(less)
|
293
|
-
less.gsub(/url\("?(.*?).gif"?\)/) {|s| "image-url(\"#{$1}.gif\")" }
|
294
|
-
end
|
295
174
|
|
296
|
-
|
297
|
-
|
298
|
-
end
|
175
|
+
def initialize
|
176
|
+
@root = File.expand_path('..', __dir__)
|
299
177
|
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
178
|
+
@tmp = File.join(@root, 'tmp')
|
179
|
+
@tmp_semantic_ui = File.join(@tmp, 'semantic-ui')
|
180
|
+
@tmp_semantic_ui_src = File.join(@tmp_semantic_ui, 'src')
|
181
|
+
@tmp_semantic_ui_definitions = File.join(@tmp_semantic_ui_src, 'definitions')
|
304
182
|
|
305
|
-
|
306
|
-
|
307
|
-
end
|
183
|
+
@tmp_semantic_ui_dist = File.join(@tmp_semantic_ui, 'dist')
|
184
|
+
@tmp_semantic_ui_components = File.join(@tmp_semantic_ui_dist, 'components')
|
308
185
|
|
309
|
-
|
186
|
+
@app = File.join(@root, 'app')
|
187
|
+
@fonts = File.join(@app, 'assets', 'fonts', 'semantic-ui')
|
188
|
+
@images = File.join(@app, 'assets', 'images', 'semantic-ui')
|
189
|
+
@javascripts = File.join(@app, 'assets', 'javascripts', 'semantic-ui')
|
190
|
+
@stylesheets = File.join(@app, 'assets', 'stylesheets', 'semantic-ui')
|
191
|
+
end
|
192
|
+
end
|