jekyll-theme-yat 1.6.0 → 1.7.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.
- checksums.yaml +4 -4
- data/README.md +53 -8
- data/_includes/extensions/code-highlight.html +91 -0
- data/_includes/extensions/theme-toggle.html +28 -10
- data/_includes/functions/get_value.html +13 -0
- data/_includes/head.html +1 -6
- data/_includes/views/footer.html +1 -1
- data/_sass/misc/gitment.scss +12 -0
- data/_sass/misc/theme-toggle.scss +3 -3
- data/_sass/yat.scss +3 -2
- data/_sass/yat/_base.scss +4 -18
- data/_sass/yat/_dark.scss +19 -6
- data/_sass/yat/_layout.scss +2 -1
- data/assets/js/main.js +0 -29
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e64474766ce139b9a917d18a8a2fe0ff867b0bcc7c343349ab6819bd8990fbd
|
4
|
+
data.tar.gz: 279eeb6dd5e6a47244ae9516824fbf157e77b92c97a6ecf19604a1e04706c3c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28b59c6996eb0c3a95b8a6906c3aeb1647f77a34518f44a645a985217ce9965be55a4a5190564bceb704b8761ca4456b71fc37aad7f613d0b047be1af4c61c27
|
7
|
+
data.tar.gz: c08b686b732a4f146ad9ca5ff039ad4d8ca16f95b1ffb52c6b67c3b85599690274379490cca405f8108ed4aeb399aecd519e5168868da1dc567c8e82abb51d8b
|
data/README.md
CHANGED
@@ -9,7 +9,10 @@
|
|
9
9
|
alt="Donate (Ko-fi)" />
|
10
10
|
</a>
|
11
11
|
|
12
|
-
Hey, nice to meet you, you found this Jekyll theme. Here the
|
12
|
+
Hey, nice to meet you, you found this [Jekyll][jekyll] theme. Here the
|
13
|
+
**Yet Another Theme** is a modern responsive theme, and it's quiet clear,
|
14
|
+
clean and neat for writers and posts. **If you like the theme, give it
|
15
|
+
a star!**
|
13
16
|
|
14
17
|
|
15
18
|
<p align="center">
|
@@ -18,7 +21,7 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
18
21
|
|
19
22
|
</p>
|
20
23
|
|
21
|
-
<h3 align="center"
|
24
|
+
<h3 align="center">🌌 Night Mode</h3>
|
22
25
|
|
23
26
|
<p align="center">
|
24
27
|
|
@@ -29,6 +32,7 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
29
32
|
## Features
|
30
33
|
|
31
34
|
- Support beautiful __Night Mode__.
|
35
|
+
- Modern responsive web design.
|
32
36
|
- Full layouts `home`, `post`, `tags`, `archive` and `about`.
|
33
37
|
- Uses font awesome 5 for icons.
|
34
38
|
- Beautiful Syntax Highlight using [hilight.js][hilight-js].
|
@@ -46,6 +50,14 @@ Also, visit the [Live Demo][yat-live-demo] site for the theme.
|
|
46
50
|
|
47
51
|
## Installation
|
48
52
|
|
53
|
+
There are three ways to install:
|
54
|
+
|
55
|
+
- As a [gem-based theme](https://jekyllrb.com/docs/themes/#understanding-gem-based-themes).
|
56
|
+
- As a [remote theme](https://blog.github.com/2017-11-29-use-any-theme-with-github-pages/) (GitHub Pages compatible).
|
57
|
+
- Forking/directly copying all of the theme files into your project.
|
58
|
+
|
59
|
+
### Gem-based Theme Method
|
60
|
+
|
49
61
|
Add this line to your Jekyll site's `Gemfile`:
|
50
62
|
|
51
63
|
```ruby
|
@@ -60,20 +72,53 @@ theme: jekyll-theme-yat
|
|
60
72
|
|
61
73
|
And then execute:
|
62
74
|
|
63
|
-
|
75
|
+
```bash
|
76
|
+
$ bundle
|
77
|
+
```
|
64
78
|
|
65
79
|
Or install it yourself as:
|
66
80
|
|
67
|
-
|
81
|
+
```bash
|
82
|
+
$ gem install jekyll-theme-yat
|
83
|
+
```
|
68
84
|
|
69
|
-
|
85
|
+
### Remote Theme Method with GitHub Pages
|
70
86
|
|
71
|
-
|
87
|
+
Remote themes are similar to Gem-based themes, but do not require `Gemfile` changes or whitelisting making them ideal for sites hosted with GitHub Pages.
|
88
|
+
|
89
|
+
To install:
|
90
|
+
|
91
|
+
Add this line to your Jekyll site's `Gemfile`:
|
92
|
+
|
93
|
+
```ruby
|
94
|
+
gem "github-pages", group: :jekyll_plugins
|
95
|
+
```
|
96
|
+
|
97
|
+
And add this line to your Jekyll site's `_config.yml`:
|
98
|
+
|
99
|
+
```yaml
|
100
|
+
# theme: owner/name --> Don't forget to remove/comment the gem-based theme option
|
101
|
+
remote_theme: "jeffreytse/jekyll-theme-yat"
|
102
|
+
```
|
103
|
+
|
104
|
+
And then execute:
|
105
|
+
|
106
|
+
```bash
|
107
|
+
$ bundle
|
108
|
+
```
|
109
|
+
|
110
|
+
## GitHub Pages without limitation
|
111
|
+
|
112
|
+
GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins/themes](https://pages.github.com/versions/). __In other words, the third-party gems will not work normally__.
|
72
113
|
|
73
|
-
GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins](https://pages.github.com/versions/).
|
74
114
|
To use the third-party gem in GitHub Pages without limitation:
|
75
115
|
|
76
|
-
|
116
|
+
Here is a GitHub Action named [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) for Jekyll site deployment conveniently. 👍
|
117
|
+
|
118
|
+
|
119
|
+
## Usage
|
120
|
+
|
121
|
+
Add or update your available layouts, includes, sass and/or assets.
|
77
122
|
|
78
123
|
## Development
|
79
124
|
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<link rel="stylesheet"
|
2
|
+
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css">
|
3
|
+
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script>
|
4
|
+
<!-- and it's easy to individually load additional languages -->
|
5
|
+
<script charset="UTF-8"
|
6
|
+
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/languages/go.min.js"></script>
|
7
|
+
|
8
|
+
{%- assign name = 'code_badge.enabled' -%}
|
9
|
+
{%- include functions.html func='get_value' default='true' -%}
|
10
|
+
{%- assign badge_enabled = return -%}
|
11
|
+
|
12
|
+
{%- assign name = 'code_badge.color' -%}
|
13
|
+
{%- include functions.html func='get_value' default='#fff' -%}
|
14
|
+
{%- assign badge_color = return -%}
|
15
|
+
|
16
|
+
{%- assign name = 'code_badge.background_color' -%}
|
17
|
+
{%- include functions.html func='get_value' default='#ff4e00' -%}
|
18
|
+
{%- assign badge_background_color = return -%}
|
19
|
+
|
20
|
+
{%- assign name = 'code_badge.text_transform' -%}
|
21
|
+
{%- include functions.html func='get_value' default='uppercase' -%}
|
22
|
+
{%- assign badge_text_transform = return -%}
|
23
|
+
|
24
|
+
<script>
|
25
|
+
// Init highlight js
|
26
|
+
document.addEventListener('DOMContentLoaded', function(event) {
|
27
|
+
var els = document.querySelectorAll('pre code')
|
28
|
+
|
29
|
+
function addLangData(block) {
|
30
|
+
var outer = block.parentElement.parentElement.parentElement;
|
31
|
+
var lang = block.getAttribute('data-lang');
|
32
|
+
for (var i = 0; i < outer.classList.length; i++) {
|
33
|
+
var cls = outer.classList[i];
|
34
|
+
if (cls.startsWith('language-')) {
|
35
|
+
lang = cls;
|
36
|
+
break;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
if (!lang) {
|
40
|
+
cls = block.getAttribute('class');
|
41
|
+
lang = cls ? cls.replace('hljs ', '') : '';
|
42
|
+
}
|
43
|
+
if (lang.startsWith('language-')) {
|
44
|
+
lang = lang.substr(9);
|
45
|
+
}
|
46
|
+
block.setAttribute('class', 'hljs ' + lang);
|
47
|
+
block.parentNode.setAttribute('data-lang', lang);
|
48
|
+
}
|
49
|
+
|
50
|
+
function addBadge(block) {
|
51
|
+
var enabled = ('{{ badge_enabled }}' || 'true').toLowerCase();
|
52
|
+
if (enabled == 'true') {
|
53
|
+
var pre = block.parentElement;
|
54
|
+
pre.classList.add('badge');
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
function handle(block) {
|
59
|
+
addLangData(block);
|
60
|
+
addBadge(block)
|
61
|
+
hljs.highlightBlock(block);
|
62
|
+
}
|
63
|
+
|
64
|
+
for (var i = 0; i < els.length; i++) {
|
65
|
+
var el = els[i];
|
66
|
+
handle(el);
|
67
|
+
}
|
68
|
+
});
|
69
|
+
</script>
|
70
|
+
|
71
|
+
<style>
|
72
|
+
/* code language badge */
|
73
|
+
pre.badge::before {
|
74
|
+
content: attr(data-lang);
|
75
|
+
color: {{badge_color}};
|
76
|
+
background-color: {{badge_background_color}};
|
77
|
+
padding: 0 .5em;
|
78
|
+
border-radius: 0 2px;
|
79
|
+
text-transform: {{badge_text_transform}};
|
80
|
+
text-align: center;
|
81
|
+
min-width: 32px;
|
82
|
+
display: inline-block;
|
83
|
+
position: absolute;
|
84
|
+
right: 0;
|
85
|
+
}
|
86
|
+
|
87
|
+
/* fix wrong badge display for firefox browser */
|
88
|
+
code > table pre::before {
|
89
|
+
display: none;
|
90
|
+
}
|
91
|
+
</style>
|
@@ -9,22 +9,30 @@
|
|
9
9
|
</label>
|
10
10
|
</div>
|
11
11
|
|
12
|
+
{%- assign name = 'night_mode' -%}
|
13
|
+
{%- include functions.html func='get_value' default='auto' -%}
|
14
|
+
{%- assign night_mode = return -%}
|
15
|
+
|
12
16
|
<script>
|
13
17
|
(function() {
|
14
18
|
var sw = document.getElementById('theme-switch');
|
15
19
|
var html = document.getElementsByTagName('html')[0];
|
20
|
+
var nightModeOption = ('{{ night_mode }}' || 'auto').toLowerCase();
|
21
|
+
var storage = nightModeOption === 'manual'
|
22
|
+
? localStorage
|
23
|
+
: sessionStorage;
|
16
24
|
var themeData = loadThemeData();
|
17
25
|
|
18
26
|
function saveThemeData(data) {
|
19
|
-
|
27
|
+
storage.setItem('theme', JSON.stringify(data));
|
20
28
|
}
|
21
29
|
|
22
30
|
function loadThemeData() {
|
23
|
-
var data =
|
31
|
+
var data = storage.getItem('theme');
|
24
32
|
try {
|
25
33
|
data = JSON.parse(data ? data : '');
|
26
34
|
} catch(e) {
|
27
|
-
data = { nightShift:
|
35
|
+
data = { nightShift: undefined, autoToggleAt: 0 };
|
28
36
|
saveThemeData(data);
|
29
37
|
}
|
30
38
|
return data;
|
@@ -72,19 +80,29 @@
|
|
72
80
|
};
|
73
81
|
}
|
74
82
|
|
75
|
-
var data = autoThemeToggle();
|
76
|
-
|
77
83
|
// Listen the theme toggle event
|
78
84
|
sw.addEventListener('change', function(event) {
|
79
85
|
handleThemeToggle(event.target.checked);
|
80
86
|
});
|
81
87
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
88
|
+
if (nightModeOption == 'auto') {
|
89
|
+
var data = autoThemeToggle();
|
90
|
+
|
91
|
+
// Toggle theme by local setting
|
92
|
+
if (data.toggleAt > themeData.autoToggleAt) {
|
93
|
+
themeData.autoToggleAt = data.toggleAt;
|
94
|
+
handleThemeToggle(data.nightShift);
|
95
|
+
} else {
|
96
|
+
handleThemeToggle(themeData.nightShift);
|
97
|
+
}
|
98
|
+
} else if (nightModeOption == 'manual') {
|
87
99
|
handleThemeToggle(themeData.nightShift);
|
100
|
+
} else {
|
101
|
+
var nightShift = themeData.nightShift;
|
102
|
+
if (nightShift === undefined) {
|
103
|
+
nightShift = nightModeOption === 'on';
|
104
|
+
}
|
105
|
+
handleThemeToggle(nightShift);
|
88
106
|
}
|
89
107
|
})();
|
90
108
|
</script>
|
@@ -2,6 +2,9 @@
|
|
2
2
|
{%- assign name = include.params.name -%}
|
3
3
|
{%- endif -%}
|
4
4
|
|
5
|
+
{%- assign keys = name | split:'.'- %}
|
6
|
+
{%- assign name = keys.first -%}
|
7
|
+
|
5
8
|
{%- if page[name] != nil -%}
|
6
9
|
{%- assign return = page[name] -%}
|
7
10
|
{%- elsif site[name] != nil -%}
|
@@ -17,3 +20,13 @@
|
|
17
20
|
{%- else -%}
|
18
21
|
{%- assign return = include.params.default -%}
|
19
22
|
{%- endif -%}
|
23
|
+
|
24
|
+
{%- assign keys = keys | shift -%}
|
25
|
+
{%- for key in keys -%}
|
26
|
+
{%- assign return = return[key] -%}
|
27
|
+
{%- if return == nil -%}
|
28
|
+
{%- assign return = include.params.default -%}
|
29
|
+
{%- break -%}
|
30
|
+
{%- endif -%}
|
31
|
+
{%- endfor -%}
|
32
|
+
|
data/_includes/head.html
CHANGED
@@ -7,16 +7,11 @@
|
|
7
7
|
<link rel="shortcut icon" href="{{ site.favicon }}">
|
8
8
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
9
9
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-noto-sans@0.0.72/index.min.css">
|
10
|
-
<link rel="stylesheet"
|
11
|
-
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/default.min.css">
|
12
|
-
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script>
|
13
|
-
<!-- and it's easy to individually load additional languages -->
|
14
|
-
<script charset="UTF-8"
|
15
|
-
src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/languages/go.min.js"></script>
|
16
10
|
<link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
|
17
11
|
<script src="{{ "/assets/js/main.js" | relative_url }}"></script>
|
18
12
|
{%- feed_meta -%}
|
19
13
|
{%- if jekyll.environment == 'production' and site.google_analytics -%}
|
20
14
|
{%- include extensions/google-analytics.html -%}
|
21
15
|
{%- endif -%}
|
16
|
+
{%- include extensions/code-highlight.html -%}
|
22
17
|
</head>
|
data/_includes/views/footer.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
<div class="wrapper">
|
5
5
|
<div class="site-footer-inner">
|
6
|
-
<div>{{ site.copyright }} @{{ site.author | escape }}</div>
|
6
|
+
<div>{{ site.copyright }} {% if site.author %}@{{ site.author | escape }}{% endif %}</div>
|
7
7
|
<div>Powered by <a title="Jekyll is a simple, blog-aware, static site
|
8
8
|
generator." href="http://jekyllrb.com/">Jekyll</a> & <a title="Yat, yet
|
9
9
|
another theme." href="https://github.com/jeffreytse/jekyll-theme-yat">Yat Theme</a>.</div>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
.theme-toggle {
|
2
2
|
position: relative;
|
3
|
-
width:
|
3
|
+
width: $base-font-size * 7.65;
|
4
4
|
margin-top: 10px;
|
5
5
|
margin-right: 60px;
|
6
6
|
margin-left: auto;
|
7
|
-
transition:
|
7
|
+
transition: .3s cubic-bezier(.4,.03,0,1);
|
8
8
|
|
9
9
|
label, .toggle {
|
10
10
|
border-radius: 100px;
|
@@ -69,7 +69,7 @@
|
|
69
69
|
}
|
70
70
|
|
71
71
|
@include media-query($on-palm) {
|
72
|
-
width:
|
72
|
+
width: $base-font-size * 6.65;
|
73
73
|
margin-right: 20px;
|
74
74
|
|
75
75
|
.names {
|
data/_sass/yat.scss
CHANGED
@@ -10,7 +10,7 @@ $base-line-height: 1.6 !default;
|
|
10
10
|
|
11
11
|
$spacing-unit: 30px !default;
|
12
12
|
|
13
|
-
$text-color: #
|
13
|
+
$text-color: #454545 !default;
|
14
14
|
$background-color: #fff !default;
|
15
15
|
$brand-color: #ff5100 !default;
|
16
16
|
|
@@ -65,5 +65,6 @@ $on-laptop: 800px !default;
|
|
65
65
|
"misc/theme-toggle",
|
66
66
|
"misc/article-menu",
|
67
67
|
"misc/common-list",
|
68
|
-
"misc/google-translate"
|
68
|
+
"misc/google-translate",
|
69
|
+
"misc/gitment"
|
69
70
|
;
|
data/_sass/yat/_base.scss
CHANGED
@@ -148,10 +148,9 @@ code {
|
|
148
148
|
}
|
149
149
|
|
150
150
|
*:not(pre) > code {
|
151
|
-
padding:
|
151
|
+
padding: 3px 6px;
|
152
152
|
border-radius: 3px;
|
153
|
-
color: #
|
154
|
-
background-color: #787878;
|
153
|
+
background-color: #eee;
|
155
154
|
margin: 0 5px;
|
156
155
|
}
|
157
156
|
|
@@ -160,21 +159,6 @@ pre {
|
|
160
159
|
position: relative;
|
161
160
|
background-color: #f0f0f0;
|
162
161
|
|
163
|
-
// code language badge
|
164
|
-
&:before {
|
165
|
-
content: attr(data-lang);
|
166
|
-
color: #fff;
|
167
|
-
background-color: #ff4e00;
|
168
|
-
padding: 0 .5em;
|
169
|
-
border-radius: 0 2px;
|
170
|
-
text-transform: uppercase;
|
171
|
-
text-align: center;
|
172
|
-
min-width: 32px;
|
173
|
-
display: inline-block;
|
174
|
-
position: absolute;
|
175
|
-
right: 0;
|
176
|
-
}
|
177
|
-
|
178
162
|
> code {
|
179
163
|
display: inline-block;
|
180
164
|
padding: 20px!important;
|
@@ -221,11 +205,13 @@ pre {
|
|
221
205
|
* Tables
|
222
206
|
*/
|
223
207
|
table {
|
208
|
+
display: block;
|
224
209
|
margin-bottom: $spacing-unit;
|
225
210
|
width: 100%;
|
226
211
|
text-align: $table-text-align;
|
227
212
|
color: lighten($text-color, 5%);
|
228
213
|
border-collapse: collapse;
|
214
|
+
overflow: auto;
|
229
215
|
|
230
216
|
tr {
|
231
217
|
&:nth-child(even) {
|
data/_sass/yat/_dark.scss
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
$dark-background-color: #0e0e0e !default;
|
2
|
+
$dark-text-color: #bbb !default;
|
2
3
|
|
3
4
|
html[data-theme="dark"] {
|
4
5
|
|
@@ -10,23 +11,24 @@ html[data-theme="dark"] {
|
|
10
11
|
}
|
11
12
|
|
12
13
|
body {
|
13
|
-
color:
|
14
|
+
color: $dark-text-color;
|
14
15
|
background-color: $dark-background-color;
|
15
16
|
}
|
16
17
|
|
17
18
|
*:not(pre) > code {
|
18
|
-
|
19
|
+
color: $dark-text-color;
|
20
|
+
background-color: #454545;
|
19
21
|
}
|
20
22
|
|
21
23
|
table {
|
22
24
|
color: #9d9d9d;
|
23
25
|
|
24
26
|
th {
|
25
|
-
background-color: #
|
27
|
+
background-color: #050505;
|
26
28
|
}
|
27
29
|
|
28
30
|
tr:nth-child(even) {
|
29
|
-
background-color: #
|
31
|
+
background-color: #080808;
|
30
32
|
}
|
31
33
|
}
|
32
34
|
|
@@ -48,11 +50,22 @@ html[data-theme="dark"] {
|
|
48
50
|
.ct-language-dropdown {
|
49
51
|
color: #f8f8f8;
|
50
52
|
background-color: $dark-background-color;
|
53
|
+
box-shadow: 0 0 3px 1px #0000005b;
|
51
54
|
}
|
52
55
|
|
53
56
|
.ct-language-selected, .ct-language-dropdown li:hover {
|
54
57
|
background-color: #222 !important;
|
55
58
|
}
|
59
|
+
|
60
|
+
@include media-query($on-laptop) {
|
61
|
+
.menu-icon > svg {
|
62
|
+
fill: rgba($dark-text-color, 80%);
|
63
|
+
}
|
64
|
+
|
65
|
+
.site-nav input:checked ~ .trigger {
|
66
|
+
background-color: #090909;
|
67
|
+
}
|
68
|
+
}
|
56
69
|
}
|
57
70
|
|
58
71
|
.site-footer {
|
@@ -74,7 +87,7 @@ html[data-theme="dark"] {
|
|
74
87
|
|
75
88
|
.pagination {
|
76
89
|
.post-link {
|
77
|
-
color:
|
90
|
+
color: $dark-text-color;
|
78
91
|
}
|
79
92
|
|
80
93
|
.post-title {
|
@@ -171,7 +184,7 @@ html[data-theme="dark"] {
|
|
171
184
|
}
|
172
185
|
|
173
186
|
a {
|
174
|
-
color:
|
187
|
+
color: $dark-text-color;
|
175
188
|
}
|
176
189
|
|
177
190
|
a:hover {
|
data/_sass/yat/_layout.scss
CHANGED
@@ -228,10 +228,10 @@ html {
|
|
228
228
|
}
|
229
229
|
|
230
230
|
.post-tags {
|
231
|
-
display: inline-block;
|
232
231
|
padding-right: 150px;
|
233
232
|
|
234
233
|
.post-tag {
|
234
|
+
display: inline-block;
|
235
235
|
margin: 0 12px 0 0;
|
236
236
|
}
|
237
237
|
}
|
@@ -497,6 +497,7 @@ html {
|
|
497
497
|
@include relative-font-size(1.125);
|
498
498
|
line-height: 15px;
|
499
499
|
color: #666;
|
500
|
+
max-width: 50%;
|
500
501
|
}
|
501
502
|
|
502
503
|
.previous:before {
|
data/assets/js/main.js
CHANGED
@@ -56,32 +56,3 @@ function smoothScrollTo(y, time) {
|
|
56
56
|
}
|
57
57
|
}
|
58
58
|
|
59
|
-
// Init highlight js
|
60
|
-
document.addEventListener('DOMContentLoaded', function(event) {
|
61
|
-
var els = document.querySelectorAll('pre code')
|
62
|
-
function handle(block) {
|
63
|
-
var outer = block.parentElement.parentElement.parentElement;
|
64
|
-
var lang = block.getAttribute('data-lang');
|
65
|
-
for (var i = 0; i < outer.classList.length; i++) {
|
66
|
-
var cls = outer.classList[i];
|
67
|
-
if (cls.startsWith('language-')) {
|
68
|
-
lang = cls;
|
69
|
-
break;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
if (!lang) {
|
73
|
-
cls = block.getAttribute('class');
|
74
|
-
lang = cls ? cls.replace('hljs ', '') : '';
|
75
|
-
}
|
76
|
-
if (lang.startsWith('language-')) {
|
77
|
-
lang = lang.substr(9);
|
78
|
-
}
|
79
|
-
block.setAttribute('class', 'hljs ' + lang);
|
80
|
-
block.parentNode.setAttribute('data-lang', lang);
|
81
|
-
hljs.highlightBlock(block);
|
82
|
-
}
|
83
|
-
for (var i = 0; i < els.length; i++) {
|
84
|
-
var el = els[i];
|
85
|
-
handle(el);
|
86
|
-
}
|
87
|
-
});
|
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.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- README.md
|
152
152
|
- _data/defaults.yml
|
153
153
|
- _data/translate_langs.yml
|
154
|
+
- _includes/extensions/code-highlight.html
|
154
155
|
- _includes/extensions/comments/disqus.html
|
155
156
|
- _includes/extensions/comments/gitment.html
|
156
157
|
- _includes/extensions/geopattern.html
|
@@ -196,6 +197,7 @@ files:
|
|
196
197
|
- _layouts/tags.html
|
197
198
|
- _sass/misc/article-menu.scss
|
198
199
|
- _sass/misc/common-list.scss
|
200
|
+
- _sass/misc/gitment.scss
|
199
201
|
- _sass/misc/google-translate.scss
|
200
202
|
- _sass/misc/theme-toggle.scss
|
201
203
|
- _sass/yat.scss
|
@@ -225,8 +227,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
227
|
- !ruby/object:Gem::Version
|
226
228
|
version: '0'
|
227
229
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
230
|
+
rubygems_version: 3.0.8
|
229
231
|
signing_key:
|
230
232
|
specification_version: 4
|
231
|
-
summary: Yet another theme for elegant writers with modern flat style
|
233
|
+
summary: Yet another theme for elegant writers with modern flat style and beautiful
|
234
|
+
night/dark mode.
|
232
235
|
test_files: []
|