jekyll-theme-yat 1.1.0 → 1.4.0

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.
@@ -4,22 +4,18 @@
4
4
 
5
5
  // Default theme colors
6
6
  $theme-colors: (
7
+ coolblack: #090a0b,
7
8
  spacegrey: #353535,
8
- inkpurple: #543581,
9
- aquablue: #00aaa0,
10
- azureblue: #2863b1,
11
- gracered: #a12a50,
12
- aloegreen: #3d9e56,
13
- rustbrown: #795548,
9
+ snowwhite: #ffffff,
14
10
  );
15
11
 
16
12
  $theme-name: "{{ site.theme_color }}";
17
- $theme-color: map-get($theme-colors, "spacegrey");
13
+ $theme-color: map-get($theme-colors, "snowwhite");
18
14
 
19
15
  @if map-has-key($theme-colors, $theme-name) {
20
16
  $theme-color: map-get($theme-colors, $theme-name);
21
17
  } @else if str-index($theme-name, "#") == 1 {
22
- $theme-color: {{ site.theme_color | default: '#353535' }};
18
+ $theme-color: {{ site.theme_color | default: '#ffffff' }};
23
19
  }
24
20
 
25
21
  @import "yat";
@@ -0,0 +1,71 @@
1
+ // Fix DOM matches function
2
+ if (!Element.prototype.matches) {
3
+ Element.prototype.matches =
4
+ Element.prototype.matchesSelector ||
5
+ Element.prototype.mozMatchesSelector ||
6
+ Element.prototype.msMatchesSelector ||
7
+ Element.prototype.oMatchesSelector ||
8
+ Element.prototype.webkitMatchesSelector ||
9
+ function(s) {
10
+ var matches = (this.document || this.ownerDocument).querySelectorAll(s),
11
+ i = matches.length;
12
+ while (--i >= 0 && matches.item(i) !== this) {}
13
+ return i > -1;
14
+ };
15
+ }
16
+
17
+ // Get Scroll position
18
+ function getScrollPos() {
19
+ var supportPageOffset = window.pageXOffset !== undefined;
20
+ var isCSS1Compat = ((document.compatMode || "") === "CSS1Compat");
21
+
22
+ var x = supportPageOffset ? window.pageXOffset : isCSS1Compat ? document.documentElement.scrollLeft : document.body.scrollLeft;
23
+ var y = supportPageOffset ? window.pageYOffset : isCSS1Compat ? document.documentElement.scrollTop : document.body.scrollTop;
24
+
25
+ return { x: x, y: y };
26
+ }
27
+
28
+ var _scrollTimer = [];
29
+
30
+ // Smooth scroll
31
+ function smoothScrollTo(y, time) {
32
+ time = time == undefined ? 500 : time;
33
+
34
+ var scrollPos = getScrollPos();
35
+ var count = 60;
36
+ var length = (y - scrollPos.y);
37
+
38
+ function easeInOut(k) {
39
+ return .5 * (Math.sin((k - .5) * Math.PI) + 1);
40
+ }
41
+
42
+ for (var i = _scrollTimer.length - 1; i >= 0; i--) {
43
+ clearTimeout(_scrollTimer[i]);
44
+ }
45
+
46
+ for (var i = 0; i <= count; i++) {
47
+ (function() {
48
+ var cur = i;
49
+ _scrollTimer[cur] = setTimeout(function() {
50
+ window.scrollTo(
51
+ scrollPos.x,
52
+ scrollPos.y + length * easeInOut(cur/count)
53
+ );
54
+ }, (time / count) * cur);
55
+ })();
56
+ }
57
+ }
58
+
59
+ // Init highlight js
60
+ document.addEventListener('DOMContentLoaded', function(event) {
61
+ document.querySelectorAll('pre code').forEach((block) => {
62
+ hljs.highlightBlock(block);
63
+ var lang = block.getAttribute('data-lang');
64
+ if (!lang) {
65
+ lang = block
66
+ .getAttribute('class')
67
+ .replace('hljs ', '');
68
+ }
69
+ block.parentNode.setAttribute('data-lang', lang);
70
+ });
71
+ });
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-yat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffreytse
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2020-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,7 +108,21 @@ dependencies:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.1'
111
- description:
111
+ - !ruby/object:Gem::Dependency
112
+ name: jekyll-spaceship
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.2'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '0.2'
125
+ description:
112
126
  email:
113
127
  - jeffreytse.mail@gmail.com
114
128
  executables: []
@@ -130,6 +144,7 @@ files:
130
144
  - _includes/functions.html
131
145
  - _includes/functions/get_categories.html
132
146
  - _includes/functions/get_datetimes.html
147
+ - _includes/functions/get_reading_time.html
133
148
  - _includes/functions/get_tags.html
134
149
  - _includes/functions/get_value.html
135
150
  - _includes/functions/log.html
@@ -165,14 +180,14 @@ files:
165
180
  - _sass/yat.scss
166
181
  - _sass/yat/_base.scss
167
182
  - _sass/yat/_layout.scss
168
- - _sass/yat/_syntax-highlighting.scss
169
- - assets/main.scss
183
+ - assets/css/main.scss
184
+ - assets/js/main.js
170
185
  homepage: https://github.com/jeffreytse/jekyll-theme-yat
171
186
  licenses:
172
187
  - MIT
173
188
  metadata:
