gumby2-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +29 -0
  5. data/Rakefile +1 -0
  6. data/gumby2-rails.gemspec +19 -0
  7. data/lib/gumby2-rails/version.rb +5 -0
  8. data/lib/gumby2-rails.rb +9 -0
  9. data/vendor/assets/.DS_Store +0 -0
  10. data/vendor/assets/fonts/icons/entypo.eot +0 -0
  11. data/vendor/assets/fonts/icons/entypo.ttf +0 -0
  12. data/vendor/assets/fonts/icons/entypo.woff +0 -0
  13. data/vendor/assets/js/libs/gumby.init.js +27 -0
  14. data/vendor/assets/js/libs/gumby.js +150 -0
  15. data/vendor/assets/js/libs/gumby.min.js +1 -0
  16. data/vendor/assets/js/libs/jquery-1.10.1.min.js +6 -0
  17. data/vendor/assets/js/libs/jquery-2.0.2.min.js +6 -0
  18. data/vendor/assets/js/libs/jquery.mobile.custom.min.js +3 -0
  19. data/vendor/assets/js/libs/modernizr-2.6.2.min.js +4 -0
  20. data/vendor/assets/js/libs/ui/gumby.checkbox.js +90 -0
  21. data/vendor/assets/js/libs/ui/gumby.fittext.js +107 -0
  22. data/vendor/assets/js/libs/ui/gumby.fixed.js +206 -0
  23. data/vendor/assets/js/libs/ui/gumby.navbar.js +115 -0
  24. data/vendor/assets/js/libs/ui/gumby.radiobtn.js +79 -0
  25. data/vendor/assets/js/libs/ui/gumby.retina.js +74 -0
  26. data/vendor/assets/js/libs/ui/gumby.skiplink.js +145 -0
  27. data/vendor/assets/js/libs/ui/gumby.tabs.js +71 -0
  28. data/vendor/assets/js/libs/ui/gumby.toggleswitch.js +203 -0
  29. data/vendor/assets/js/libs/ui/jquery.validation.js +138 -0
  30. data/vendor/assets/js/main.js +25 -0
  31. data/vendor/assets/js/plugins.js +8 -0
  32. data/vendor/assets/stylesheets/.DS_Store +0 -0
  33. data/vendor/assets/stylesheets/gumby.css +1876 -0
  34. data/vendor/assets/stylesheets/sass/_base.scss +71 -0
  35. data/vendor/assets/stylesheets/sass/_custom.scss +1 -0
  36. data/vendor/assets/stylesheets/sass/_fonts.scss +28 -0
  37. data/vendor/assets/stylesheets/sass/_grid.scss +273 -0
  38. data/vendor/assets/stylesheets/sass/_typography.scss +274 -0
  39. data/vendor/assets/stylesheets/sass/extensions/modular-scale/lib/modular-scale.rb +129 -0
  40. data/vendor/assets/stylesheets/sass/extensions/modular-scale/stylesheets/_modular-scale.scss +310 -0
  41. data/vendor/assets/stylesheets/sass/extensions/sassy-math/lib/sassy-math.rb +159 -0
  42. data/vendor/assets/stylesheets/sass/extensions/sassy-math/stylesheets/_math.scss +310 -0
  43. data/vendor/assets/stylesheets/sass/functions/_all.scss +15 -0
  44. data/vendor/assets/stylesheets/sass/functions/_breakpoints.scss +11 -0
  45. data/vendor/assets/stylesheets/sass/functions/_buttons.scss +44 -0
  46. data/vendor/assets/stylesheets/sass/functions/_clearfix.scss +25 -0
  47. data/vendor/assets/stylesheets/sass/functions/_forms.scss +18 -0
  48. data/vendor/assets/stylesheets/sass/functions/_grid-calc.scss +59 -0
  49. data/vendor/assets/stylesheets/sass/functions/_height-calc.scss +6 -0
  50. data/vendor/assets/stylesheets/sass/functions/_line-and-height.scss +7 -0
  51. data/vendor/assets/stylesheets/sass/functions/_responsivity.scss +34 -0
  52. data/vendor/assets/stylesheets/sass/functions/_semantic-grid.scss +187 -0
  53. data/vendor/assets/stylesheets/sass/functions/_strip-units.scss +5 -0
  54. data/vendor/assets/stylesheets/sass/functions/_typography.scss +15 -0
  55. data/vendor/assets/stylesheets/sass/functions/_visibility.scss +17 -0
  56. data/vendor/assets/stylesheets/sass/gumby.scss +37 -0
  57. data/vendor/assets/stylesheets/sass/ui/_all.scss +10 -0
  58. data/vendor/assets/stylesheets/sass/ui/_buttons.scss +151 -0
  59. data/vendor/assets/stylesheets/sass/ui/_forms.scss +379 -0
  60. data/vendor/assets/stylesheets/sass/ui/_icons.scss +37 -0
  61. data/vendor/assets/stylesheets/sass/ui/_images.scss +21 -0
  62. data/vendor/assets/stylesheets/sass/ui/_labels.scss +86 -0
  63. data/vendor/assets/stylesheets/sass/ui/_navbar.scss +417 -0
  64. data/vendor/assets/stylesheets/sass/ui/_tables.scss +87 -0
  65. data/vendor/assets/stylesheets/sass/ui/_tabs.scss +109 -0
  66. data/vendor/assets/stylesheets/sass/ui/_toggles.scss +69 -0
  67. data/vendor/assets/stylesheets/sass/ui/_video.scss +22 -0
  68. data/vendor/assets/stylesheets/sass/var/_lists.scss +20 -0
  69. data/vendor/assets/stylesheets/sass/var/_settings.scss +149 -0
  70. data/vendor/assets/stylesheets/sass/var/icons/_entypo-icon-list.scss +286 -0
  71. data/vendor/assets/stylesheets/sass/var/icons/_entypo.scss +294 -0
  72. metadata +116 -0
