groundworkcss 2.2.1 → 2.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/javascripts/groundworkcss/components/forms.coffee +7 -17
- data/app/assets/stylesheets/groundworkcss/_settings-rails3.scss +13 -8
- data/app/assets/stylesheets/groundworkcss/_settings-rails4.scss +18 -13
- data/app/assets/stylesheets/groundworkcss/_settings.scss +1 -1
- data/app/assets/stylesheets/groundworkcss/core/_mixins-core.scss +1 -1
- data/app/assets/stylesheets/groundworkcss/responsive/_desktop.scss +8 -0
- data/app/assets/stylesheets/groundworkcss/responsive/_helpers-responsive.scss +5 -1
- data/app/assets/stylesheets/groundworkcss/responsive/_ipad.scss +7 -2
- data/app/assets/stylesheets/groundworkcss/responsive/_mobile.scss +8 -6
- data/app/assets/stylesheets/groundworkcss/responsive/_small-tablet.scss +7 -2
- data/app/assets/stylesheets/groundworkcss/type/_typography.scss +3 -2
- data/app/assets/stylesheets/groundworkcss/ui/_forms.scss +22 -1
- data/lib/groundworkcss/generators/docs_generator.rb +19 -18
- data/lib/groundworkcss/version.rb +1 -1
- metadata +3 -10
- data/groundworkcss-0.4.3.gem +0 -0
- data/groundworkcss-0.4.4.gem +0 -0
- data/groundworkcss-2.0.0.gem +0 -0
- data/groundworkcss-2.0.1.gem +0 -0
- data/groundworkcss-2.0.2.gem +0 -0
- data/groundworkcss-2.0.4.gem +0 -0
- data/groundworkcss-2.0.7.gem +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
$ ->
|
2
2
|
|
3
3
|
$body = $ 'body'
|
4
|
-
$
|
4
|
+
$targets = [
|
5
5
|
'.error input'
|
6
6
|
'.error textarea'
|
7
7
|
'.invalid input'
|
@@ -10,20 +10,10 @@ $ ->
|
|
10
10
|
'textarea.error'
|
11
11
|
'input.invalid'
|
12
12
|
'textarea.invalid'
|
13
|
-
|
14
|
-
|
13
|
+
'input[aria-invalid="true"]'
|
14
|
+
'textarea[aria-invalid="true"]'
|
15
|
+
].join(',')
|
16
|
+
$body.on 'click', $targets, ->
|
17
|
+
$(@).focus()
|
18
|
+
$(@).select()
|
15
19
|
|
16
|
-
$('.select select').each ->
|
17
|
-
setSelectState(@)
|
18
|
-
|
19
|
-
$body.on 'change', '.select select', ->
|
20
|
-
setSelectState(@)
|
21
|
-
|
22
|
-
setSelectState = (el) ->
|
23
|
-
$el = $(el)
|
24
|
-
firstOptionVal = $el.children('option').first().val()
|
25
|
-
firstOptionSelected = $el.children('option').first().attr('selected')
|
26
|
-
if firstOptionVal == '' and firstOptionSelected
|
27
|
-
$el.addClass('unselected')
|
28
|
-
else
|
29
|
-
$el.removeClass('unselected')
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// =============================================
|
2
2
|
// Custom Settings
|
3
|
-
// Last Updated:2013-
|
3
|
+
// Last Updated:2013-10-3
|
4
4
|
// =============================================
|
5
5
|
|
6
6
|
|
@@ -15,6 +15,7 @@ $fonts_path: 'groundworkcss/';
|
|
15
15
|
$boxsizing_path: asset-path("groundworkcss/libs/boxsizing.htc", javascript);
|
16
16
|
$PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
17
17
|
|
18
|
+
// $oldIE: false; // enable polyfills for legacy IE
|
18
19
|
|
19
20
|
// =============================================
|
20
21
|
// Web Fonts
|
@@ -43,8 +44,8 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
43
44
|
// Color Palette
|
44
45
|
// =============================================
|
45
46
|
|
46
|
-
// $white:
|
47
|
-
// $black:
|
47
|
+
// $white: #ffffff;
|
48
|
+
// $black: #111111;
|
48
49
|
|
49
50
|
// document
|
50
51
|
// $background-color: #ffffff;
|
@@ -196,7 +197,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
196
197
|
// =============================================
|
197
198
|
|
198
199
|
// flexible box layout
|
199
|
-
// $flexbox-classes: true; enable output of flexbox classes
|
200
|
+
// $flexbox-classes: true; // enable output of flexbox classes
|
200
201
|
// $flexbox-helpers: "flex-wrapper" "flex-box" "vertical-center";
|
201
202
|
|
202
203
|
|
@@ -247,7 +248,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
247
248
|
// $type-tags: true;
|
248
249
|
// $type-elements: "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
249
250
|
// "ul" "ol" "dl"
|
250
|
-
// "q" "
|
251
|
+
// "q" "blockquote" "cite"
|
251
252
|
// "small" "big"
|
252
253
|
// "b" "strong"
|
253
254
|
// "em"
|
@@ -258,7 +259,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
258
259
|
// $type-classes: false;
|
259
260
|
// $type-classnames: "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
260
261
|
// "ul" "ol" "dl"
|
261
|
-
// "q" "
|
262
|
+
// "q" "blockquote" "cite"
|
262
263
|
// "small" "big" "large"
|
263
264
|
// "b" "bold" "strong"
|
264
265
|
// "em" "italic"
|
@@ -267,12 +268,16 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
267
268
|
// "code" "pre"
|
268
269
|
// "invalid" "valid"
|
269
270
|
// "unstyled";
|
271
|
+
// $quote-color: $font-color;
|
272
|
+
// $quote-background: $border-color;
|
273
|
+
// $quote-font: "source-sans-pro";
|
270
274
|
// $styled-lists: true;
|
271
275
|
// $multi-column-classes: true;
|
272
276
|
// $multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column";
|
273
277
|
// $ui-states: "info" "alert" "warning" "error" "success" "question";
|
274
278
|
// $ui-icons: "\f05a" "\f06a" "\f071" "\f057" "\f058" "\f059";
|
275
279
|
// $ui-states-colors: $info-color $alert-color $warning-color $error-color $success-color $question-color;
|
280
|
+
// $ui-states-color-classes: true;
|
276
281
|
// $font-family: Helvetica, Arial, Geneva, sans-serif;
|
277
282
|
// $font-size: 14px;
|
278
283
|
// $line-height: 1.5;
|
@@ -313,7 +318,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
313
318
|
// "center";
|
314
319
|
// $typography-classes: true;
|
315
320
|
// $typography-helpers: "align-top" "align-right" "align-bottom" "align-left" "align-center" "justify"
|
316
|
-
// "truncate";
|
321
|
+
// "truncate" "unstyled";
|
317
322
|
// $border-classes: true;
|
318
323
|
// $border-helpers: "bordered" "border-right" "border-left" "border-top" "border-bottom";
|
319
324
|
// $radius-classes: true;
|
@@ -334,7 +339,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);
|
|
334
339
|
// "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
335
340
|
// "ol" "ul" "li" "dl" "dt" "dd"
|
336
341
|
// "em" "small" "big" "strong" "b" "u" "i" "sub" "sup" "del" "strike"
|
337
|
-
// "q" "
|
342
|
+
// "q" "blockquote" "cite"
|
338
343
|
// "time" "address"
|
339
344
|
// "code" "pre"
|
340
345
|
// "a" "img" "center" "hr"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// =============================================
|
2
2
|
// Custom Settings
|
3
|
-
// Last Updated:2013-
|
3
|
+
// Last Updated:2013-10-3
|
4
4
|
// =============================================
|
5
5
|
|
6
6
|
|
@@ -9,12 +9,13 @@
|
|
9
9
|
// =============================================
|
10
10
|
|
11
11
|
// file paths
|
12
|
-
$root_path: "./";
|
13
|
-
$images_path: asset-path("images/");
|
14
|
-
$fonts_path: "groundworkcss/";
|
15
|
-
$boxsizing_path: asset-path("groundworkcss/libs/boxsizing.htc");
|
16
|
-
$PIE_path: asset-path("groundworkcss/libs/PIE.htc");
|
12
|
+
$root_path: "./";
|
13
|
+
$images_path: asset-path("images/");
|
14
|
+
$fonts_path: "groundworkcss/";
|
15
|
+
$boxsizing_path: asset-path("groundworkcss/libs/boxsizing.htc");
|
16
|
+
$PIE_path: asset-path("groundworkcss/libs/PIE.htc");
|
17
17
|
|
18
|
+
// $oldIE: false; // enable polyfills for legacy IE
|
18
19
|
|
19
20
|
// =============================================
|
20
21
|
// Web Fonts
|
@@ -43,8 +44,8 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
43
44
|
// Color Palette
|
44
45
|
// =============================================
|
45
46
|
|
46
|
-
// $white:
|
47
|
-
// $black:
|
47
|
+
// $white: #ffffff;
|
48
|
+
// $black: #111111;
|
48
49
|
|
49
50
|
// document
|
50
51
|
// $background-color: #ffffff;
|
@@ -196,7 +197,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
196
197
|
// =============================================
|
197
198
|
|
198
199
|
// flexible box layout
|
199
|
-
// $flexbox-classes: true; enable output of flexbox classes
|
200
|
+
// $flexbox-classes: true; // enable output of flexbox classes
|
200
201
|
// $flexbox-helpers: "flex-wrapper" "flex-box" "vertical-center";
|
201
202
|
|
202
203
|
|
@@ -247,7 +248,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
247
248
|
// $type-tags: true;
|
248
249
|
// $type-elements: "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
249
250
|
// "ul" "ol" "dl"
|
250
|
-
// "q" "
|
251
|
+
// "q" "blockquote" "cite"
|
251
252
|
// "small" "big"
|
252
253
|
// "b" "strong"
|
253
254
|
// "em"
|
@@ -258,7 +259,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
258
259
|
// $type-classes: false;
|
259
260
|
// $type-classnames: "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
260
261
|
// "ul" "ol" "dl"
|
261
|
-
// "q" "
|
262
|
+
// "q" "blockquote" "cite"
|
262
263
|
// "small" "big" "large"
|
263
264
|
// "b" "bold" "strong"
|
264
265
|
// "em" "italic"
|
@@ -267,12 +268,16 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
267
268
|
// "code" "pre"
|
268
269
|
// "invalid" "valid"
|
269
270
|
// "unstyled";
|
271
|
+
// $quote-color: $font-color;
|
272
|
+
// $quote-background: $border-color;
|
273
|
+
// $quote-font: "source-sans-pro";
|
270
274
|
// $styled-lists: true;
|
271
275
|
// $multi-column-classes: true;
|
272
276
|
// $multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column";
|
273
277
|
// $ui-states: "info" "alert" "warning" "error" "success" "question";
|
274
278
|
// $ui-icons: "\f05a" "\f06a" "\f071" "\f057" "\f058" "\f059";
|
275
279
|
// $ui-states-colors: $info-color $alert-color $warning-color $error-color $success-color $question-color;
|
280
|
+
// $ui-states-color-classes: true;
|
276
281
|
// $font-family: Helvetica, Arial, Geneva, sans-serif;
|
277
282
|
// $font-size: 14px;
|
278
283
|
// $line-height: 1.5;
|
@@ -313,7 +318,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
313
318
|
// "center";
|
314
319
|
// $typography-classes: true;
|
315
320
|
// $typography-helpers: "align-top" "align-right" "align-bottom" "align-left" "align-center" "justify"
|
316
|
-
// "truncate";
|
321
|
+
// "truncate" "unstyled";
|
317
322
|
// $border-classes: true;
|
318
323
|
// $border-helpers: "bordered" "border-right" "border-left" "border-top" "border-bottom";
|
319
324
|
// $radius-classes: true;
|
@@ -334,7 +339,7 @@ $PIE_path: asset-path("groundworkcss/libs/PIE.htc"); // path to IE C
|
|
334
339
|
// "h1" "h2" "h3" "h4" "h5" "h6" "p"
|
335
340
|
// "ol" "ul" "li" "dl" "dt" "dd"
|
336
341
|
// "em" "small" "big" "strong" "b" "u" "i" "sub" "sup" "del" "strike"
|
337
|
-
// "q" "
|
342
|
+
// "q" "blockquote" "cite"
|
338
343
|
// "time" "address"
|
339
344
|
// "code" "pre"
|
340
345
|
// "a" "img" "center" "hr"
|
@@ -13,7 +13,7 @@ $oldIE: false !default;
|
|
13
13
|
|
14
14
|
@mixin helper_reset($properties: padding margin, $spacers: padded pad-top pad-right pad-bottom pad-left gapped gap-top gap-right gap-bottom gap-left) {
|
15
15
|
@for $i from 1 through length($spacers) {
|
16
|
-
&.#{nth($spacers, $i)},
|
16
|
+
&.#{nth($spacers, $i)}, &.half-#{nth($spacers, $i)}, &.double-#{nth($spacers, $i)}, &.triple-#{nth($spacers, $i)} {
|
17
17
|
@for $i from 1 through length($properties) {
|
18
18
|
#{nth($properties, $i)}: 0 !important;
|
19
19
|
}
|
@@ -7,13 +7,21 @@ $responsive: true !default;
|
|
7
7
|
$navigation-classes: true !default;
|
8
8
|
$multi-column-classes: true !default;
|
9
9
|
$multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column" !default;
|
10
|
+
$inline-conditional-helpers: false !default;
|
10
11
|
|
11
12
|
|
12
13
|
@mixin desktop {
|
13
14
|
@if $responsive {
|
14
15
|
@media #{$desktop} {
|
15
16
|
// conditional helpers
|
17
|
+
.desktop-only { display: block !important; }
|
18
|
+
.ipad-only { display: none !important; }
|
19
|
+
.small-tablet-only { display: none !important; }
|
20
|
+
.mobile-only { display: none !important; }
|
16
21
|
.hide-on-desktop { display: none !important; }
|
22
|
+
@if $inline-conditional-helpers {
|
23
|
+
span.desktop-only { display: inline !important; }
|
24
|
+
}
|
17
25
|
// spacer overrides
|
18
26
|
.zero-desktop { @include helper_reset(); }
|
19
27
|
.no-padding-desktop, .no-pad-desktop { @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left); }
|
@@ -4,12 +4,16 @@
|
|
4
4
|
// =============================================
|
5
5
|
|
6
6
|
$responsive: true !default;
|
7
|
+
$inline-conditional-helpers: false !default;
|
7
8
|
|
8
9
|
|
9
10
|
@if $responsive {
|
10
11
|
// desktop helpers
|
11
12
|
.desktop-only { display: block; }
|
12
|
-
|
13
|
+
@if $inline-conditional-helpers {
|
14
|
+
span.desktop-only { display: inline; }
|
15
|
+
}
|
16
|
+
.hide-on-desktop { display: none; }
|
13
17
|
// ipad helpers
|
14
18
|
.ipad-only { display: none !important; }
|
15
19
|
.hide-on-ipad {}
|
@@ -7,16 +7,21 @@ $responsive: true !default;
|
|
7
7
|
$navigation-classes: true !default;
|
8
8
|
$multi-column-classes: true !default;
|
9
9
|
$multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column" !default;
|
10
|
+
$inline-conditional-helpers: false !default;
|
10
11
|
|
11
12
|
|
12
13
|
@mixin ipad {
|
13
14
|
@if $responsive {
|
14
15
|
@media #{$ipad} {
|
15
16
|
// conditional helpers
|
17
|
+
.desktop-only { display: none !important; }
|
16
18
|
.ipad-only { display: block !important; }
|
17
|
-
|
19
|
+
.small-tablet-only { display: none !important; }
|
20
|
+
.mobile-only { display: none !important; }
|
18
21
|
.hide-on-ipad { display: none !important; }
|
19
|
-
|
22
|
+
@if $inline-conditional-helpers {
|
23
|
+
span.ipad-only { display: inline !important; }
|
24
|
+
}
|
20
25
|
// spacer overrides
|
21
26
|
.zero-ipad { @include helper_reset(); }
|
22
27
|
.no-padding-ipad, .no-pad-ipad { @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left); }
|
@@ -7,6 +7,7 @@ $responsive: true !default;
|
|
7
7
|
$navigation-classes: true !default;
|
8
8
|
$multi-column-classes: true !default;
|
9
9
|
$multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column" !default;
|
10
|
+
$inline-conditional-helpers: false !default;
|
10
11
|
|
11
12
|
|
12
13
|
@mixin mobile {
|
@@ -15,14 +16,15 @@ $multi-column-names: "one-column" "two-column" "three-column" "four-colum
|
|
15
16
|
// responsive grid
|
16
17
|
@include grid-responsive(false);
|
17
18
|
// conditional helpers
|
18
|
-
.
|
19
|
-
|
20
|
-
.hide-on-small-tablet { display: block !important; }
|
21
|
-
span.hide-on-small-tablet { display: inline !important; }
|
19
|
+
.desktop-only { display: none !important; }
|
20
|
+
.ipad-only { display: none !important; }
|
22
21
|
.small-tablet-only { display: none !important; }
|
23
|
-
|
22
|
+
.mobile-only { display: block !important; }
|
24
23
|
.hide-on-mobile { display: none !important; }
|
25
|
-
.
|
24
|
+
.hide-on-small-tablet { display: block !important; }
|
25
|
+
@if $inline-conditional-helpers {
|
26
|
+
span.mobile-only { display: inline !important; }
|
27
|
+
}
|
26
28
|
// spacer overrides
|
27
29
|
.zero-mobile { @include helper_reset(); }
|
28
30
|
.no-padding-mobile, .no-pad-mobile { @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left); }
|
@@ -7,6 +7,7 @@ $responsive: true !default;
|
|
7
7
|
$navigation-classes: true !default;
|
8
8
|
$multi-column-classes: true !default;
|
9
9
|
$multi-column-names: "one-column" "two-column" "three-column" "four-column" "five-column" !default;
|
10
|
+
$inline-conditional-helpers: false !default;
|
10
11
|
|
11
12
|
|
12
13
|
@mixin small-tablet {
|
@@ -15,10 +16,14 @@ $multi-column-names: "one-column" "two-column" "three-column" "four-colum
|
|
15
16
|
// responsive grid
|
16
17
|
@include grid-responsive();
|
17
18
|
// conditional helpers
|
19
|
+
.desktop-only { display: none !important; }
|
20
|
+
.ipad-only { display: none !important; }
|
18
21
|
.small-tablet-only { display: block !important; }
|
19
|
-
|
22
|
+
.mobile-only { display: none !important; }
|
20
23
|
.hide-on-small-tablet { display: none !important; }
|
21
|
-
|
24
|
+
@if $inline-conditional-helpers {
|
25
|
+
span.small-tablet-only { display: inline !important; }
|
26
|
+
}
|
22
27
|
// spacer overrides
|
23
28
|
.zero-small-tablet { @include helper_reset(); }
|
24
29
|
.no-padding-small-tablet, .no-pad-small-tablet { @include helper_reset(padding, $spacers: padded pad-top pad-right pad-bottom pad-left); }
|
@@ -44,6 +44,7 @@ $question-color: #9855b4 !default;
|
|
44
44
|
$ui-states: "info" "alert" "warning" "error" "success" "question" !default;
|
45
45
|
$ui-icons: "\f05a" "\f06a" "\f071" "\f057" "\f058" "\f059" !default;
|
46
46
|
$ui-states-colors: $info-color $alert-color $warning-color $error-color $success-color $question-color !default;
|
47
|
+
$ui-states-backgrounds: $info-background $alert-background $warning-background $error-background $success-background $question-background !default;
|
47
48
|
$ui-states-color-classes: true !default;
|
48
49
|
$font-size: 14px !default;
|
49
50
|
$line-height: 1.5 !default;
|
@@ -560,8 +561,8 @@ $placeholderText-fallback: true !default;
|
|
560
561
|
@extend %#{nth($ui-states, $i)};
|
561
562
|
}
|
562
563
|
.#{nth($ui-states, $i)}-bg {
|
563
|
-
background: nth($ui-states-
|
564
|
-
color: $
|
564
|
+
background: nth($ui-states-backgrounds, $i);
|
565
|
+
color: nth($ui-states-colors, $i);
|
565
566
|
}
|
566
567
|
}
|
567
568
|
}
|
@@ -28,6 +28,8 @@ $question-color: #9855b4 !default;
|
|
28
28
|
$question-text: #ffffff !default;
|
29
29
|
$question-background: #f0e6f4 !default;
|
30
30
|
$question-border: #f1dbfa !default;
|
31
|
+
// shared defaults
|
32
|
+
$aria-selectors: true !default;
|
31
33
|
|
32
34
|
|
33
35
|
%fieldset {
|
@@ -131,7 +133,6 @@ $question-border: #f1dbfa !default;
|
|
131
133
|
@include rounded(0 $default-radius $default-radius 0);
|
132
134
|
}
|
133
135
|
|
134
|
-
// prefix/suffix classes
|
135
136
|
.prefix {
|
136
137
|
@extend %prefix;
|
137
138
|
}
|
@@ -148,6 +149,16 @@ $question-border: #f1dbfa !default;
|
|
148
149
|
@extend %error-block-prefix;
|
149
150
|
}
|
150
151
|
}
|
152
|
+
input, select, textarea {
|
153
|
+
&.invalid, &.error {
|
154
|
+
@extend %error-block;
|
155
|
+
}
|
156
|
+
@if $aria-selectors {
|
157
|
+
&[aria-invalid="true"] {
|
158
|
+
@extend %error-block;
|
159
|
+
}
|
160
|
+
}
|
161
|
+
}
|
151
162
|
.success, .valid {
|
152
163
|
input, select, textarea {
|
153
164
|
@extend %success-block;
|
@@ -156,6 +167,16 @@ $question-border: #f1dbfa !default;
|
|
156
167
|
@extend %success-block-prefix;
|
157
168
|
}
|
158
169
|
}
|
170
|
+
input, select, textarea {
|
171
|
+
&.valid, &.success {
|
172
|
+
@extend %success-block;
|
173
|
+
}
|
174
|
+
@if $aria-selectors {
|
175
|
+
&[aria-invalid="false"] {
|
176
|
+
@extend %success-block;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
159
180
|
|
160
181
|
@if $form-tags {
|
161
182
|
@for $i from 1 through length($form-elements) {
|
@@ -22,28 +22,29 @@ module Groundworkcss
|
|
22
22
|
|
23
23
|
run generator_command
|
24
24
|
|
25
|
-
#routes_file = "config/routes.rb"
|
26
|
-
#insert_into_file routes_file, "\n if Rails.env.development?\n", :before => " get \"groundworkdocs/animations\"\n"
|
27
|
-
#insert_into_file routes_file, "\n end\n\n", :after => " get \"groundworkdocs/typography\"\n"
|
28
|
-
#content = ''
|
29
|
-
#File.open(routes_file, "r") do |file|
|
30
|
-
#file.each_line do |line|
|
31
|
-
#if line.include? "groundworkdocs/"
|
32
|
-
#content << ' ' + line.lstrip
|
33
|
-
#else
|
34
|
-
#content << line
|
35
|
-
#end
|
36
|
-
#end
|
37
|
-
#end
|
38
|
-
#File.open(routes_file, "w") do |file|
|
39
|
-
#file.write(content)
|
40
|
-
#end
|
41
|
-
|
42
25
|
insert_into_file "app/controllers/groundworkdocs_controller.rb", "layout 'groundworkdocs'\n\n", :after => "class GroundworkdocsController < ApplicationController\n"
|
43
26
|
|
27
|
+
if Rails::VERSION::MAJOR >= 4
|
28
|
+
rails_settings = [
|
29
|
+
'$root_path: "./";',
|
30
|
+
'$images_path: asset-path("images/");',
|
31
|
+
'$fonts_path: "groundworkcss/";',
|
32
|
+
'$boxsizing_path: asset-path("groundworkcss/libs/boxsizing.htc");',
|
33
|
+
'$PIE_path: asset-path("groundworkcss/libs/PIE.htc");'
|
34
|
+
].join("\n")
|
35
|
+
else
|
36
|
+
rails_settings = [
|
37
|
+
'$root_path: "/assets/";',
|
38
|
+
'$images_path: asset-path("", image);',
|
39
|
+
'$fonts_path: "groundworkcss/";',
|
40
|
+
'$boxsizing_path: asset-path("groundworkcss/libs/boxsizing.htc", javascript);',
|
41
|
+
'$PIE_path: asset-path("groundworkcss/libs/PIE.htc", javascript);'
|
42
|
+
].join("\n")
|
43
|
+
end
|
44
|
+
|
44
45
|
css_file = "app/assets/stylesheets/groundworkdocs.css.scss"
|
45
46
|
File.open(css_file, "w") do |file|
|
46
|
-
file.write("// GroundworkCSS 2 Documentation\n\n
|
47
|
+
file.write("// GroundworkCSS 2 Documentation\n\n#{rails_settings}\n@import 'groundworkcss/groundwork';\n@import 'groundworkcss/demo/jquery.snippet';\n@import 'groundworkcss/demo/groundworkdocs';\n")
|
47
48
|
end
|
48
49
|
|
49
50
|
js_file = "app/assets/javascripts/groundworkdocs.js.coffee"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groundworkcss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: colorize
|
@@ -323,14 +323,7 @@ files:
|
|
323
323
|
- app/views/groundworkdocs/tabs.html.erb
|
324
324
|
- app/views/groundworkdocs/typography.html.erb
|
325
325
|
- app/views/layouts/groundworkdocs.html.erb
|
326
|
-
- groundworkcss-
|
327
|
-
- groundworkcss-0.4.4.gem
|
328
|
-
- groundworkcss-2.0.0.gem
|
329
|
-
- groundworkcss-2.0.1.gem
|
330
|
-
- groundworkcss-2.0.2.gem
|
331
|
-
- groundworkcss-2.0.4.gem
|
332
|
-
- groundworkcss-2.0.7.gem
|
333
|
-
- groundworkcss-2.2.1.gem
|
326
|
+
- groundworkcss-2.3.1.gem
|
334
327
|
- groundworkcss.gemspec
|
335
328
|
- lib/groundworkcss.rb
|
336
329
|
- lib/groundworkcss/engine.rb
|
data/groundworkcss-0.4.3.gem
DELETED
Binary file
|
data/groundworkcss-0.4.4.gem
DELETED
Binary file
|
data/groundworkcss-2.0.0.gem
DELETED
Binary file
|
data/groundworkcss-2.0.1.gem
DELETED
Binary file
|
data/groundworkcss-2.0.2.gem
DELETED
Binary file
|
data/groundworkcss-2.0.4.gem
DELETED
Binary file
|
data/groundworkcss-2.0.7.gem
DELETED
Binary file
|