livingstyleguide 2.0.0.alpha.10 → 2.0.0.alpha.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/livingstyleguide +5 -6
- data/lib/livingstyleguide.rb +18 -12
- data/lib/livingstyleguide/command_line_interface.rb +5 -6
- data/lib/livingstyleguide/commands.rb +39 -0
- data/lib/livingstyleguide/commands/add_wrapper_class.rb +4 -0
- data/lib/livingstyleguide/commands/coffee_script.rb +5 -0
- data/lib/livingstyleguide/{filters → commands}/colors.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/css.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/data.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/default.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/font_example.rb +2 -2
- data/lib/livingstyleguide/commands/full_width.rb +4 -0
- data/lib/livingstyleguide/commands/haml.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/import_and_use.rb +5 -5
- data/lib/livingstyleguide/{filters → commands}/javascript.rb +1 -1
- data/lib/livingstyleguide/{filters → commands}/layout.rb +4 -4
- data/lib/livingstyleguide/commands/markdown.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/options.rb +3 -3
- data/lib/livingstyleguide/commands/require.rb +4 -0
- data/lib/livingstyleguide/{filters → commands}/sass.rb +4 -2
- data/lib/livingstyleguide/commands/search_box.rb +10 -0
- data/lib/livingstyleguide/{filters → commands}/style.rb +1 -1
- data/lib/livingstyleguide/commands/syntax.rb +4 -0
- data/lib/livingstyleguide/commands/toggle_code.rb +4 -0
- data/lib/livingstyleguide/commands/type.rb +4 -0
- data/lib/livingstyleguide/document.rb +29 -26
- data/lib/livingstyleguide/integration.rb +4 -4
- data/lib/livingstyleguide/integration/compass.rb +2 -3
- data/lib/livingstyleguide/integration/rails.rb +3 -6
- data/lib/livingstyleguide/integration/sass.rb +1 -1
- data/lib/livingstyleguide/integration/sprockets.rb +2 -3
- data/lib/livingstyleguide/markdown_extensions.rb +9 -9
- data/lib/livingstyleguide/templates/code.html.erb +1 -1
- data/lib/livingstyleguide/templates/example.html.erb +1 -1
- data/lib/livingstyleguide/templates/javascript.html.erb +1 -1
- data/lib/livingstyleguide/templates/layout.html.erb +13 -1
- data/lib/livingstyleguide/templates/scripts/copy.js.erb +24 -0
- data/lib/livingstyleguide/templates/scripts/copy_code.js.erb +19 -0
- data/lib/livingstyleguide/templates/scripts/copy_colors.js.erb +36 -0
- data/lib/livingstyleguide/templates/scripts/search.js.erb +66 -0
- data/lib/livingstyleguide/templates/scripts/toggle_code.js.erb +53 -0
- data/lib/livingstyleguide/templates/search-box.html.erb +1 -68
- data/lib/livingstyleguide/templates/toggle-code.html.erb +1 -0
- data/lib/livingstyleguide/version.rb +1 -1
- data/stylesheets/_livingstyleguide.scss +6 -3
- data/stylesheets/livingstyleguide/_before.scss +10 -0
- data/stylesheets/livingstyleguide/_code.scss +4 -7
- data/stylesheets/livingstyleguide/_color-swatches.scss +15 -16
- data/stylesheets/livingstyleguide/_content.scss +5 -5
- data/stylesheets/livingstyleguide/_layout.scss +4 -3
- data/stylesheets/livingstyleguide/_reset.scss +2 -1
- data/stylesheets/livingstyleguide/_toggle-code.scss +21 -0
- data/stylesheets/livingstyleguide/_variables.scss +5 -1
- metadata +46 -29
- data/assets/javascripts/livingstyleguide.js +0 -75
- data/lib/livingstyleguide/engine.rb +0 -194
- data/lib/livingstyleguide/filters.rb +0 -38
- data/lib/livingstyleguide/filters/add_wrapper_class.rb +0 -4
- data/lib/livingstyleguide/filters/coffee_script.rb +0 -5
- data/lib/livingstyleguide/filters/full_width.rb +0 -4
- data/lib/livingstyleguide/filters/haml.rb +0 -4
- data/lib/livingstyleguide/filters/markdown.rb +0 -4
- data/lib/livingstyleguide/filters/require.rb +0 -4
- data/lib/livingstyleguide/filters/search_box.rb +0 -9
- data/lib/livingstyleguide/filters/syntax.rb +0 -4
- data/lib/livingstyleguide/filters/type.rb +0 -4
- data/lib/livingstyleguide/templates/code-example.html.erb +0 -21
- data/lib/livingstyleguide/templates/colors-example.html.erb +0 -38
- data/lib/livingstyleguide/templates/javascript-copy.html.erb +0 -26
- data/stylesheets/livingstyleguide/_search.scss +0 -8
@@ -11,10 +11,10 @@
|
|
11
11
|
display: inline;
|
12
12
|
font-family: $lsg--code-font;
|
13
13
|
font-size: $lsg--code-font-size;
|
14
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
14
15
|
font-weight: $lsg--code-font-weight;
|
15
16
|
overflow: scroll;
|
16
17
|
padding: 0 3px;
|
17
|
-
-webkit-font-smoothing: subpixel-antialiased;
|
18
18
|
|
19
19
|
kbd {
|
20
20
|
@extend %lsg--reset;
|
@@ -73,17 +73,14 @@
|
|
73
73
|
|
74
74
|
.lsg--code-block {
|
75
75
|
display: block;
|
76
|
-
min-height: $lsg--gap-width + $lsg--button-height;
|
77
76
|
line-height: $lsg--code-line-height;
|
78
|
-
padding: 3px $lsg--gap-width;
|
79
77
|
max-width: $lsg--width;
|
78
|
+
min-height: $lsg--gap-width + $lsg--button-height;
|
80
79
|
-ms-overflow-style: none;
|
81
|
-
|
82
|
-
.show-code & {
|
83
|
-
display: block;
|
84
|
-
}
|
80
|
+
padding: 3px $lsg--gap-width;
|
85
81
|
|
86
82
|
&::-webkit-scrollbar {
|
83
|
+
// scss-lint:disable ImportantRule
|
87
84
|
width: 0 !important;
|
88
85
|
}
|
89
86
|
}
|
@@ -27,16 +27,26 @@
|
|
27
27
|
}
|
28
28
|
|
29
29
|
&:hover:before {
|
30
|
-
color: black;
|
31
30
|
cursor: pointer;
|
31
|
+
color: black
|
32
32
|
}
|
33
|
-
|
34
33
|
&:after {
|
35
34
|
cursor: pointer;
|
36
35
|
display: block;
|
37
36
|
font-weight: normal;
|
38
37
|
text-align: center;
|
39
38
|
}
|
39
|
+
|
40
|
+
&.-lsg-empty {
|
41
|
+
overflow: hidden;
|
42
|
+
text-align: left;
|
43
|
+
text-indent: -119988px;
|
44
|
+
|
45
|
+
&:before,
|
46
|
+
&:after {
|
47
|
+
display: none;
|
48
|
+
}
|
49
|
+
}
|
40
50
|
}
|
41
51
|
|
42
52
|
.lsg--copy-color {
|
@@ -48,7 +58,7 @@
|
|
48
58
|
font-size: 0.8em;
|
49
59
|
left: 0;
|
50
60
|
line-height: 1.2em;
|
51
|
-
padding: 3px 0
|
61
|
+
padding: 3px 0;
|
52
62
|
position: absolute;
|
53
63
|
visibility: hidden;
|
54
64
|
white-space: pre-wrap;
|
@@ -62,10 +72,10 @@
|
|
62
72
|
|
63
73
|
.lsg--color-swatches {
|
64
74
|
@extend %lsg--reset;
|
65
|
-
margin: $lsg--gap-width auto (-$lsg--gap-width)
|
75
|
+
margin: $lsg--gap-width auto (-$lsg--gap-width);
|
76
|
+
max-width: $lsg--width + 2 * $lsg--gap-width;
|
66
77
|
overflow: hidden;
|
67
78
|
padding-left: $lsg--gap-width;
|
68
|
-
max-width: $lsg--width + 2 * $lsg--gap-width;
|
69
79
|
}
|
70
80
|
|
71
81
|
@for $i from 1 through 12 {
|
@@ -76,14 +86,3 @@
|
|
76
86
|
width: $size;
|
77
87
|
}
|
78
88
|
}
|
79
|
-
|
80
|
-
.lsg--color-swatch.-lsg-empty {
|
81
|
-
overflow: hidden;
|
82
|
-
text-align: left;
|
83
|
-
text-indent: -119988px;
|
84
|
-
|
85
|
-
&:before,
|
86
|
-
&:after {
|
87
|
-
display: none;
|
88
|
-
}
|
89
|
-
}
|
@@ -6,12 +6,12 @@
|
|
6
6
|
color: $lsg--color;
|
7
7
|
font-family: $lsg--base-font;
|
8
8
|
font-size: $lsg--base-font-size;
|
9
|
+
-webkit-font-smoothing: antialiased;
|
9
10
|
font-weight: $lsg--base-font-weight;
|
10
11
|
line-height: $lsg--base-line-height;
|
11
12
|
margin: $lsg--gap-width auto;
|
12
|
-
text-align: $lsg--base-text-align;
|
13
13
|
max-width: $lsg--width;
|
14
|
-
-
|
14
|
+
text-align: $lsg--base-text-align;
|
15
15
|
}
|
16
16
|
|
17
17
|
.lsg--unordered-list-item,
|
@@ -31,12 +31,12 @@
|
|
31
31
|
display: block;
|
32
32
|
font-family: $lsg--headline-font;
|
33
33
|
font-size: $lsg--headline-font-size;
|
34
|
+
-webkit-font-smoothing: antialiased;
|
34
35
|
font-weight: $lsg--headline-font-weight;
|
35
36
|
line-height: $lsg--headline-line-height;
|
36
37
|
margin: (3 * $lsg--gap-width) auto $lsg--gap-width;
|
37
|
-
text-align: $lsg--headline-text-align;
|
38
38
|
max-width: $lsg--width;
|
39
|
-
-
|
39
|
+
text-align: $lsg--headline-text-align;
|
40
40
|
}
|
41
41
|
|
42
42
|
.lsg--anchor {
|
@@ -86,10 +86,10 @@
|
|
86
86
|
border-top-right-radius: $lsg--border-radius;
|
87
87
|
display: block;
|
88
88
|
margin: $lsg--gap-width auto 0;
|
89
|
+
max-width: $lsg--width;
|
89
90
|
overflow: hidden;
|
90
91
|
padding: $lsg--gap-width;
|
91
92
|
position: relative;
|
92
|
-
max-width: $lsg--width;
|
93
93
|
|
94
94
|
&.-lsg-has-full-width {
|
95
95
|
@extend #{$lsg--layout-selector} !optional;
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
.lsg--logo {
|
21
21
|
@extend %lsg--reset;
|
22
|
-
background: url(
|
22
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZUAAADICAYAAAAgPHymAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAFX9JREFUeNrsnTF62zgaQJlsiu1Ge4LRnCBKldLyCWx320Uut5g4PoGtE8SePYClE9gptzLd7UwT5QSjdLvVKt12u0DyMwPDBAmKIAmS732fPlsSRRIg8D8AJMFnCQDk8vbtzzP151a9Tn755e8bcgSgnGdkAYBTKPfqNVGvnXodIhYApAJQVygZiAUAqQAEEQpiAUAqAEGFglgAkApAUKEgFgCkAhBUKIgFAKkABBUKYgFAKgBBhYJYAJAKQFChIBYApAIIJahQEAsAUgGEElQoiAUAqQBCaQTEAkgFAKEgFgCkAhCfUBALj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MgR2blXQG8nLD5LG7JLpMyu9ad37IkTOV8a+6vXrB3PpbvydfK8r7UK2P4mpAgcKTD73/Kw9pqPJmy5p7wBRcsxWyeMbUPUEn9fG6ET2WAD7mC0rlsWPRlnYGL2TCzuYNzDs5JqfS2/3pfTYzX24q1AfZp7Hvcrxj46+S2WatH8H+TZ5OudXGkNm5PRAipa9s4JEIv8XDWvsfFtDHmTjwOYkne8lSDpby3qiyYG0/OcVh5ycgarFfT6X7ZnH7CIpvsGx9JhJWbyyGkQX0mtx/Sxt6GZq3/m5spGB0yrCSqpNVdXLc4dcUlydTzmBNia8h4ZUpTz1aEWaPbRXoVqGxuOEffd3JfsL3TVasmOWhj5mMpqwrFDGTzrMCl0XTtU+n/Ttaav0VPKp2n3fOVpckz2lsLIq1a7G/m9LWoX77KOumB8qBIpL6bFcSCtqmlOBrpvohhuzEGdDJvPk6eWiqWx/n96geax2gcvetma58e0V5wW0zmb7zcTSxDGzyuJxgPXuU9dKhVJRJFXW7XP8AfpHx4/uBcoM9Jj/CzAAHk2STj6TiEcAAAAASUVORK5CYII=");
|
23
23
|
background-size: 100%;
|
24
24
|
display: block;
|
25
25
|
height: 100px;
|
@@ -29,10 +29,11 @@
|
|
29
29
|
text-indent: -119988px;
|
30
30
|
width: 203px;
|
31
31
|
|
32
|
+
// scss-lint:disable VendorPrefix
|
32
33
|
&:hover {
|
33
|
-
-webkit-transform: translateZ(0);
|
34
|
-
-webkit-filter: unquote("brightness(0.7)");
|
35
34
|
-moz-filter: unquote("brightness(0.7)");
|
35
|
+
-webkit-filter: unquote("brightness(0.7)");
|
36
36
|
filter: unquote("brightness(0.7)");
|
37
|
+
-webkit-transform: translateZ(0);
|
37
38
|
}
|
38
39
|
}
|
@@ -1,11 +1,12 @@
|
|
1
|
+
// scss-lint:disable VendorPrefix
|
1
2
|
%lsg--reset {
|
2
3
|
background: transparent;
|
3
4
|
border: none;
|
4
5
|
border-collapse: collapse;
|
5
6
|
border-radius: 0;
|
6
7
|
border-spacing: 0;
|
7
|
-
-webkit-box-sizing: border-box;
|
8
8
|
-moz-box-sizing: border-box;
|
9
|
+
-webkit-box-sizing: border-box;
|
9
10
|
box-sizing: border-box;
|
10
11
|
color: inherit;
|
11
12
|
display: block;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
|
2
|
+
.lsg--code-switch {
|
3
|
+
background-color: $lsg--background-color;
|
4
|
+
background-image: $lsg--code-switch-show;
|
5
|
+
background-position: 50%;
|
6
|
+
background-repeat: no-repeat;
|
7
|
+
background-size: 90%;
|
8
|
+
border-radius: $lsg--border-radius;
|
9
|
+
height: $lsg--button-height;
|
10
|
+
width: $lsg--button-width;
|
11
|
+
}
|
12
|
+
|
13
|
+
.lsg--hide-code {
|
14
|
+
.lsg--code-switch {
|
15
|
+
background-image: $lsg--code-switch-hide;
|
16
|
+
}
|
17
|
+
|
18
|
+
.lsg--code-block {
|
19
|
+
display: none;
|
20
|
+
}
|
21
|
+
}
|
@@ -2,14 +2,18 @@ $lsg--variables: () !default;
|
|
2
2
|
|
3
3
|
@each $variable, $value in $lsg--variables {
|
4
4
|
$value: null !default;
|
5
|
+
|
5
6
|
@if $value != null {
|
6
7
|
$selector: $variable;
|
8
|
+
|
7
9
|
@if str-slice($variable, 1, 1) == "$" or str-slice($variable, 1, 1) == "#" {
|
8
10
|
$selector: "\\" + $selector;
|
9
11
|
}
|
12
|
+
|
10
13
|
@if str-slice($variable, -2, -1) == "()" {
|
11
14
|
$selector: str-slice($variable, 1, -3) + "\\(\\)";
|
12
15
|
}
|
16
|
+
|
13
17
|
.#{$selector} {
|
14
18
|
@if type-of($value) == color {
|
15
19
|
@if (lightness($value) < lightness($lsg--color)) {
|
@@ -19,10 +23,10 @@ $lsg--variables: () !default;
|
|
19
23
|
&:before {
|
20
24
|
background: $value;
|
21
25
|
}
|
26
|
+
|
22
27
|
&:hover:before {
|
23
28
|
background: transparentize($value, 0.6);
|
24
29
|
}
|
25
|
-
|
26
30
|
}
|
27
31
|
|
28
32
|
&:after {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: livingstyleguide
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.0.alpha.
|
4
|
+
version: 2.0.0.alpha.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nico Hagenburger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minisyntax
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: scss-lint
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
description: Automatically generate beautiful front-end style guides with Sass and
|
196
210
|
Markdown. See http://livingstyleguide.org for details.
|
197
211
|
email:
|
@@ -201,58 +215,61 @@ executables:
|
|
201
215
|
extensions: []
|
202
216
|
extra_rdoc_files: []
|
203
217
|
files:
|
204
|
-
- assets/javascripts/livingstyleguide.js
|
205
218
|
- bin/livingstyleguide
|
206
219
|
- lib/livingstyleguide.rb
|
207
220
|
- lib/livingstyleguide/command_line_interface.rb
|
221
|
+
- lib/livingstyleguide/commands.rb
|
222
|
+
- lib/livingstyleguide/commands/add_wrapper_class.rb
|
223
|
+
- lib/livingstyleguide/commands/coffee_script.rb
|
224
|
+
- lib/livingstyleguide/commands/colors.rb
|
225
|
+
- lib/livingstyleguide/commands/css.rb
|
226
|
+
- lib/livingstyleguide/commands/data.rb
|
227
|
+
- lib/livingstyleguide/commands/default.rb
|
228
|
+
- lib/livingstyleguide/commands/font_example.rb
|
229
|
+
- lib/livingstyleguide/commands/full_width.rb
|
230
|
+
- lib/livingstyleguide/commands/haml.rb
|
231
|
+
- lib/livingstyleguide/commands/import_and_use.rb
|
232
|
+
- lib/livingstyleguide/commands/javascript.rb
|
233
|
+
- lib/livingstyleguide/commands/layout.rb
|
234
|
+
- lib/livingstyleguide/commands/markdown.rb
|
235
|
+
- lib/livingstyleguide/commands/options.rb
|
236
|
+
- lib/livingstyleguide/commands/require.rb
|
237
|
+
- lib/livingstyleguide/commands/sass.rb
|
238
|
+
- lib/livingstyleguide/commands/search_box.rb
|
239
|
+
- lib/livingstyleguide/commands/style.rb
|
240
|
+
- lib/livingstyleguide/commands/syntax.rb
|
241
|
+
- lib/livingstyleguide/commands/toggle_code.rb
|
242
|
+
- lib/livingstyleguide/commands/type.rb
|
208
243
|
- lib/livingstyleguide/document.rb
|
209
|
-
- lib/livingstyleguide/engine.rb
|
210
|
-
- lib/livingstyleguide/filters.rb
|
211
|
-
- lib/livingstyleguide/filters/add_wrapper_class.rb
|
212
|
-
- lib/livingstyleguide/filters/coffee_script.rb
|
213
|
-
- lib/livingstyleguide/filters/colors.rb
|
214
|
-
- lib/livingstyleguide/filters/css.rb
|
215
|
-
- lib/livingstyleguide/filters/data.rb
|
216
|
-
- lib/livingstyleguide/filters/default.rb
|
217
|
-
- lib/livingstyleguide/filters/font_example.rb
|
218
|
-
- lib/livingstyleguide/filters/full_width.rb
|
219
|
-
- lib/livingstyleguide/filters/haml.rb
|
220
|
-
- lib/livingstyleguide/filters/import_and_use.rb
|
221
|
-
- lib/livingstyleguide/filters/javascript.rb
|
222
|
-
- lib/livingstyleguide/filters/layout.rb
|
223
|
-
- lib/livingstyleguide/filters/markdown.rb
|
224
|
-
- lib/livingstyleguide/filters/options.rb
|
225
|
-
- lib/livingstyleguide/filters/require.rb
|
226
|
-
- lib/livingstyleguide/filters/sass.rb
|
227
|
-
- lib/livingstyleguide/filters/search_box.rb
|
228
|
-
- lib/livingstyleguide/filters/style.rb
|
229
|
-
- lib/livingstyleguide/filters/syntax.rb
|
230
|
-
- lib/livingstyleguide/filters/type.rb
|
231
244
|
- lib/livingstyleguide/integration.rb
|
232
245
|
- lib/livingstyleguide/integration/compass.rb
|
233
246
|
- lib/livingstyleguide/integration/rails.rb
|
234
247
|
- lib/livingstyleguide/integration/sass.rb
|
235
248
|
- lib/livingstyleguide/integration/sprockets.rb
|
236
249
|
- lib/livingstyleguide/markdown_extensions.rb
|
237
|
-
- lib/livingstyleguide/templates/code-example.html.erb
|
238
250
|
- lib/livingstyleguide/templates/code.html.erb
|
239
|
-
- lib/livingstyleguide/templates/colors-example.html.erb
|
240
251
|
- lib/livingstyleguide/templates/default.html.erb
|
241
252
|
- lib/livingstyleguide/templates/example.html.erb
|
242
253
|
- lib/livingstyleguide/templates/font-example.html.erb
|
243
|
-
- lib/livingstyleguide/templates/javascript-copy.html.erb
|
244
254
|
- lib/livingstyleguide/templates/javascript.html.erb
|
245
255
|
- lib/livingstyleguide/templates/layout.html.erb
|
246
256
|
- lib/livingstyleguide/templates/plain.html.erb
|
257
|
+
- lib/livingstyleguide/templates/scripts/copy.js.erb
|
258
|
+
- lib/livingstyleguide/templates/scripts/copy_code.js.erb
|
259
|
+
- lib/livingstyleguide/templates/scripts/copy_colors.js.erb
|
260
|
+
- lib/livingstyleguide/templates/scripts/search.js.erb
|
261
|
+
- lib/livingstyleguide/templates/scripts/toggle_code.js.erb
|
247
262
|
- lib/livingstyleguide/templates/search-box.html.erb
|
263
|
+
- lib/livingstyleguide/templates/toggle-code.html.erb
|
248
264
|
- lib/livingstyleguide/version.rb
|
249
265
|
- stylesheets/_livingstyleguide.scss
|
266
|
+
- stylesheets/livingstyleguide/_before.scss
|
250
267
|
- stylesheets/livingstyleguide/_code.scss
|
251
268
|
- stylesheets/livingstyleguide/_color-swatches.scss
|
252
269
|
- stylesheets/livingstyleguide/_content.scss
|
253
270
|
- stylesheets/livingstyleguide/_layout.scss
|
254
271
|
- stylesheets/livingstyleguide/_reset.scss
|
255
|
-
- stylesheets/livingstyleguide/
|
272
|
+
- stylesheets/livingstyleguide/_toggle-code.scss
|
256
273
|
- stylesheets/livingstyleguide/_variables.scss
|
257
274
|
homepage: http://livingstyleguide.org
|
258
275
|
licenses: []
|
@@ -1,75 +0,0 @@
|
|
1
|
-
;(function(win) {
|
2
|
-
|
3
|
-
getCookie = function(name) {
|
4
|
-
var regexp = new RegExp('(?:^|;)\\s*' + name + '\\s*=(.+?)(?:;|$)'),
|
5
|
-
match = document.cookie.match(regexp);
|
6
|
-
if (match) {
|
7
|
-
return escape(match[1]);
|
8
|
-
}
|
9
|
-
}
|
10
|
-
|
11
|
-
setCookie = function(name, value, expireDays) {
|
12
|
-
var cookie = name + '=' + escape(value);
|
13
|
-
if (expireDays) {
|
14
|
-
var expireDate = new Date();
|
15
|
-
expireDate.setDate(expireDate.getDate() + expireDays);
|
16
|
-
cookie += '; expires=' + expireDate.toUTCString();
|
17
|
-
}
|
18
|
-
document.cookie = cookie;
|
19
|
-
}
|
20
|
-
|
21
|
-
getClasses = function(el) {
|
22
|
-
return el.className.split(/\s+/g);
|
23
|
-
};
|
24
|
-
|
25
|
-
addClass = function(el, name) {
|
26
|
-
var classList = getClasses(el);
|
27
|
-
if (classList.indexOf(name) == -1) {
|
28
|
-
classList.push(name);
|
29
|
-
el.className = classList.join(' ');
|
30
|
-
}
|
31
|
-
};
|
32
|
-
|
33
|
-
removeClass = function(el, name) {
|
34
|
-
var classList = getClasses(el);
|
35
|
-
classList[classList.indexOf(name)] = null;
|
36
|
-
el.className = classList.join(' ');
|
37
|
-
};
|
38
|
-
|
39
|
-
toggleClass = function(el, name) {
|
40
|
-
var classList = getClasses(el);
|
41
|
-
if (classList.indexOf(name) == -1) {
|
42
|
-
addClass(el, name);
|
43
|
-
return true;
|
44
|
-
}
|
45
|
-
else {
|
46
|
-
removeClass(el, name);
|
47
|
-
return false;
|
48
|
-
}
|
49
|
-
};
|
50
|
-
|
51
|
-
var html = document.getElementsByTagName('HTML')[0];
|
52
|
-
|
53
|
-
// Hide/show code
|
54
|
-
|
55
|
-
var codeOpenedClass = 'show-code';
|
56
|
-
|
57
|
-
if (getCookie(codeOpenedClass) != 'false') {
|
58
|
-
addClass(html, codeOpenedClass);
|
59
|
-
}
|
60
|
-
|
61
|
-
function toggleCode(event) {
|
62
|
-
event.preventDefault();
|
63
|
-
showCode = toggleClass(html, codeOpenedClass);
|
64
|
-
setCookie(codeOpenedClass, showCode, 365);
|
65
|
-
}
|
66
|
-
|
67
|
-
document.addEventListener('DOMContentLoaded', function() {
|
68
|
-
var switches = document.getElementsByClassName('lsg--code-switch');
|
69
|
-
for (var i = 0; i < switches.length; i++) {
|
70
|
-
switches[i].addEventListener('click', toggleCode);
|
71
|
-
}
|
72
|
-
});
|
73
|
-
|
74
|
-
})(window);
|
75
|
-
|