minima-rock 0.8.2 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +22 -22
- data/README.md +3 -3
- data/_data/backgrounds.yml +8 -8
- data/_data/navigation.yml +8 -6
- data/_data/social.yml +21 -21
- data/_includes/categories_archive.html +14 -14
- data/_includes/categories_list.html +12 -12
- data/_includes/disqus_comments.html +20 -20
- data/_includes/footer.html +34 -34
- data/_includes/google-analytics.html +10 -10
- data/_includes/head.html +15 -15
- data/_includes/header.html +23 -23
- data/_includes/image.html +13 -13
- data/_includes/mathjax.html +6 -6
- data/_includes/search.html +17 -0
- data/_includes/share_bar.html +68 -68
- data/_includes/social.html +20 -20
- data/_includes/tags_archive.html +14 -14
- data/_includes/tags_bar.html +10 -10
- data/_includes/tags_cloud.html +13 -13
- data/_includes/toc.html +4 -4
- data/_layouts/default.html +32 -32
- data/_layouts/home.html +34 -34
- data/_layouts/page.html +14 -14
- data/_layouts/post.html +35 -35
- data/_sass/minima/_base.scss +262 -262
- data/_sass/minima/_layout.scss +323 -317
- data/_sass/minima/_share.scss +86 -86
- data/_sass/minima/_syntax-highlighting.scss +89 -89
- data/_sass/minima.scss +57 -57
- data/assets/css/style.scss +5 -5
- data/assets/js/color.js +69 -69
- data/assets/js/simple-jekyll-search.min.js +6 -0
- data/assets/minima-social-icons.svg +39 -39
- data/search.json +16 -0
- metadata +5 -2
data/_sass/minima/_share.scss
CHANGED
@@ -1,87 +1,87 @@
|
|
1
|
-
/* Share Bar */
|
2
|
-
#share-bar {
|
3
|
-
font-size: 26px;
|
4
|
-
}
|
5
|
-
|
6
|
-
/* All buttons */
|
7
|
-
.share-buttons a {
|
8
|
-
text-decoration: none;
|
9
|
-
}
|
10
|
-
|
11
|
-
/* Each button */
|
12
|
-
.share-button {
|
13
|
-
margin: 0px;
|
14
|
-
margin-bottom: 10px;
|
15
|
-
margin-right: 3px;
|
16
|
-
border: 1px solid #D3D6D2;
|
17
|
-
border-radius: 3px;
|
18
|
-
padding: 5px 10px 5px 10px;
|
19
|
-
}
|
20
|
-
.share-button:hover {
|
21
|
-
opacity: 1;
|
22
|
-
color: #ffffff;
|
23
|
-
}
|
24
|
-
|
25
|
-
/* Facebook button */
|
26
|
-
.fa-facebook-official {
|
27
|
-
color: #3b5998;
|
28
|
-
}
|
29
|
-
.fa-facebook-official:hover {
|
30
|
-
background-color: #3b5998;
|
31
|
-
}
|
32
|
-
|
33
|
-
/* Twitter button */
|
34
|
-
.fa-twitter {
|
35
|
-
color: #55acee;
|
36
|
-
}
|
37
|
-
.fa-twitter:hover {
|
38
|
-
background-color: #55acee;
|
39
|
-
}
|
40
|
-
|
41
|
-
/* Google-PLus button */
|
42
|
-
.fa-google-plus {
|
43
|
-
color: #dd4b39;
|
44
|
-
}
|
45
|
-
.fa-google-plus:hover {
|
46
|
-
background-color: #dd4b39;
|
47
|
-
}
|
48
|
-
|
49
|
-
/* Pinterest button */
|
50
|
-
.fa-pinterest-p {
|
51
|
-
color: #cb2027;
|
52
|
-
}
|
53
|
-
.fa-pinterest-p:hover {
|
54
|
-
background-color: #cb2027;
|
55
|
-
}
|
56
|
-
|
57
|
-
/* Tumblr button */
|
58
|
-
.fa-tumblr {
|
59
|
-
color: #32506d;
|
60
|
-
}
|
61
|
-
.fa-tumblr:hover {
|
62
|
-
background-color: #32506d;
|
63
|
-
}
|
64
|
-
|
65
|
-
/* Reddit button */
|
66
|
-
.fa-reddit-alien {
|
67
|
-
color: #ff4500;
|
68
|
-
}
|
69
|
-
.fa-reddit-alien:hover {
|
70
|
-
background-color: #ff4500;
|
71
|
-
}
|
72
|
-
|
73
|
-
/* LinkedIn button */
|
74
|
-
.fa-linkedin {
|
75
|
-
color: #007bb5;
|
76
|
-
}
|
77
|
-
.fa-linkedin:hover {
|
78
|
-
background-color: #007bb5;
|
79
|
-
}
|
80
|
-
|
81
|
-
/* Email button */
|
82
|
-
.fa-envelope {
|
83
|
-
color: #444444;
|
84
|
-
}
|
85
|
-
.fa-envelope:hover {
|
86
|
-
background-color: #444444;
|
1
|
+
/* Share Bar */
|
2
|
+
#share-bar {
|
3
|
+
font-size: 26px;
|
4
|
+
}
|
5
|
+
|
6
|
+
/* All buttons */
|
7
|
+
.share-buttons a {
|
8
|
+
text-decoration: none;
|
9
|
+
}
|
10
|
+
|
11
|
+
/* Each button */
|
12
|
+
.share-button {
|
13
|
+
margin: 0px;
|
14
|
+
margin-bottom: 10px;
|
15
|
+
margin-right: 3px;
|
16
|
+
border: 1px solid #D3D6D2;
|
17
|
+
border-radius: 3px;
|
18
|
+
padding: 5px 10px 5px 10px;
|
19
|
+
}
|
20
|
+
.share-button:hover {
|
21
|
+
opacity: 1;
|
22
|
+
color: #ffffff;
|
23
|
+
}
|
24
|
+
|
25
|
+
/* Facebook button */
|
26
|
+
.fa-facebook-official {
|
27
|
+
color: #3b5998;
|
28
|
+
}
|
29
|
+
.fa-facebook-official:hover {
|
30
|
+
background-color: #3b5998;
|
31
|
+
}
|
32
|
+
|
33
|
+
/* Twitter button */
|
34
|
+
.fa-twitter {
|
35
|
+
color: #55acee;
|
36
|
+
}
|
37
|
+
.fa-twitter:hover {
|
38
|
+
background-color: #55acee;
|
39
|
+
}
|
40
|
+
|
41
|
+
/* Google-PLus button */
|
42
|
+
.fa-google-plus {
|
43
|
+
color: #dd4b39;
|
44
|
+
}
|
45
|
+
.fa-google-plus:hover {
|
46
|
+
background-color: #dd4b39;
|
47
|
+
}
|
48
|
+
|
49
|
+
/* Pinterest button */
|
50
|
+
.fa-pinterest-p {
|
51
|
+
color: #cb2027;
|
52
|
+
}
|
53
|
+
.fa-pinterest-p:hover {
|
54
|
+
background-color: #cb2027;
|
55
|
+
}
|
56
|
+
|
57
|
+
/* Tumblr button */
|
58
|
+
.fa-tumblr {
|
59
|
+
color: #32506d;
|
60
|
+
}
|
61
|
+
.fa-tumblr:hover {
|
62
|
+
background-color: #32506d;
|
63
|
+
}
|
64
|
+
|
65
|
+
/* Reddit button */
|
66
|
+
.fa-reddit-alien {
|
67
|
+
color: #ff4500;
|
68
|
+
}
|
69
|
+
.fa-reddit-alien:hover {
|
70
|
+
background-color: #ff4500;
|
71
|
+
}
|
72
|
+
|
73
|
+
/* LinkedIn button */
|
74
|
+
.fa-linkedin {
|
75
|
+
color: #007bb5;
|
76
|
+
}
|
77
|
+
.fa-linkedin:hover {
|
78
|
+
background-color: #007bb5;
|
79
|
+
}
|
80
|
+
|
81
|
+
/* Email button */
|
82
|
+
.fa-envelope {
|
83
|
+
color: #444444;
|
84
|
+
}
|
85
|
+
.fa-envelope:hover {
|
86
|
+
background-color: #444444;
|
87
87
|
}
|
@@ -1,89 +1,89 @@
|
|
1
|
-
$foreground: #A9B7C6;
|
2
|
-
$background: #2B2B2B;
|
3
|
-
$selectionForeground: #A9B7C6;
|
4
|
-
$selectionBackground: #214283;
|
5
|
-
$operators: #A9B7C6;
|
6
|
-
$strings: #A5C25C;
|
7
|
-
$names: #88be05;
|
8
|
-
$keywords: #CB772F;
|
9
|
-
$varAndProp: #A9B7C6;
|
10
|
-
$numbers: #6897BB;
|
11
|
-
$tag: #f1c829;
|
12
|
-
$attributes: #9876AA;
|
13
|
-
$comments: #75715e;
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Syntax highlighting styles
|
17
|
-
*/
|
18
|
-
.highlight {
|
19
|
-
background: darken($background-color, 6%);
|
20
|
-
@extend %vertical-rhythm;
|
21
|
-
|
22
|
-
.highlighter-rouge & {
|
23
|
-
background: darken($background-color, 6%);
|
24
|
-
}
|
25
|
-
|
26
|
-
.hll { background-color: #49483e }
|
27
|
-
.c { color: $comments } /* Comment */
|
28
|
-
.err { color: #960050; background-color: #1e0010 } /* Error */
|
29
|
-
.k { color: $keywords } /* Keyword */
|
30
|
-
.l { color: $numbers} /* Literal */
|
31
|
-
.n { color: $varAndProp } /* Name */
|
32
|
-
.o { color: $operators } /* Operator */
|
33
|
-
.p { color: $varAndProp } /* Punctuation */
|
34
|
-
.cm { color: #75715e } /* Comment.Multiline */
|
35
|
-
.cp { color: #75715e } /* Comment.Preproc */
|
36
|
-
.c1 { color: #75715e } /* Comment.Single */
|
37
|
-
.cs { color: #75715e } /* Comment.Special */
|
38
|
-
.ge { font-style: italic } /* Generic.Emph */
|
39
|
-
.gs { font-weight: bold } /* Generic.Strong */
|
40
|
-
.kc { color: $keywords } /* Keyword.Constant */
|
41
|
-
.kd { color: $keywords } /* Keyword.Declaration */
|
42
|
-
.kn { color: $operators } /* Keyword.Namespace */
|
43
|
-
.kp { color: $keywords } /* Keyword.Pseudo */
|
44
|
-
.kr { color: $keywords } /* Keyword.Reserved */
|
45
|
-
.kt { color: $keywords } /* Keyword.Type */
|
46
|
-
.ld { color: $strings } /* Literal.Date */
|
47
|
-
.m { color: $numbers} /* Literal.Number */
|
48
|
-
.s { color: $strings } /* Literal.String */
|
49
|
-
.na { color: $attributes } /* Name.Attribute */
|
50
|
-
.nb { color: $varAndProp } /* Name.Builtin */
|
51
|
-
.nc { color: $names } /* Name.Class */
|
52
|
-
.no { color: $keywords } /* Name.Constant */
|
53
|
-
.nd { color: #f1c829 } /* Name.Decorator */
|
54
|
-
.ni { color: $varAndProp } /* Name.Entity */
|
55
|
-
.ne { color: $names } /* Name.Exception */
|
56
|
-
.nf { color: $names } /* Name.Function */
|
57
|
-
.nl { color: $varAndProp } /* Name.Label */
|
58
|
-
.nn { color: $varAndProp } /* Name.Namespace */
|
59
|
-
.nx { color: $names } /* Name.Other */
|
60
|
-
.py { color: $varAndProp } /* Name.Property */
|
61
|
-
.nt { color: $tag } /* Name.Tag */
|
62
|
-
.nv { color: $varAndProp } /* Name.Variable */
|
63
|
-
.ow { color: $operators } /* Operator.Word */
|
64
|
-
.w { color: $varAndProp } /* Text.Whitespace */
|
65
|
-
.mf { color: $numbers } /* Literal.Number.Float */
|
66
|
-
.mh { color: $numbers } /* Literal.Number.Hex */
|
67
|
-
.mi { color: $numbers } /* Literal.Number.Integer */
|
68
|
-
.mo { color: $numbers } /* Literal.Number.Oct */
|
69
|
-
.sb { color: $strings } /* Literal.String.Backtick */
|
70
|
-
.sc { color: $strings } /* Literal.String.Char */
|
71
|
-
.sd { color: $strings } /* Literal.String.Doc */
|
72
|
-
.s2 { color: $strings } /* Literal.String.Double */
|
73
|
-
.se { color: $numbers} /* Literal.String.Escape */
|
74
|
-
.sh { color: $strings } /* Literal.String.Heredoc */
|
75
|
-
.si { color: $strings } /* Literal.String.Interpol */
|
76
|
-
.sx { color: $strings } /* Literal.String.Other */
|
77
|
-
.sr { color: $strings } /* Literal.String.Regex */
|
78
|
-
.s1 { color: $strings } /* Literal.String.Single */
|
79
|
-
.ss { color: $strings } /* Literal.String.Symbol */
|
80
|
-
.bp { color: $varAndProp } /* Name.Builtin.Pseudo */
|
81
|
-
.vc { color: $varAndProp } /* Name.Variable.Class */
|
82
|
-
.vg { color: $varAndProp } /* Name.Variable.Global */
|
83
|
-
.vi { color: $varAndProp } /* Name.Variable.Instance */
|
84
|
-
.il { color: $numbers} /* Literal.Number.Integer.Long */
|
85
|
-
|
86
|
-
.gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
|
87
|
-
.gd { color: $operators; } /* Generic.Deleted & Diff Deleted */
|
88
|
-
.gi { color: $names; } /* Generic.Inserted & Diff Inserted */
|
89
|
-
}
|
1
|
+
$foreground: #A9B7C6;
|
2
|
+
$background: #2B2B2B;
|
3
|
+
$selectionForeground: #A9B7C6;
|
4
|
+
$selectionBackground: #214283;
|
5
|
+
$operators: #A9B7C6;
|
6
|
+
$strings: #A5C25C;
|
7
|
+
$names: #88be05;
|
8
|
+
$keywords: #CB772F;
|
9
|
+
$varAndProp: #A9B7C6;
|
10
|
+
$numbers: #6897BB;
|
11
|
+
$tag: #f1c829;
|
12
|
+
$attributes: #9876AA;
|
13
|
+
$comments: #75715e;
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Syntax highlighting styles
|
17
|
+
*/
|
18
|
+
.highlight {
|
19
|
+
background: darken($background-color, 6%);
|
20
|
+
@extend %vertical-rhythm;
|
21
|
+
|
22
|
+
.highlighter-rouge & {
|
23
|
+
background: darken($background-color, 6%);
|
24
|
+
}
|
25
|
+
|
26
|
+
.hll { background-color: #49483e }
|
27
|
+
.c { color: $comments } /* Comment */
|
28
|
+
.err { color: #960050; background-color: #1e0010 } /* Error */
|
29
|
+
.k { color: $keywords } /* Keyword */
|
30
|
+
.l { color: $numbers} /* Literal */
|
31
|
+
.n { color: $varAndProp } /* Name */
|
32
|
+
.o { color: $operators } /* Operator */
|
33
|
+
.p { color: $varAndProp } /* Punctuation */
|
34
|
+
.cm { color: #75715e } /* Comment.Multiline */
|
35
|
+
.cp { color: #75715e } /* Comment.Preproc */
|
36
|
+
.c1 { color: #75715e } /* Comment.Single */
|
37
|
+
.cs { color: #75715e } /* Comment.Special */
|
38
|
+
.ge { font-style: italic } /* Generic.Emph */
|
39
|
+
.gs { font-weight: bold } /* Generic.Strong */
|
40
|
+
.kc { color: $keywords } /* Keyword.Constant */
|
41
|
+
.kd { color: $keywords } /* Keyword.Declaration */
|
42
|
+
.kn { color: $operators } /* Keyword.Namespace */
|
43
|
+
.kp { color: $keywords } /* Keyword.Pseudo */
|
44
|
+
.kr { color: $keywords } /* Keyword.Reserved */
|
45
|
+
.kt { color: $keywords } /* Keyword.Type */
|
46
|
+
.ld { color: $strings } /* Literal.Date */
|
47
|
+
.m { color: $numbers} /* Literal.Number */
|
48
|
+
.s { color: $strings } /* Literal.String */
|
49
|
+
.na { color: $attributes } /* Name.Attribute */
|
50
|
+
.nb { color: $varAndProp } /* Name.Builtin */
|
51
|
+
.nc { color: $names } /* Name.Class */
|
52
|
+
.no { color: $keywords } /* Name.Constant */
|
53
|
+
.nd { color: #f1c829 } /* Name.Decorator */
|
54
|
+
.ni { color: $varAndProp } /* Name.Entity */
|
55
|
+
.ne { color: $names } /* Name.Exception */
|
56
|
+
.nf { color: $names } /* Name.Function */
|
57
|
+
.nl { color: $varAndProp } /* Name.Label */
|
58
|
+
.nn { color: $varAndProp } /* Name.Namespace */
|
59
|
+
.nx { color: $names } /* Name.Other */
|
60
|
+
.py { color: $varAndProp } /* Name.Property */
|
61
|
+
.nt { color: $tag } /* Name.Tag */
|
62
|
+
.nv { color: $varAndProp } /* Name.Variable */
|
63
|
+
.ow { color: $operators } /* Operator.Word */
|
64
|
+
.w { color: $varAndProp } /* Text.Whitespace */
|
65
|
+
.mf { color: $numbers } /* Literal.Number.Float */
|
66
|
+
.mh { color: $numbers } /* Literal.Number.Hex */
|
67
|
+
.mi { color: $numbers } /* Literal.Number.Integer */
|
68
|
+
.mo { color: $numbers } /* Literal.Number.Oct */
|
69
|
+
.sb { color: $strings } /* Literal.String.Backtick */
|
70
|
+
.sc { color: $strings } /* Literal.String.Char */
|
71
|
+
.sd { color: $strings } /* Literal.String.Doc */
|
72
|
+
.s2 { color: $strings } /* Literal.String.Double */
|
73
|
+
.se { color: $numbers} /* Literal.String.Escape */
|
74
|
+
.sh { color: $strings } /* Literal.String.Heredoc */
|
75
|
+
.si { color: $strings } /* Literal.String.Interpol */
|
76
|
+
.sx { color: $strings } /* Literal.String.Other */
|
77
|
+
.sr { color: $strings } /* Literal.String.Regex */
|
78
|
+
.s1 { color: $strings } /* Literal.String.Single */
|
79
|
+
.ss { color: $strings } /* Literal.String.Symbol */
|
80
|
+
.bp { color: $varAndProp } /* Name.Builtin.Pseudo */
|
81
|
+
.vc { color: $varAndProp } /* Name.Variable.Class */
|
82
|
+
.vg { color: $varAndProp } /* Name.Variable.Global */
|
83
|
+
.vi { color: $varAndProp } /* Name.Variable.Instance */
|
84
|
+
.il { color: $numbers} /* Literal.Number.Integer.Long */
|
85
|
+
|
86
|
+
.gu { color: #75715e; } /* Generic.Subheading & Diff Unified/Comment? */
|
87
|
+
.gd { color: $operators; } /* Generic.Deleted & Diff Deleted */
|
88
|
+
.gi { color: $names; } /* Generic.Inserted & Diff Inserted */
|
89
|
+
}
|
data/_sass/minima.scss
CHANGED
@@ -1,57 +1,57 @@
|
|
1
|
-
@charset "utf-8";
|
2
|
-
|
3
|
-
// Define defaults for each variable.
|
4
|
-
|
5
|
-
$base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
|
6
|
-
$base-font-size: 16px !default;
|
7
|
-
$base-font-weight: 400 !default;
|
8
|
-
$small-font-size: $base-font-size * 0.875 !default;
|
9
|
-
$base-line-height: 1.5 !default;
|
10
|
-
|
11
|
-
$spacing-unit: 30px !default;
|
12
|
-
|
13
|
-
$text-color: silver !default;
|
14
|
-
$background-color: #2d2d2d !default;
|
15
|
-
$brand-color: #549ec0 !default;
|
16
|
-
|
17
|
-
$grey-color: #808080 !default;
|
18
|
-
$grey-color-light: lighten($grey-color, 40%) !default;
|
19
|
-
$grey-color-dark: darken($grey-color, 25%) !default;
|
20
|
-
$orange-color: #f66a0a !default;
|
21
|
-
$table-text-align: left !default;
|
22
|
-
|
23
|
-
// Width of the content area
|
24
|
-
$content-width: 800px !default;
|
25
|
-
|
26
|
-
$on-palm: 600px !default;
|
27
|
-
$on-laptop: 800px !default;
|
28
|
-
|
29
|
-
$on-medium: $on-palm !default;
|
30
|
-
$on-large: $on-laptop !default;
|
31
|
-
|
32
|
-
// Use media queries like this:
|
33
|
-
// @include media-query($on-palm) {
|
34
|
-
// .wrapper {
|
35
|
-
// padding-right: $spacing-unit / 2;
|
36
|
-
// padding-left: $spacing-unit / 2;
|
37
|
-
// }
|
38
|
-
// }
|
39
|
-
// Notice the following mixin uses max-width, in a deprecated, desktop-first
|
40
|
-
// approach, whereas media queries used elsewhere now use min-width.
|
41
|
-
@mixin media-query($device) {
|
42
|
-
@media screen and (max-width: $device) {
|
43
|
-
@content;
|
44
|
-
}
|
45
|
-
}
|
46
|
-
|
47
|
-
@mixin relative-font-size($ratio) {
|
48
|
-
font-size: $base-font-size * $ratio;
|
49
|
-
}
|
50
|
-
|
51
|
-
// Import partials.
|
52
|
-
@import
|
53
|
-
"minima/base",
|
54
|
-
"minima/layout",
|
55
|
-
"minima/share",
|
56
|
-
"minima/syntax-highlighting"
|
57
|
-
;
|
1
|
+
@charset "utf-8";
|
2
|
+
|
3
|
+
// Define defaults for each variable.
|
4
|
+
|
5
|
+
$base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !default;
|
6
|
+
$base-font-size: 16px !default;
|
7
|
+
$base-font-weight: 400 !default;
|
8
|
+
$small-font-size: $base-font-size * 0.875 !default;
|
9
|
+
$base-line-height: 1.5 !default;
|
10
|
+
|
11
|
+
$spacing-unit: 30px !default;
|
12
|
+
|
13
|
+
$text-color: silver !default;
|
14
|
+
$background-color: #2d2d2d !default;
|
15
|
+
$brand-color: #549ec0 !default;
|
16
|
+
|
17
|
+
$grey-color: #808080 !default;
|
18
|
+
$grey-color-light: lighten($grey-color, 40%) !default;
|
19
|
+
$grey-color-dark: darken($grey-color, 25%) !default;
|
20
|
+
$orange-color: #f66a0a !default;
|
21
|
+
$table-text-align: left !default;
|
22
|
+
|
23
|
+
// Width of the content area
|
24
|
+
$content-width: 800px !default;
|
25
|
+
|
26
|
+
$on-palm: 600px !default;
|
27
|
+
$on-laptop: 800px !default;
|
28
|
+
|
29
|
+
$on-medium: $on-palm !default;
|
30
|
+
$on-large: $on-laptop !default;
|
31
|
+
|
32
|
+
// Use media queries like this:
|
33
|
+
// @include media-query($on-palm) {
|
34
|
+
// .wrapper {
|
35
|
+
// padding-right: $spacing-unit / 2;
|
36
|
+
// padding-left: $spacing-unit / 2;
|
37
|
+
// }
|
38
|
+
// }
|
39
|
+
// Notice the following mixin uses max-width, in a deprecated, desktop-first
|
40
|
+
// approach, whereas media queries used elsewhere now use min-width.
|
41
|
+
@mixin media-query($device) {
|
42
|
+
@media screen and (max-width: $device) {
|
43
|
+
@content;
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
@mixin relative-font-size($ratio) {
|
48
|
+
font-size: $base-font-size * $ratio;
|
49
|
+
}
|
50
|
+
|
51
|
+
// Import partials.
|
52
|
+
@import
|
53
|
+
"minima/base",
|
54
|
+
"minima/layout",
|
55
|
+
"minima/share",
|
56
|
+
"minima/syntax-highlighting"
|
57
|
+
;
|
data/assets/css/style.scss
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
---
|
2
|
-
# Only the main Sass file needs front matter (the dashes are enough)
|
3
|
-
---
|
4
|
-
|
5
|
-
@import "minima";
|
1
|
+
---
|
2
|
+
# Only the main Sass file needs front matter (the dashes are enough)
|
3
|
+
---
|
4
|
+
|
5
|
+
@import "minima";
|
data/assets/js/color.js
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
/**
|
2
|
-
* Refer to https://cp-algorithms.com/string/string-hashing.html
|
3
|
-
* @param {string} str
|
4
|
-
*/
|
5
|
-
function hash(str) {
|
6
|
-
const p = 31;
|
7
|
-
const m = 1e9 + 9;
|
8
|
-
let h = 0;
|
9
|
-
let pow = 1;
|
10
|
-
for (let i = 0; i < str.length; i++) {
|
11
|
-
const c = str.charCodeAt(i);
|
12
|
-
h = (h + (c - 'a'.charCodeAt(0) + 1) * pow) % m;
|
13
|
-
pow = (pow * p) % m;
|
14
|
-
}
|
15
|
-
return h;
|
16
|
-
}
|
17
|
-
|
18
|
-
function invertColor(hex, bw) {
|
19
|
-
if (hex.indexOf('#') === 0) {
|
20
|
-
hex = hex.slice(1);
|
21
|
-
}
|
22
|
-
// convert 3-digit hex to 6-digits.
|
23
|
-
if (hex.length === 3) {
|
24
|
-
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
25
|
-
}
|
26
|
-
if (hex.length !== 6) {
|
27
|
-
throw new Error('Invalid HEX color.');
|
28
|
-
}
|
29
|
-
var r = parseInt(hex.slice(0, 2), 16),
|
30
|
-
g = parseInt(hex.slice(2, 4), 16),
|
31
|
-
b = parseInt(hex.slice(4, 6), 16);
|
32
|
-
if (bw) {
|
33
|
-
// http://stackoverflow.com/a/3943023/112731
|
34
|
-
return (r * 0.299 + g * 0.587 + b * 0.114) > 186
|
35
|
-
? '#000000'
|
36
|
-
: '#FFFFFF';
|
37
|
-
}
|
38
|
-
// invert color components
|
39
|
-
r = (255 - r).toString(16);
|
40
|
-
g = (255 - g).toString(16);
|
41
|
-
b = (255 - b).toString(16);
|
42
|
-
// pad each with zeros and return
|
43
|
-
return "#" + padZero(r) + padZero(g) + padZero(b);
|
44
|
-
}
|
45
|
-
|
46
|
-
function padZero(str, len) {
|
47
|
-
len = len || 2;
|
48
|
-
var zeros = new Array(len).join('0');
|
49
|
-
return (zeros + str).slice(-len);
|
50
|
-
}
|
51
|
-
|
52
|
-
function randomColor() {
|
53
|
-
color = Math.floor(Math.random()*16777215).toString(16);
|
54
|
-
return '#' + padZero(color, 6);
|
55
|
-
}
|
56
|
-
|
57
|
-
function hashColor(str) {
|
58
|
-
color = (hash(str) % 16777215).toString(16);
|
59
|
-
return '#' + padZero(color, 6);
|
60
|
-
}
|
61
|
-
|
62
|
-
function setInvertedColor(className) {
|
63
|
-
let elems = document.getElementsByClassName(className);
|
64
|
-
for (const elem of elems) {
|
65
|
-
const bgColor = hashColor(elem.innerText);
|
66
|
-
const color = invertColor(bgColor, true);
|
67
|
-
elem.style['color'] = color;
|
68
|
-
elem.style['background-color'] = bgColor;
|
69
|
-
}
|
1
|
+
/**
|
2
|
+
* Refer to https://cp-algorithms.com/string/string-hashing.html
|
3
|
+
* @param {string} str
|
4
|
+
*/
|
5
|
+
function hash(str) {
|
6
|
+
const p = 31;
|
7
|
+
const m = 1e9 + 9;
|
8
|
+
let h = 0;
|
9
|
+
let pow = 1;
|
10
|
+
for (let i = 0; i < str.length; i++) {
|
11
|
+
const c = str.charCodeAt(i);
|
12
|
+
h = (h + (c - 'a'.charCodeAt(0) + 1) * pow) % m;
|
13
|
+
pow = (pow * p) % m;
|
14
|
+
}
|
15
|
+
return h;
|
16
|
+
}
|
17
|
+
|
18
|
+
function invertColor(hex, bw) {
|
19
|
+
if (hex.indexOf('#') === 0) {
|
20
|
+
hex = hex.slice(1);
|
21
|
+
}
|
22
|
+
// convert 3-digit hex to 6-digits.
|
23
|
+
if (hex.length === 3) {
|
24
|
+
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
25
|
+
}
|
26
|
+
if (hex.length !== 6) {
|
27
|
+
throw new Error('Invalid HEX color.');
|
28
|
+
}
|
29
|
+
var r = parseInt(hex.slice(0, 2), 16),
|
30
|
+
g = parseInt(hex.slice(2, 4), 16),
|
31
|
+
b = parseInt(hex.slice(4, 6), 16);
|
32
|
+
if (bw) {
|
33
|
+
// http://stackoverflow.com/a/3943023/112731
|
34
|
+
return (r * 0.299 + g * 0.587 + b * 0.114) > 186
|
35
|
+
? '#000000'
|
36
|
+
: '#FFFFFF';
|
37
|
+
}
|
38
|
+
// invert color components
|
39
|
+
r = (255 - r).toString(16);
|
40
|
+
g = (255 - g).toString(16);
|
41
|
+
b = (255 - b).toString(16);
|
42
|
+
// pad each with zeros and return
|
43
|
+
return "#" + padZero(r) + padZero(g) + padZero(b);
|
44
|
+
}
|
45
|
+
|
46
|
+
function padZero(str, len) {
|
47
|
+
len = len || 2;
|
48
|
+
var zeros = new Array(len).join('0');
|
49
|
+
return (zeros + str).slice(-len);
|
50
|
+
}
|
51
|
+
|
52
|
+
function randomColor() {
|
53
|
+
color = Math.floor(Math.random()*16777215).toString(16);
|
54
|
+
return '#' + padZero(color, 6);
|
55
|
+
}
|
56
|
+
|
57
|
+
function hashColor(str) {
|
58
|
+
color = (hash(str) % 16777215).toString(16);
|
59
|
+
return '#' + padZero(color, 6);
|
60
|
+
}
|
61
|
+
|
62
|
+
function setInvertedColor(className) {
|
63
|
+
let elems = document.getElementsByClassName(className);
|
64
|
+
for (const elem of elems) {
|
65
|
+
const bgColor = hashColor(elem.innerText);
|
66
|
+
const color = invertColor(bgColor, true);
|
67
|
+
elem.style['color'] = color;
|
68
|
+
elem.style['background-color'] = bgColor;
|
69
|
+
}
|
70
70
|
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*!
|
2
|
+
* Simple-Jekyll-Search v1.7.2 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
3
|
+
* Copyright 2015-2018, Christian Fei
|
4
|
+
* Licensed under the MIT License.
|
5
|
+
*/
|
6
|
+
!function(){"use strict";var f={load:function w(t,e){var n=function r(){return window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP")}();n.open("GET",t,!0),n.onreadystatechange=function i(e,n){return function(){if(4===e.readyState&&200===e.status)try{n(null,JSON.parse(e.responseText))}catch(t){n(t,null)}}}(n,e),n.send()}};(function y(t){if(!function e(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(t))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(t);var r=t.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}});var n=function g(t,e){var n=e.length,r=t.length;if(n<r)return!1;if(r===n)return t===e;t:for(var i=0,o=0;i<r;i++){for(var u=t.charCodeAt(i);o<n;)if(e.charCodeAt(o++)===u)continue t;return!1}return!0},e=new function t(){this.matches=function(t,e){return n(e.toLowerCase(),t.toLowerCase())}};var r=new function O(){this.matches=function(e,t){return!!e&&(e=e.trim().toLowerCase(),(t=t.trim().toLowerCase()).split(" ").filter(function(t){return 0<=e.indexOf(t)}).length===t.split(" ").length)}};var l={put:function z(t){if(c(t))return s(t);if(function e(t){return Boolean(t)&&"[object Array]"===Object.prototype.toString.call(t)}(t))return function i(t){var e=[];a();for(var n=0,r=t.length;n<r;n++)c(t[n])&&e.push(s(t[n]));return e}(t);return undefined},clear:a,search:function S(t){return t?function a(t,e,n,r){for(var i=[],o=0;o<t.length&&i.length<r.limit;o++){var u=d(t[o],e,n,r);u&&i.push(u)}return i}(o,t,u.searchStrategy,u).sort(u.sort):[]},setOptions:function q(t){(u=t||{}).fuzzy=t.fuzzy||!1,u.limit=t.limit||10,u.searchStrategy=t.fuzzy?e:r,u.sort=t.sort||i}};function i(){return 0}var o=[],u={};function a(){return o.length=0,o}function c(t){return Boolean(t)&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return o.push(t),o}function d(t,e,n,r){for(var i in t)if(!p(t[i],r.exclude)&&n.matches(t[i],e))return t}function p(t,e){for(var n=!1,r=0,i=(e=e||[]).length;r<i;r++){var o=e[r];!n&&new RegExp(t).test(o)&&(n=!0)}return n}u.fuzzy=!1,u.limit=10,u.searchStrategy=u.fuzzy?e:r,u.sort=i;var h={compile:function j(r){return m.template.replace(m.pattern,function(t,e){var n=m.middleware(e,r[e],m.template);return void 0!==n?n:r[e]||t})},setOptions:function C(t){m.pattern=t.pattern||m.pattern,m.template=t.template||m.template,"function"==typeof t.middleware&&(m.middleware=t.middleware)}},m={};m.pattern=/\{(.*?)\}/g,m.template="",m.middleware=function(){};var v={merge:function L(t,e){var n={};for(var r in t)n[r]=t[r],"undefined"!=typeof e[r]&&(n[r]=e[r]);return n},isJSON:function M(t){try{return!!(t instanceof Object&&JSON.parse(JSON.stringify(t)))}catch(e){return!1}}};!function(t){var o={searchInput:null,resultsContainer:null,json:[],success:Function.prototype,searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},n=["searchInput","resultsContainer","json"],r=function y(e){if(!function n(t){return!!t&&"undefined"!=typeof t.required&&t.required instanceof Array}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof y))return new y(e);var r=e.required;this.getRequiredOptions=function(){return r},this.validate=function(e){var n=[];return r.forEach(function(t){"undefined"==typeof e[t]&&n.push(t)}),n}}({required:n});function i(t){o.success(t),l.put(t),function e(){o.searchInput.addEventListener("keyup",function(t){(function e(t){return-1===[13,16,20,37,38,39,40,91].indexOf(t)})(t.which)&&(u(),c(t.target.value))})}()}function u(){o.resultsContainer.innerHTML=""}function a(t){o.resultsContainer.innerHTML+=t}function c(t){(function e(t){return t&&0<t.length})(t)&&(u(),function i(t,e){var n=t.length;if(0===n)return a(o.noResultsText);for(var r=0;r<n;r++)t[r].query=e,a(h.compile(t[r]))}(l.search(t),t))}function s(t){throw new Error("SimpleJekyllSearch --- "+t)}t.SimpleJekyllSearch=function(t){return 0<r.validate(t).length&&s("You must specify the following required options: "+n),o=v.merge(o,t),h.setOptions({template:o.searchResultTemplate,middleware:o.templateMiddleware}),l.setOptions({fuzzy:o.fuzzy,limit:o.limit,sort:o.sortMiddleware}),v.isJSON(o.json)?i(o.json):function e(n){f.load(n,function(t,e){t&&s("failed to get JSON ("+n+")"),i(e)})}(o.json),{search:c}}}(window)}();
|