174
189
  plugin_type: theme
175
- post_install_message:
190
+ post_install_message:
176
191
  rdoc_options: []
177
192
  require_paths:
178
193
  - lib
@@ -187,8 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
202
  - !ruby/object:Gem::Version
188
203
  version: '0'
189
204
  requirements: []
190
- rubygems_version: 3.0.3
191
- signing_key:
205
+ rubygems_version: 3.0.6
206
+ signing_key:
192
207
  specification_version: 4
193
- summary: Yet another theme for personal writers.
208
+ summary: Yet another theme for elegant writers with modern flat style.
194
209
  test_files: []
@@ -1,105 +0,0 @@
1
- /**
2
- * Syntax highlighting styles
3
- */
4
-
5
- .highlight {
6
- color: #c7c7c7;
7
- @extend %vertical-rhythm;
8
-
9
- .c { color: #998; font-style: italic } // Comment
10
- .err { color: #a61717; background-color: #e3d2d2 } // Error
11
- .k { font-weight: bold } // Keyword
12
- .o { font-weight: bold } // Operator
13
- .cm { color: #998; font-style: italic } // Comment.Multiline
14
- .cp { color: #999; font-weight: bold } // Comment.Preproc
15
- .c1 { color: #998; font-style: italic } // Comment.Single
16
- .cs { color: #999; font-weight: bold; font-style: italic } // Comment.Special
17
- .gd { color: #000; background-color: #fdd } // Generic.Deleted
18
- .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific
19
- .ge { font-style: italic } // Generic.Emph
20
- .gr { color: #a00 } // Generic.Error
21
- .gh { color: #999 } // Generic.Heading
22
- .gi { color: #000; background-color: #dfd } // Generic.Inserted
23
- .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific
24
- .go { color: #888 } // Generic.Output
25
- .gp { color: #555 } // Generic.Prompt
26
- .gs { font-weight: bold } // Generic.Strong
27
- .gu { color: #aaa } // Generic.Subheading
28
- .gt { color: #a00 } // Generic.Traceback
29
- .kc { font-weight: bold } // Keyword.Constant
30
- .kd { color: #0fdcdc; font-weight: bold } // Keyword.Declaration
31
- .kp { font-weight: bold } // Keyword.Pseudo
32
- .kr { font-weight: bold } // Keyword.Reserved
33
- .kt { color: #a7a7a7; font-weight: bold } // Keyword.Type
34
- .m { color: #099 } // Literal.Number
35
- .s { color: #d0c55c } // Literal.String
36
- .na { color: #a6e22e } // Name.Attribute
37
- .nb { color: #6cc117 } // Name.Builtin
38
- .nc { color: #4682b4; font-weight: bold } // Name.Class
39
- .no { color: #a6e22e } // Name.Constant
40
- .ni { color: #800080 } // Name.Entity
41
- .ne { color: #e04b9b; font-weight: bold } // Name.Exception
42
- .nf { color: #e04b9b; font-weight: bold } // Name.Function
43
- .nn { color: #a6e22e } // Name.Namespace
44
- .nt { color: #4ec2e4 } // Name.Tag
45
- .nv { color: #a6e22e } // Name.Variable
46
- .ow { font-weight: bold } // Operator.Word
47
- .w { color: #bbb } // Text.Whitespace
48
- .mf { color: #099 } // Literal.Number.Float
49
- .mh { color: #099 } // Literal.Number.Hex
50
- .mi { color: #099 } // Literal.Number.Integer
51
- .mo { color: #099 } // Literal.Number.Oct
52
- .sb { color: #d0c55c } // Literal.String.Backtick
53
- .sc { color: #d0c55c } // Literal.String.Char
54
- .sd { color: #d0c55c } // Literal.String.Doc
55
- .s2 { color: #d0c55c } // Literal.String.Double
56
- .se { color: #d0c55c } // Literal.String.Escape
57
- .sh { color: #d0c55c } // Literal.String.Heredoc
58
- .si { color: #d0c55c } // Literal.String.Interpol
59
- .sx { color: #d0c55c } // Literal.String.Other
60
- .sr { color: #009926 } // Literal.String.Regex
61
- .s1 { color: #d0c55c } // Literal.String.Single
62
- .ss { color: #990073 } // Literal.String.Symbol
63
- .bp { color: #999 } // Name.Builtin.Pseudo
64
- .vc { color: #a6e22e } // Name.Variable.Class
65
- .vg { color: #a6e22e } // Name.Variable.Global
66
- .vi { color: #a6e22e } // Name.Variable.Instance
67
- .il { color: #099 } // Literal.Number.Integer.Long
68
- }
69
-
70
- code .rouge-table {
71
- @extend .highlight;
72
- }
73
-
74
- code.highlighter-rouge {
75
- color: white;
76
- background: #676767;
77
- border: none;
78
- padding: 2px 4px;
79
- }
80
-
81
- figure.highlight pre {
82
- border-radius: 3px;
83
-
84
- code table.rouge-table {
85
- margin: 0;
86
-
87
- td {
88
- border: 1px solid #efefef86;
89
- }
90
-
91
- pre {
92
- margin: 0;
93
- padding: 0;
94
- }
95
-
96
- .gutter.gl {
97
- padding: 0;
98
-
99
- .lineno {
100
- padding: 2px;
101
- text-align: center;
102
- }
103
- }
104
- }
105
- }