@@ -0,0 +1,379 @@
1
+ /* Form Styles */
2
+
3
+ @import "../functions/forms";
4
+
5
+
6
+ form {
7
+ margin: 0 0 18px;
8
+ label {
9
+ display: block;
10
+ @include font-size($norm);
11
+ @include adjust-leading-to(1);
12
+ cursor: pointer;
13
+ margin-bottom: 9px;
14
+ &.inline {
15
+ display: inline-block;
16
+ padding-right: 20px;
17
+ }
18
+ }
19
+ dt {
20
+ margin: 0;
21
+ }
22
+ textarea {
23
+ height: 150px;
24
+ }
25
+ ul, ul li {
26
+ margin-left: 0;
27
+ list-style-type: none;
28
+ }
29
+ fieldset {
30
+ @include rhythm-borders(1px,1,$norm,solid);
31
+ border-color: darken($default-color, 10%);
32
+ margin: 18px 0;
33
+ legend {
34
+ padding: 5px 10px;
35
+ }
36
+ }
37
+ }
38
+
39
+ .field {
40
+ position: relative;
41
+ max-width: 100%;
42
+ margin-bottom: 10px;
43
+ vertical-align: middle;
44
+ // Font-size 16px for weird form style error
45
+ font-size: 16px;
46
+ &.metro, .metro {
47
+ @include border-radius(0);
48
+ }
49
+ input, input[type="*"], textarea {
50
+ max-width: 100%;
51
+ width: 100%;
52
+ padding: 0;
53
+ margin: 0;
54
+ border: none;
55
+ outline: none;
56
+ resize: none;
57
+ -webkit-appearance: none;
58
+ font-family: $font-family;
59
+ font-weight: $font-weight-light;
60
+ @include font-size($norm);
61
+ @include box-shadow(none);
62
+ }
63
+ .radio, .checkbox {
64
+ position: relative;
65
+ }
66
+ .radio input[type="radio"], .checkbox input[type="checkbox"] {
67
+ display: none;
68
+ }
69
+ .input {
70
+ position: relative;
71
+ padding: 0 10px;
72
+ background: #fff;
73
+ border: 1px solid darken($default-color, 10%);
74
+ @include line-and-height(height-calc($norm));
75
+ @include font-size($norm);
76
+ @include border-radius(4px);
77
+ &.search {
78
+ @include line-and-height(height-calc($norm));
79
+ @include border-radius(1000px);
80
+ padding-right: 0;
81
+ }
82
+ }
83
+ .input.textarea {
84
+ height: auto;
85
+ }
86
+
87
+ @each $width in $field-sizes {
88
+ .#{nth($width, 1)} {
89
+ @include input-size(#{nth($width, 1)})
90
+ }
91
+ }
92
+
93
+ @include input-sizes-list() {
94
+ margin:0;
95
+ &:last-child {
96
+ margin-left: -4px;
97
+ }
98
+ &:first-child {
99
+ margin-right: 3.94%;
100
+ margin-left: 0;
101
+ }
102
+ &:first-child:last-child {
103
+ margin: 0;
104
+ }
105
+ }
106
+
107
+ label + {
108
+ @include input-sizes-list() {
109
+ &:last-child {
110
+ margin-left: 0;
111
+ }
112
+ }
113
+ }
114
+
115
+ @include respond(document-width) {
116
+
117
+ .xxwide:first-child, .xxwide:last-child {
118
+ margin-right: 0%;
119
+ }
120
+
121
+ }
122
+
123
+ /* remove inline-block white-space — A 0px font-size = 0px of white space */
124
+ &.prepend, &.append {
125
+ font-size: 0;
126
+ white-space: nowrap;
127
+ padding-bottom: 3.5px;
128
+ }
129
+
130
+ &.prepend input,
131
+ &.prepend .input,
132
+ &.append input,
133
+ &.append .input {
134
+ display: inline-block;
135
+ max-width: 100%;
136
+ }
137
+
138
+ &.prepend input,
139
+ &.prepend .input {
140
+ @include border-radius(0px 4px 4px 0);
141
+ }
142
+
143
+ &.append input,
144
+ &.append .input {
145
+ @include border-radius(4px 0 0 4px);
146
+ }
147
+
148
+ &.prepend.append input {
149
+ @include border-radius(0);
150
+ }
151
+
152
+ &.prepend.append input:first-child {
153
+ @include border-radius(4px 0 0 4px);
154
+ }
155
+
156
+ &.prepend.append input:last-child {
157
+ margin-left: -1px;
158
+ @include border-radius(0px 4px 4px 0);
159
+ }
160
+
161
+ &.prepend .adjoined, &.append .adjoined, &.prepend .btn, &.append .btn {
162
+ position: relative;
163
+ display: inline-block;
164
+ margin-bottom:0;
165
+ z-index: 99;
166
+ }
167
+ &.prepend .btn, &.append .btn {
168
+ a, input, button {
169
+ padding: 0 12px;
170
+ }
171
+ }
172
+
173
+ &.prepend .adjoined, &.append .adjoined {
174
+ padding: 0 10px 0 10px;
175
+ background: $default-color;
176
+ border: 1px solid darken($default-color, 10%);
177
+ font-family: $font-family;
178
+ font-weight: $font-weight-semibold;
179
+ color: $body-font-color;
180
+ @include font-size($norm);
181
+ @include line-and-height(height-calc($norm));
182
+ }
183
+
184
+ &.prepend *:first-child {
185
+ @include border-radius(4px 0 0 4px);
186
+ }
187
+
188
+ &.prepend input:first-child {
189
+ margin-right: 0;
190
+ }
191
+
192
+ &.prepend .adjoined, &.prepend .btn {
193
+ margin-right: -1px;
194
+ }
195
+
196
+ .adjoined:first-child {
197
+ margin-left: 0 !important;
198
+ }
199
+
200
+ &.append .adjoined, &.append .btn {
201
+ margin-left: -1px;
202
+ }
203
+
204
+ &.append *:last-child {
205
+ @include border-radius(0px 4px 4px 0);
206
+ }
207
+
208
+ &.append input:first-child {
209
+ margin-right: 0;
210
+ }
211
+
212
+ &.double input, &.double .input {
213
+ width: 50% !important;
214
+ &:last-child {
215
+ margin-left: -1px;
216
+ }
217
+ }
218
+
219
+ @each $error in danger $danger-color, warning $warning-color, success $success-color {
220
+ &.#{nth($error, 1)} {
221
+ &:after {
222
+ @if($icons != ""){
223
+ font-family: "#{$icons}";
224
+ @if nth($error, 1) == danger {
225
+ content: "#{$entypo-icon-cancel-circled}";
226
+ }
227
+ @if nth($error, 1) == warning {
228
+ content: "#{$entypo-icon-attention}";
229
+ }
230
+ @if nth($error, 1) == success {
231
+ content: "#{$entypo-icon-check}";
232
+ }
233
+ font-size: $norm;
234
+ position: absolute;
235
+ top: percentage((strip-units($base-font-size)) / 100) - 2;
236
+ right: 15px;
237
+ z-index: 999;
238
+ color: nth($error, 2);
239
+ }
240
+ }
241
+
242
+ &.no-icon:after {
243
+ display: none;
244
+ }
245
+
246
+ // <input> does not allow :before & :after
247
+ // pseudo elements. Removing validation
248
+ // icons from those elements to avoid
249
+ // edge-case styling issues
250
+ &.append:after, &.prepend:after {
251
+ content: "";
252
+ }
253
+ input, .input, textarea, .textarea, .radio span, .checkbox span, .picker {
254
+ border-color: nth($error, 2);
255
+ color: nth($error, 2);
256
+ background: lighten(nth($error, 2), 35%);
257
+ @include transition-duration(.2s);
258
+ }
259
+
260
+ textarea { color: nth($error, 2); }
261
+
262
+ input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {
263
+ color: nth($error, 2);
264
+ }
265
+ input:-moz-placeholder, textarea:-moz-placeholder {
266
+ color: nth($error, 2);
267
+ }
268
+ }
269
+ }
270
+
271
+ .picker {
272
+ @each $error in danger $danger-color, warning $warning-color, success $success-color {
273
+ &.#{nth($error, 1)} {
274
+ border-color: nth($error, 2);
275
+ color: nth($error, 2);
276
+ background: lighten(nth($error, 2), 35%);
277
+ @include transition-duration(.2s);
278
+ select, &:after { color: nth($error, 2); }
279
+ }
280
+ }
281
+ }
282
+
283
+ .radio, & .checkbox {
284
+ @each $error in danger $danger-color, warning $warning-color, success $success-color {
285
+ &.#{nth($error, 1)} {
286
+ color: nth($error, 2);
287
+ @if nth($error, 1) == success {
288
+ color: $body-font-color;
289
+ i { color: nth($error, 2); }
290
+ }
291
+ span {
292
+ border-color: nth($error, 2);
293
+ color: nth($error, 2);
294
+ background: lighten(nth($error, 2), 35%);
295
+ @include transition-duration(.2s);
296
+ }
297
+ }
298
+ }
299
+ }
300
+
301
+ .radio span, & .checkbox span {
302
+ display: inline-block;
303
+ width: 16px;
304
+ height: 16px;
305
+ position: relative;
306
+ top: 2px;
307
+ border: solid 1px #ccc;
308
+ background: #fefefe;
309
+ }
310
+ .radio span {
311
+ @include border-radius(8px);
312
+ }
313
+ .checkbox span {
314
+ @include border-radius(3px);
315
+ }
316
+ .radio.checked i, .checkbox.checked i {
317
+ position: absolute;
318
+ top: -1px;
319
+ left: -8px;
320
+ line-height: 16px;
321
+ }
322
+ }
323
+
324
+ .field .text input[type="search"] {
325
+ -webkit-appearance: textfield;
326
+ }
327
+
328
+
329
+ /* Form Picker Element (<select>) */
330
+
331
+ .picker {
332
+ position: relative;
333
+ width: auto;
334
+ display: inline-block;
335
+ margin: 0 0 2px 1.2%;
336
+ overflow: hidden;
337
+ border: 1px solid darken($default-color, 5%);
338
+ @include border-radius(4px);
339
+ font-family: $font-family;
340
+ font-weight: $font-weight-semibold;
341
+ height: auto;
342
+ @include background-image(linear-gradient(lighten($default-color, 20%), $default-color));
343
+ &:after {
344
+ content: "\25BE";
345
+ z-index: 0;
346
+ position:absolute;
347
+ right: 8%;
348
+ top: 50%;
349
+ margin-top: -12px;
350
+ color: $body-font-color;
351
+ }
352
+ &:first-child {
353
+ margin-left: 0;
354
+ }
355
+ select {
356
+ position: relative;
357
+ display: block;
358
+ min-width: 100%;
359
+ width: 135%;
360
+ height: 34px;
361
+ padding: 6px 45px 6px 15px;
362
+ color: $body-font-color;
363
+ border: none;
364
+ background: transparent;
365
+ outline: none;
366
+ -webkit-appearance: none;
367
+ z-index: 99;
368
+ cursor: pointer;
369
+ @include font-size($norm);
370
+ }
371
+ }
372
+
373
+ // IE9 fix - seems no other way around this :(
374
+ .ie9 {
375
+ .radio.checked i, .checkbox.checked i {
376
+ top: 0px;
377
+ }
378
+ }
379
+
@@ -0,0 +1,37 @@
1
+ /* Icons */
2
+
3
+ @import "../var/icons/entypo";
4
+
5
+ [class^="icon-"] a:before,
6
+ [class*=" icon-"] a:before,
7
+ [class^="icon-"] a:after,
8
+ [class*=" icon-"] a:after,
9
+ i[class^="icon-"],
10
+ i[class*=" icon-"] {
11
+ font-family: "#{$icons}";
12
+ position:absolute;
13
+ text-decoration:none;
14
+ zoom: 1;
15
+ }
16
+
17
+ i[class^="icon-"],
18
+ i[class*=" icon-"] {
19
+ display: inline-block;
20
+ position: static;
21
+ min-width: 20px;
22
+ margin: 0 5px;
23
+ text-align: center;
24
+ }
25
+
26
+ @each $icon in $entypo-icons {
27
+ .#{nth($icon, 1)} {
28
+ &.icon-left a:before, &.icon-right a:after {
29
+ content: "#{nth($icon, 2)}";
30
+ height: inherit;
31
+ }
32
+ }
33
+ i.#{nth($icon, 1)}:before {
34
+ content: "#{nth($icon, 2)}";
35
+ height: inherit;
36
+ }
37
+ }
@@ -0,0 +1,21 @@
1
+ .image {
2
+ line-height:0;
3
+ margin-bottom: 20px;
4
+ &.circle {
5
+ @include border-radius(50% !important);
6
+ overflow: hidden;
7
+ width: auto;
8
+ }
9
+ &.rounded {
10
+ overflow: hidden;
11
+ @include border-radius($button-radius $button-radius);
12
+ }
13
+ &.photo {
14
+ border: 5px solid #fff;
15
+ @include box-shadow(0 0 1px $body-font-color);
16
+ &.polaroid {
17
+ padding-bottom: 50px;
18
+ background: #fff;
19
+ }
20
+ }
21
+ }
@@ -0,0 +1,86 @@
1
+ /* Labels */
2
+
3
+ .badge, .label {
4
+ height: 20px;
5
+ display: inline-block;
6
+ font-family: Helvetica, arial, verdana, sans-serif;
7
+ font-weight: bold;
8
+ line-height: 20px;
9
+ text-align:center;
10
+ color: #fff;
11
+ a {
12
+ color: #fff;
13
+ }
14
+ @each $shade in $ui-coloring {
15
+ &.#{nth($shade, 1)} {
16
+ background: nth($shade, 2);
17
+ @if nth($shade, 1) == default {
18
+ color: darken(nth($shade, 2), 61.5%);
19
+ border: 1px solid nth($shade, 2);
20
+ &:hover {
21
+ border: 1px solid darken(nth($shade, 2), 5%);
22
+ }
23
+ a {
24
+ color: darken(nth($shade, 2), 61.5%);
25
+ }
26
+ }
27
+ @if nth($shade, 1) == warning {
28
+ color: darken(nth($shade, 2), 40%);
29
+ a {
30
+ color: darken(nth($shade, 2), 40%);
31
+ }
32
+ }
33
+ }
34
+ &.light {
35
+ background: #fff;
36
+ color: $body-font-color;
37
+ border: 1px solid $default-color;
38
+ a {
39
+ color: $body-link-color;
40
+ }
41
+ }
42
+ &.dark {
43
+ background: #212121;
44
+ }
45
+ }
46
+ }
47
+
48
+ .badge {
49
+ padding: 0 10px;
50
+ @include font-size(ms(0, 14px));
51
+ @include border-radius(10px);
52
+ }
53
+
54
+ .label {
55
+ padding: 0 10px;
56
+ @include font-size(ms(0, 12px));
57
+ @include border-radius(2px);
58
+ }
59
+
60
+ .alert {
61
+ padding: 0 10px;
62
+ font-family: $font-family;
63
+ font-weight: $font-weight-semibold;
64
+ list-style-type: none;
65
+ word-wrap: break-word;
66
+ margin-bottom: $norm / 2;
67
+ @include font-size(ms(0, 14px));
68
+ @include border-radius($button-radius);
69
+ @each $shade in $ui-coloring {
70
+ &.#{nth($shade, 1)} {
71
+ background: lighten(nth($shade, 2), 20%);
72
+ border: 1px solid nth($shade, 2);
73
+ color: darken(nth($shade, 2), 20%);
74
+ @if nth($shade, 1) == info {
75
+ color: $default-color;
76
+ }
77
+ @if nth($shade, 1) == default {
78
+ color: darken(nth($shade, 2), 61.5%);
79
+ border: 1px solid nth($shade, 2);
80
+ }
81
+ @if nth($shade, 1) == warning {
82
+ color: darken(nth($shade, 2), 40%);
83
+ }
84
+ }
85
+ }
86
+ }