jekyll-theme-yat 1.6.1 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +68 -20
- data/_data/translate_langs.yml +9 -9
- data/_includes/extensions/code-highlight.html +91 -0
- data/_includes/extensions/hashlocate.html +1 -0
- data/_includes/extensions/theme-toggle.html +13 -8
- data/_includes/functions.html +4 -0
- data/_includes/functions/get_article_excerpt.html +39 -0
- data/_includes/functions/get_article_words.html +26 -0
- data/_includes/functions/get_banner.html +68 -0
- data/_includes/functions/get_reading_time.html +10 -2
- data/_includes/functions/get_value.html +38 -15
- data/_includes/head.html +1 -6
- data/_includes/views/banner.html +88 -7
- data/_includes/views/footer.html +1 -1
- data/_includes/views/header.html +2 -5
- data/_includes/views/pagination.html +10 -5
- data/_includes/views/post-header.html +2 -1
- data/_sass/misc/gitment.scss +16 -0
- data/_sass/misc/theme-toggle.scss +3 -3
- data/_sass/yat.scss +4 -4
- data/_sass/yat/_base.scss +4 -18
- data/_sass/yat/_dark.scss +39 -11
- data/_sass/yat/_layout.scss +30 -10
- data/assets/css/main.scss +18 -3
- data/assets/js/main.js +0 -29
- metadata +8 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 68d64a82d730e3929877098dc29bdc3d970d2288d7d0a6a822bb6ea665cbfc79
|
4
|
+
data.tar.gz: 43f608c27d246a32ccb0ff3d8b6f7cbc28f836d280357e60594b1253a98a8bf5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c66e47b39750dbf0a1399362a9c04b98c62df4ee0590c2973a4ea6ad80729289e8a311c064ad3458114b9c73b4205ab7f8aa6cea4a7b75441e7f2397e5de2b9
|
7
|
+
data.tar.gz: e752d272ca91ec205e97ac5ea77fab2bc2e007b3ea385612ac94d24546afc6ec3e51aad3571a1fd032b4205d752d0fa55dd206e95e6fed708d519c33f6cbdfd3
|
data/README.md
CHANGED
@@ -1,15 +1,62 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<div align="center">
|
2
|
+
<br>
|
3
|
+
|
4
|
+
<a href="https://github.com/jeffreytse/jekyll-theme-yat">
|
5
|
+
<img alt="jekyll-theme-yat →~ jekyll" src="https://user-images.githubusercontent.com/9413601/106478481-346fdf00-64e4-11eb-9385-1ab5329c3234.png" width="600">
|
6
|
+
</a>
|
7
|
+
|
8
|
+
<h1>🎨 JEKYLL YAT THEME 🎨</h1>
|
9
|
+
|
10
|
+
</div>
|
11
|
+
|
12
|
+
<h4 align="center">
|
13
|
+
<a href="https://jekyllrb.com/" target="_blank"><code>Jekyll</code></a> theme for elegant writers.
|
14
|
+
</h4>
|
15
|
+
|
16
|
+
<p align="center">
|
17
|
+
<a href="https://jeffreytse.github.io/jekyll-theme-yat">
|
18
|
+
<img src="https://github.com/jeffreytse/jekyll-theme-yat/workflows/Github%20Pages/badge.svg"
|
19
|
+
alt="Github Pages" />
|
20
|
+
</a>
|
21
|
+
|
22
|
+
<a href="http://badge.fury.io/rb/jekyll-theme-yat">
|
23
|
+
<img src="https://badge.fury.io/rb/jekyll-theme-yat.svg"
|
24
|
+
alt="Gem Version" />
|
25
|
+
</a>
|
26
|
+
|
27
|
+
<a href="https://opensource.org/licenses/MIT">
|
28
|
+
<img src="https://img.shields.io/badge/License-MIT-brightgreen.svg"
|
29
|
+
alt="License: MIT" />
|
30
|
+
</a>
|
31
|
+
|
32
|
+
<a href="https://liberapay.com/jeffreytse">
|
33
|
+
<img src="http://img.shields.io/liberapay/goal/jeffreytse.svg?logo=liberapay"
|
34
|
+
alt="Donate (Liberapay)" />
|
35
|
+
</a>
|
36
|
+
|
37
|
+
<a href="https://patreon.com/jeffreytse">
|
38
|
+
<img src="https://img.shields.io/badge/support-patreon-F96854.svg?style=flat-square"
|
39
|
+
alt="Donate (Patreon)" />
|
40
|
+
</a>
|
41
|
+
|
42
|
+
<a href="https://ko-fi.com/jeffreytse">
|
8
43
|
<img height="20" src="https://www.ko-fi.com/img/githubbutton_sm.svg"
|
9
|
-
|
10
|
-
</a>
|
44
|
+
alt="Donate (Ko-fi)" />
|
45
|
+
</a>
|
46
|
+
</p>
|
47
|
+
|
48
|
+
<div align="center">
|
49
|
+
<sub>Built with ❤︎ by
|
50
|
+
<a href="https://jeffreytse.net">jeffreytse</a> and
|
51
|
+
<a href="https://github.com/jeffreytse/jekyll-theme-yat/graphs/contributors">contributors </a>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<br>
|
11
55
|
|
12
|
-
Hey, nice to meet you, you found this Jekyll theme. Here the
|
56
|
+
Hey, nice to meet you, you found this [Jekyll][jekyll] theme. Here the
|
57
|
+
**Yet Another Theme** is a modern responsive theme, and it's quiet clear,
|
58
|
+
clean and neat for writers and posts. **If you like the theme, give it
|
59
|
+
a star!**
|
13
60
|
|
14
61
|
|
15
62
|
<p align="center">
|
@@ -18,7 +65,7 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
18
65
|
|
19
66
|
</p>
|
20
67
|
|
21
|
-
<h3 align="center"
|
68
|
+
<h3 align="center">🌌 Night Mode</h3>
|
22
69
|
|
23
70
|
<p align="center">
|
24
71
|
|
@@ -26,12 +73,13 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
26
73
|
|
27
74
|
</p>
|
28
75
|
|
29
|
-
## Features
|
76
|
+
## ✨ Features
|
30
77
|
|
31
78
|
- Support beautiful __Night Mode__.
|
79
|
+
- Modern responsive web design.
|
32
80
|
- Full layouts `home`, `post`, `tags`, `archive` and `about`.
|
33
81
|
- Uses font awesome 5 for icons.
|
34
|
-
- Beautiful Syntax Highlight using [
|
82
|
+
- Beautiful Syntax Highlight using [highlight.js][highlight-js].
|
35
83
|
- RSS support using [Jekyll Feed][jekyll-feed] gem.
|
36
84
|
- Optimized for search engines using [Jekyll Seo Tag][jekyll-seo-tag] gem.
|
37
85
|
- Sitemap support using [Jekyll Sitemap][jekyll-sitemap] gem.
|
@@ -44,7 +92,7 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
44
92
|
|
45
93
|
Also, visit the [Live Demo][yat-live-demo] site for the theme.
|
46
94
|
|
47
|
-
## Installation
|
95
|
+
## 🛠️ Installation
|
48
96
|
|
49
97
|
There are three ways to install:
|
50
98
|
|
@@ -103,7 +151,7 @@ And then execute:
|
|
103
151
|
$ bundle
|
104
152
|
```
|
105
153
|
|
106
|
-
|
154
|
+
### GitHub Pages without limitation
|
107
155
|
|
108
156
|
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__.
|
109
157
|
|
@@ -112,11 +160,11 @@ To use the third-party gem in GitHub Pages without limitation:
|
|
112
160
|
Here is a GitHub Action named [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) for Jekyll site deployment conveniently. 👍
|
113
161
|
|
114
162
|
|
115
|
-
## Usage
|
163
|
+
## 📚 Usage
|
116
164
|
|
117
165
|
Add or update your available layouts, includes, sass and/or assets.
|
118
166
|
|
119
|
-
## Development
|
167
|
+
## ✏️ Development
|
120
168
|
|
121
169
|
To set up your environment to develop this theme, run `bundle install`.
|
122
170
|
|
@@ -125,13 +173,13 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
|
|
125
173
|
When your theme is released, only the files in `_data`, `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
126
174
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-yat.gemspec` accordingly.
|
127
175
|
|
128
|
-
## Contributing
|
176
|
+
## 🔫 Contributing
|
129
177
|
|
130
178
|
Issues and Pull Requests are greatly appreciated. If you've never contributed to an open source project before I'm more than happy to walk you through how to create a pull request.
|
131
179
|
|
132
180
|
You can start by [opening an issue](https://github.com/jeffreytse/jekyll-theme-yat/issues/new) describing the problem that you're looking to resolve and we'll go from there.
|
133
181
|
|
134
|
-
## License
|
182
|
+
## 🌈 License
|
135
183
|
|
136
184
|
This theme is licensed under the [MIT license](https://opensource.org/licenses/mit-license.php) © JeffreyTse.
|
137
185
|
|
@@ -143,4 +191,4 @@ This theme is licensed under the [MIT license](https://opensource.org/licenses/m
|
|
143
191
|
[jekyll-seo-tag]: https://github.com/jekyll/jekyll-seo-tag
|
144
192
|
[jekyll-sitemap]: https://github.com/jekyll/jekyll-sitemap
|
145
193
|
[jekyll-feed]: https://github.com/jekyll/jekyll-feed
|
146
|
-
[
|
194
|
+
[highlight-js]: https://github.com/highlightjs/highlight.js
|
data/_data/translate_langs.yml
CHANGED
@@ -2,25 +2,25 @@
|
|
2
2
|
# langs refer to https://cloud.google.com/translate/docs/languages
|
3
3
|
|
4
4
|
- lang: en
|
5
|
-
img: https://
|
5
|
+
img: https://cdn.countryflags.com/thumbs/united-states-of-america/flag-400.png
|
6
6
|
text: English
|
7
7
|
|
8
8
|
- lang: fr
|
9
|
-
img: https://
|
10
|
-
text:
|
9
|
+
img: https://cdn.countryflags.com/thumbs/france/flag-400.png
|
10
|
+
text: French
|
11
11
|
|
12
12
|
- lang: zh-CN
|
13
|
-
img: https://
|
13
|
+
img: https://cdn.countryflags.com/thumbs/china/flag-400.png
|
14
14
|
text: Chinese(Simple)
|
15
15
|
|
16
16
|
- lang: ja
|
17
|
-
img: https://
|
18
|
-
text:
|
17
|
+
img: https://cdn.countryflags.com/thumbs/japan/flag-400.png
|
18
|
+
text: Japanese
|
19
19
|
|
20
20
|
- lang: ko
|
21
|
-
img: https://
|
21
|
+
img: https://cdn.countryflags.com/thumbs/south-korea/flag-400.png
|
22
22
|
text: Korean
|
23
23
|
|
24
24
|
- lang: ru
|
25
|
-
img: https://
|
26
|
-
text:
|
25
|
+
img: https://cdn.countryflags.com/thumbs/russia/flag-400.png
|
26
|
+
text: Russian
|
@@ -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>
|
@@ -17,18 +17,22 @@
|
|
17
17
|
(function() {
|
18
18
|
var sw = document.getElementById('theme-switch');
|
19
19
|
var html = document.getElementsByTagName('html')[0];
|
20
|
+
var nightModeOption = ('{{ night_mode }}' || 'auto').toLowerCase();
|
21
|
+
var storage = nightModeOption === 'manual'
|
22
|
+
? localStorage
|
23
|
+
: sessionStorage;
|
20
24
|
var themeData = loadThemeData();
|
21
25
|
|
22
26
|
function saveThemeData(data) {
|
23
|
-
|
27
|
+
storage.setItem('theme', JSON.stringify(data));
|
24
28
|
}
|
25
29
|
|
26
30
|
function loadThemeData() {
|
27
|
-
var data =
|
31
|
+
var data = storage.getItem('theme');
|
28
32
|
try {
|
29
33
|
data = JSON.parse(data ? data : '');
|
30
34
|
} catch(e) {
|
31
|
-
data = { nightShift:
|
35
|
+
data = { nightShift: undefined, autoToggleAt: 0 };
|
32
36
|
saveThemeData(data);
|
33
37
|
}
|
34
38
|
return data;
|
@@ -81,9 +85,6 @@
|
|
81
85
|
handleThemeToggle(event.target.checked);
|
82
86
|
});
|
83
87
|
|
84
|
-
var nightModeOption = '{{ night_mode }}';
|
85
|
-
nightModeOption = nightModeOption.toLowerCase();
|
86
|
-
|
87
88
|
if (nightModeOption == 'auto') {
|
88
89
|
var data = autoThemeToggle();
|
89
90
|
|
@@ -94,10 +95,14 @@
|
|
94
95
|
} else {
|
95
96
|
handleThemeToggle(themeData.nightShift);
|
96
97
|
}
|
97
|
-
} else if (nightModeOption == '
|
98
|
+
} else if (nightModeOption == 'manual') {
|
98
99
|
handleThemeToggle(themeData.nightShift);
|
99
100
|
} else {
|
100
|
-
|
101
|
+
var nightShift = themeData.nightShift;
|
102
|
+
if (nightShift === undefined) {
|
103
|
+
nightShift = nightModeOption === 'on';
|
104
|
+
}
|
105
|
+
handleThemeToggle(nightShift);
|
101
106
|
}
|
102
107
|
})();
|
103
108
|
</script>
|
data/_includes/functions.html
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
{% if include.params.article %}
|
2
|
+
{% assign article = include.params.article %}
|
3
|
+
{% endif %}
|
4
|
+
|
5
|
+
{% if include.params.lang %}
|
6
|
+
{% assign lang = include.params.lang %}
|
7
|
+
{% else %}
|
8
|
+
{% assign lang = lang | default: site.lang | default: "en" %}
|
9
|
+
{% endif %}
|
10
|
+
|
11
|
+
{% if include.params.excerpt_size %}
|
12
|
+
{% assign excerpt_size = include.params.excerpt_size %}
|
13
|
+
{% else %}
|
14
|
+
{% assign excerpt_size = excerpt_size
|
15
|
+
| default: site.excerpt_size
|
16
|
+
| default: 350 %}
|
17
|
+
{% endif %}
|
18
|
+
|
19
|
+
{%- include functions.html func='get_article_words' -%}
|
20
|
+
{% assign words = return %}
|
21
|
+
|
22
|
+
{% assign _article = article | strip_html %}
|
23
|
+
{% assign _words = _article | size %}
|
24
|
+
|
25
|
+
{% assign _size = excerpt_size %}
|
26
|
+
|
27
|
+
{% if lang != "en" %}
|
28
|
+
{% assign _size = words
|
29
|
+
| times: 1.0
|
30
|
+
| divided_by: _words
|
31
|
+
| times: _size
|
32
|
+
| round %}
|
33
|
+
{% endif %}
|
34
|
+
|
35
|
+
{% if _size > excerpt_size %}
|
36
|
+
{% assign _size = excerpt_size %}
|
37
|
+
{% endif %}
|
38
|
+
|
39
|
+
{% assign return = _article | truncate: _size %}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{% if include.params.article %}
|
2
|
+
{% assign article = include.params.article %}
|
3
|
+
{% endif %}
|
4
|
+
|
5
|
+
{% if include.params.lang %}
|
6
|
+
{% assign lang = include.params.lang %}
|
7
|
+
{% else %}
|
8
|
+
{% assign lang = lang | default: site.lang | default: "en" %}
|
9
|
+
{% endif %}
|
10
|
+
|
11
|
+
{% assign words = article | number_of_words %}
|
12
|
+
|
13
|
+
{% if lang != "en" %}
|
14
|
+
{% assign words = words
|
15
|
+
| times: 0.6
|
16
|
+
| round %}
|
17
|
+
{% assign words = article
|
18
|
+
| strip_html
|
19
|
+
| strip_newlines
|
20
|
+
| size
|
21
|
+
| times: 0.4
|
22
|
+
| plus: words
|
23
|
+
| round %}
|
24
|
+
{% endif %}
|
25
|
+
|
26
|
+
{% assign return = words %}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
{%- include functions.html func='log' level='debug' msg='Get banner value' -%}
|
2
|
+
{% assign name = 'banner' %}
|
3
|
+
{%- include functions.html func='get_value' -%}
|
4
|
+
{% assign banner = return %}
|
5
|
+
|
6
|
+
{%- if banner.first -%}
|
7
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_image value' -%}
|
8
|
+
{% assign name = 'banner.image' %}
|
9
|
+
{%- include functions.html func='get_value' -%}
|
10
|
+
{% assign banner_image = return | relative_url %}
|
11
|
+
{%- else -%}
|
12
|
+
{% assign banner_image = banner | relative_url %}
|
13
|
+
{%- endif -%}
|
14
|
+
|
15
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_background value' -%}
|
16
|
+
{% assign name = 'banner.background' %}
|
17
|
+
{%- include functions.html func='get_value' -%}
|
18
|
+
{% assign banner_background = return %}
|
19
|
+
|
20
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_opacity value' -%}
|
21
|
+
{% assign name = 'banner.opacity' %}
|
22
|
+
{%- include functions.html func='get_value' -%}
|
23
|
+
{% assign banner_opacity = return %}
|
24
|
+
|
25
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_height value' -%}
|
26
|
+
{% assign name = 'banner.height' %}
|
27
|
+
{%- include functions.html func='get_value' -%}
|
28
|
+
{% assign banner_height = return %}
|
29
|
+
|
30
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_min_height value' -%}
|
31
|
+
{% assign name = 'banner.min_height' %}
|
32
|
+
{%- include functions.html func='get_value' -%}
|
33
|
+
{% assign banner_min_height = return %}
|
34
|
+
|
35
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_heading_style value' -%}
|
36
|
+
{% assign name = 'banner.heading_style' %}
|
37
|
+
{%- include functions.html func='get_value' -%}
|
38
|
+
{% assign banner_heading_style = return %}
|
39
|
+
|
40
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_subheading_style value' -%}
|
41
|
+
{% assign name = 'banner.subheading_style' %}
|
42
|
+
{%- include functions.html func='get_value' -%}
|
43
|
+
{% assign banner_subheading_style = return %}
|
44
|
+
|
45
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_video value' -%}
|
46
|
+
{% assign name = 'banner.video' %}
|
47
|
+
{%- include functions.html func='get_value' -%}
|
48
|
+
{% assign banner_video = return %}
|
49
|
+
|
50
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_loop value' -%}
|
51
|
+
{% assign name = 'banner.loop' %}
|
52
|
+
{%- include functions.html func='get_value' default=true -%}
|
53
|
+
{% assign banner_loop = return %}
|
54
|
+
|
55
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_volume value' -%}
|
56
|
+
{% assign name = 'banner.volume' %}
|
57
|
+
{%- include functions.html func='get_value' default=0 -%}
|
58
|
+
{% assign banner_volume = return %}
|
59
|
+
|
60
|
+
{%- include functions.html func='log' level='debug' msg='Get banner_start_at value' -%}
|
61
|
+
{% assign name = 'banner.start_at' %}
|
62
|
+
{%- include functions.html func='get_value' default=0 -%}
|
63
|
+
{% assign banner_start_at = return %}
|
64
|
+
|
65
|
+
{% if banner_image or banner_video %}
|
66
|
+
{% assign has_banner = true %}
|
67
|
+
{% endif %}
|
68
|
+
|
@@ -2,14 +2,22 @@
|
|
2
2
|
{% assign article = include.params.article %}
|
3
3
|
{% endif %}
|
4
4
|
|
5
|
+
{% if include.params.lang %}
|
6
|
+
{% assign lang = include.params.lang %}
|
7
|
+
{% else %}
|
8
|
+
{% assign lang = lang | default: site.lang | default: "en" %}
|
9
|
+
{% endif %}
|
10
|
+
|
5
11
|
{% if include.params.speed %}
|
6
12
|
{% assign speed = include.params.speed %}
|
7
13
|
{% else %}
|
8
14
|
{% assign speed = 160 %}
|
9
15
|
{% endif %}
|
10
16
|
|
11
|
-
{
|
12
|
-
|
17
|
+
{%- include functions.html func='get_article_words' -%}
|
18
|
+
{% assign words = return %}
|
19
|
+
|
20
|
+
{% assign total_mins = words
|
13
21
|
| divided_by: speed
|
14
22
|
| at_least: 1 %}
|
15
23
|
|
@@ -2,18 +2,41 @@
|
|
2
2
|
{%- assign name = include.params.name -%}
|
3
3
|
{%- endif -%}
|
4
4
|
|
5
|
-
{%-
|
6
|
-
|
7
|
-
{%-
|
8
|
-
|
9
|
-
{%-
|
10
|
-
|
11
|
-
{%-
|
12
|
-
|
13
|
-
{%-
|
14
|
-
|
15
|
-
{%-
|
16
|
-
|
17
|
-
{%-
|
18
|
-
|
19
|
-
{%-
|
5
|
+
{%- assign return = nil -%}
|
6
|
+
|
7
|
+
{%- assign keys = name | split:'.' -%}
|
8
|
+
{%- assign name = keys.first -%}
|
9
|
+
{%- assign keys = keys | shift -%}
|
10
|
+
|
11
|
+
{%- for step in (1..7) -%}
|
12
|
+
|
13
|
+
{%- case step -%}
|
14
|
+
{%- when 1 -%}
|
15
|
+
{%- assign return = page[name] -%}
|
16
|
+
{%- when 2 -%}
|
17
|
+
{%- assign return = site[name] -%}
|
18
|
+
{%- when 3 -%}
|
19
|
+
{%- assign return = site.data[name] -%}
|
20
|
+
{%- when 4 -%}
|
21
|
+
{%- assign return = site.defaults[page.layout][name] -%}
|
22
|
+
{%- when 5 -%}
|
23
|
+
{%- assign return = site.data.defaults[page.layout][name] -%}
|
24
|
+
{%- when 6 -%}
|
25
|
+
{%- assign return = layout[name] -%}
|
26
|
+
{%- else -%}
|
27
|
+
{%- assign return = include.params.default -%}
|
28
|
+
{%- endcase -%}
|
29
|
+
|
30
|
+
{%- for key in keys -%}
|
31
|
+
{%- assign return = return[key] -%}
|
32
|
+
{%- if return == nil -%}
|
33
|
+
{%- break -%}
|
34
|
+
{%- endif -%}
|
35
|
+
{%- endfor -%}
|
36
|
+
|
37
|
+
{%- if return != nil -%}
|
38
|
+
{%- break -%}
|
39
|
+
{%- endif -%}
|
40
|
+
|
41
|
+
{%- endfor -%}
|
42
|
+
|
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/banner.html
CHANGED
@@ -3,11 +3,6 @@
|
|
3
3
|
{%- include functions.html func='get_value' -%}
|
4
4
|
{% assign banner_html = return %}
|
5
5
|
|
6
|
-
{%- include functions.html func='log' level='debug' msg='Get banner value' -%}
|
7
|
-
{% assign name = 'banner' %}
|
8
|
-
{%- include functions.html func='get_value' -%}
|
9
|
-
{% assign banner = return %}
|
10
|
-
|
11
6
|
{%- include functions.html func='log' level='debug' msg='Get heading value' -%}
|
12
7
|
{% assign name = 'heading' %}
|
13
8
|
{%- include functions.html func='get_value' -%}
|
@@ -18,10 +13,96 @@
|
|
18
13
|
{%- include functions.html func='get_value' -%}
|
19
14
|
{% assign subheading = return %}
|
20
15
|
|
21
|
-
{
|
16
|
+
{%- include functions.html func='get_banner' -%}
|
17
|
+
|
18
|
+
{%- if has_banner -%}
|
19
|
+
{%- if banner_background -%}
|
20
|
+
<style>
|
21
|
+
html .page-banner {
|
22
|
+
background: {{ banner_background }};
|
23
|
+
}
|
24
|
+
</style>
|
25
|
+
{%- endif -%}
|
26
|
+
{%- if banner_height -%}
|
27
|
+
<style>
|
28
|
+
{%- assign num = banner_height | times: 1 -%}
|
29
|
+
{%- assign unit = banner_height | replace_first: num -%}
|
30
|
+
{%- assign banner_min_height = banner_min_height | default: banner_height -%}
|
31
|
+
html .page-banner {
|
32
|
+
height: {{ banner_height | times: 0.368 | append: unit }};
|
33
|
+
min-height: {{ banner_min_height }};
|
34
|
+
}
|
35
|
+
html[data-scroll-status="top"] .page-banner {
|
36
|
+
height: {{ banner_height }};
|
37
|
+
}
|
38
|
+
</style>
|
39
|
+
{%- endif -%}
|
40
|
+
|
41
|
+
{%- if banner_opacity -%}
|
42
|
+
<style>
|
43
|
+
html .page-banner .page-banner-img > *:first-child {
|
44
|
+
opacity: {{ banner_opacity }};
|
45
|
+
}
|
46
|
+
|
47
|
+
html[data-theme="dark"] .page-banner .page-banner-img > *:first-child {
|
48
|
+
opacity: {{ banner_opacity | times: 0.718 }};
|
49
|
+
}
|
50
|
+
</style>
|
51
|
+
{%- endif -%}
|
52
|
+
{%- if banner_heading_style -%}
|
53
|
+
<style>
|
54
|
+
html .page-banner .page-banner-inner > *:first-child > *:nth-child(1) {
|
55
|
+
{{ banner_heading_style }}
|
56
|
+
}
|
57
|
+
</style>
|
58
|
+
{%- endif -%}
|
59
|
+
{%- if banner_subheading_style -%}
|
60
|
+
<style>
|
61
|
+
html .page-banner .page-banner-inner > *:first-child > *:nth-child(2) {
|
62
|
+
{{ banner_subheading_style }}
|
63
|
+
}
|
64
|
+
</style>
|
65
|
+
{%- endif -%}
|
22
66
|
<section class="page-banner">
|
23
67
|
<div class="page-banner-img">
|
24
|
-
|
68
|
+
{%- if banner_video -%}
|
69
|
+
<video
|
70
|
+
autoplay=""
|
71
|
+
poster="{{ banner_image }}"
|
72
|
+
playsinline
|
73
|
+
>
|
74
|
+
<source src="{{ banner_video }}">
|
75
|
+
</video>
|
76
|
+
<script>
|
77
|
+
(function() {
|
78
|
+
var video = document.querySelector('.page-banner .page-banner-img > video');
|
79
|
+
var videoPlay = function() {
|
80
|
+
video.play().catch (function() {
|
81
|
+
video.muted = true;
|
82
|
+
video.play();
|
83
|
+
});
|
84
|
+
}
|
85
|
+
|
86
|
+
video.onloadstart = function() {
|
87
|
+
video.currentTime = {{ banner_start_at }};
|
88
|
+
video.volume = {{ banner_volume }};
|
89
|
+
video.muted = (video.volume == 0);
|
90
|
+
videoPlay();
|
91
|
+
}
|
92
|
+
|
93
|
+
video.onended = function() {
|
94
|
+
video.currentTime = {{ banner_start_at }};
|
95
|
+
video.volume = 0;
|
96
|
+
{%- if banner_loop -%}
|
97
|
+
video.play();
|
98
|
+
{%- endif -%}
|
99
|
+
}
|
100
|
+
})();
|
101
|
+
</script>
|
102
|
+
{%- else -%}
|
103
|
+
<div style="background-image: url({{ banner_image }})"></div>
|
104
|
+
<img class="img-placeholder" src="{{ banner_image }}">
|
105
|
+
{%- endif -%}
|
25
106
|
</div>
|
26
107
|
<div class="wrapper">
|
27
108
|
<div class="page-banner-inner">
|
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>
|
data/_includes/views/header.html
CHANGED
@@ -1,15 +1,12 @@
|
|
1
1
|
|
2
|
-
{%- include functions.html func='
|
3
|
-
{%- assign name = 'banner' -%}
|
4
|
-
{%- include functions.html func='get_value' -%}
|
5
|
-
{% assign banner = return %}
|
2
|
+
{%- include functions.html func='get_banner' -%}
|
6
3
|
|
7
4
|
{%- include functions.html func='log' level='debug' msg='Get header_transparent value' -%}
|
8
5
|
{%- assign name = 'header_transparent' -%}
|
9
6
|
{%- include functions.html func='get_value' default=true -%}
|
10
7
|
{%- assign header_transparent = return -%}
|
11
8
|
|
12
|
-
{%- if
|
9
|
+
{%- if has_banner and header_transparent -%}
|
13
10
|
{%- assign header_transparent_class = "site-header-transparent" -%}
|
14
11
|
{%- endif -%}
|
15
12
|
|
@@ -13,11 +13,14 @@
|
|
13
13
|
{%- assign date_format = site.yat.date_format | default: "%b %-d, %Y" -%}
|
14
14
|
|
15
15
|
{% assign article = post.content %}
|
16
|
+
{% assign lang = post.lang %}
|
16
17
|
{%- include functions.html func='get_reading_time' -%}
|
17
18
|
{% assign reading_time = return %}
|
19
|
+
{%- include functions.html func='get_article_excerpt' -%}
|
20
|
+
{% assign excerpt = return %}
|
21
|
+
{%- assign post_url = post.url | relative_url -%}
|
18
22
|
|
19
23
|
<h2 class="post-title">
|
20
|
-
{%- assign post_url = post.url | relative_url -%}
|
21
24
|
<a class="post-link" href="{{ post_url }}">
|
22
25
|
{{ post.title | escape }}
|
23
26
|
</a>
|
@@ -26,12 +29,14 @@
|
|
26
29
|
<span class="post-date"><i class="fa fa-calendar"></i> {{ post.date | date: date_format }}</span>
|
27
30
|
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
|
28
31
|
</div>
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
+
<a class="post-excerpt" href="{{ post_url }}">
|
33
|
+
<p>
|
34
|
+
{{ excerpt }} <span class="read_more">Read More</span>
|
35
|
+
</p>
|
36
|
+
</a>
|
32
37
|
<div class="post-tags">
|
33
38
|
{%- for tag in post.tags -%}
|
34
|
-
<a class="post-tag" href="/tags.html#{{tag}}">#{{tag}}</a>
|
39
|
+
<a class="post-tag" href="{{ '/tags.html ' | relative_url }}#{{tag}}">#{{tag}}</a>
|
35
40
|
{%- endfor -%}
|
36
41
|
</div>
|
37
42
|
</li>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<header class="post-header">
|
2
2
|
<h1 class="post-title p-name" itemprop="name headline">{{ heading | default: page.title | escape }}</h1>
|
3
|
-
<
|
3
|
+
<h2 class="post-subtitle">{{ subheading | default: page.subtitle | escape }}</h2>
|
4
4
|
|
5
5
|
<p class="post-meta">
|
6
6
|
<time class="dt-published" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
|
@@ -9,6 +9,7 @@
|
|
9
9
|
</time>
|
10
10
|
|
11
11
|
{% assign article = page.content %}
|
12
|
+
{% assign lang = page.lang %}
|
12
13
|
{%- include functions.html func='get_reading_time' -%}
|
13
14
|
{% assign reading_time = return %}
|
14
15
|
<span class="post-reading-time left-vsplit"><i class="fa fa-clock-o"></i> {{ reading_time }}</span>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
.gitment-container {
|
2
|
+
color: #787878 !important;
|
3
|
+
}
|
4
|
+
|
5
|
+
.gitment-editor-header {
|
6
|
+
background-color: #fefefe;
|
7
|
+
}
|
8
|
+
|
9
|
+
.gitment-comment-main, .gitment-editor-main {
|
10
|
+
background-color: #fff;
|
11
|
+
border-radius: 3px !important;
|
12
|
+
}
|
13
|
+
|
14
|
+
.gitment-heart-icon {
|
15
|
+
fill: #ff0808;
|
16
|
+
}
|
@@ -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
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
// Define defaults for each variable.
|
4
4
|
|
5
|
-
$base-font-family:
|
5
|
+
$base-font-family: Helvetica, Arial, Oswald, sans-serif, !default;
|
6
6
|
$base-font-size: 14px !default;
|
7
7
|
$base-font-weight: 400 !default;
|
8
8
|
$small-font-size: $base-font-size * 0.875 !default;
|
@@ -10,9 +10,8 @@ $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
|
-
$brand-color: #ff5100 !default;
|
16
15
|
|
17
16
|
$grey-color: #828282 !default;
|
18
17
|
$grey-color-light: lighten($grey-color, 40%) !default;
|
@@ -65,5 +64,6 @@ $on-laptop: 800px !default;
|
|
65
64
|
"misc/theme-toggle",
|
66
65
|
"misc/article-menu",
|
67
66
|
"misc/common-list",
|
68
|
-
"misc/google-translate"
|
67
|
+
"misc/google-translate",
|
68
|
+
"misc/gitment"
|
69
69
|
;
|
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,32 +1,49 @@
|
|
1
1
|
$dark-background-color: #0e0e0e !default;
|
2
|
+
$dark-text-color: #bbb !default;
|
2
3
|
|
3
4
|
html[data-theme="dark"] {
|
4
|
-
|
5
5
|
&[data-scroll-status='top'] {
|
6
|
-
.site-
|
7
|
-
|
8
|
-
|
6
|
+
header.site-header-transparent {
|
7
|
+
&.site-header {
|
8
|
+
@include media-query($on-laptop) {
|
9
|
+
.page-link {
|
10
|
+
color: #f8f8f8;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
footer.site-footer {
|
17
|
+
.site-footer-inner {
|
18
|
+
border-top: solid 1px #2f2f2f !important;
|
19
|
+
transition: 0s;
|
20
|
+
}
|
9
21
|
}
|
10
22
|
}
|
11
23
|
|
12
24
|
body {
|
13
|
-
color:
|
25
|
+
color: $dark-text-color;
|
14
26
|
background-color: $dark-background-color;
|
15
27
|
}
|
16
28
|
|
17
29
|
*:not(pre) > code {
|
18
|
-
|
30
|
+
color: $dark-text-color;
|
31
|
+
background-color: #454545;
|
32
|
+
}
|
33
|
+
|
34
|
+
blockquote {
|
35
|
+
border-left: 4px solid #484848;
|
19
36
|
}
|
20
37
|
|
21
38
|
table {
|
22
39
|
color: #9d9d9d;
|
23
40
|
|
24
41
|
th {
|
25
|
-
background-color: #
|
42
|
+
background-color: #050505;
|
26
43
|
}
|
27
44
|
|
28
45
|
tr:nth-child(even) {
|
29
|
-
background-color: #
|
46
|
+
background-color: #080808;
|
30
47
|
}
|
31
48
|
}
|
32
49
|
|
@@ -48,11 +65,22 @@ html[data-theme="dark"] {
|
|
48
65
|
.ct-language-dropdown {
|
49
66
|
color: #f8f8f8;
|
50
67
|
background-color: $dark-background-color;
|
68
|
+
box-shadow: 0 0 3px 1px #0000005b;
|
51
69
|
}
|
52
70
|
|
53
71
|
.ct-language-selected, .ct-language-dropdown li:hover {
|
54
72
|
background-color: #222 !important;
|
55
73
|
}
|
74
|
+
|
75
|
+
@include media-query($on-laptop) {
|
76
|
+
.menu-icon > svg {
|
77
|
+
fill: rgba($dark-text-color, 80%);
|
78
|
+
}
|
79
|
+
|
80
|
+
.site-nav input:checked ~ .trigger {
|
81
|
+
background-color: #090909;
|
82
|
+
}
|
83
|
+
}
|
56
84
|
}
|
57
85
|
|
58
86
|
.site-footer {
|
@@ -67,14 +95,14 @@ html[data-theme="dark"] {
|
|
67
95
|
.page-banner {
|
68
96
|
.page-banner-img {
|
69
97
|
& > *:first-child {
|
70
|
-
opacity: 0.
|
98
|
+
opacity: 0.718;
|
71
99
|
}
|
72
100
|
}
|
73
101
|
}
|
74
102
|
|
75
103
|
.pagination {
|
76
104
|
.post-link {
|
77
|
-
color:
|
105
|
+
color: $dark-text-color;
|
78
106
|
}
|
79
107
|
|
80
108
|
.post-title {
|
@@ -171,7 +199,7 @@ html[data-theme="dark"] {
|
|
171
199
|
}
|
172
200
|
|
173
201
|
a {
|
174
|
-
color:
|
202
|
+
color: $dark-text-color;
|
175
203
|
}
|
176
204
|
|
177
205
|
a:hover {
|
data/_sass/yat/_layout.scss
CHANGED
@@ -23,7 +23,7 @@ html {
|
|
23
23
|
|
24
24
|
@include media-query($on-laptop) {
|
25
25
|
.page-link {
|
26
|
-
color:
|
26
|
+
color: $header-text-color;
|
27
27
|
}
|
28
28
|
|
29
29
|
.menu-icon {
|
@@ -36,6 +36,7 @@ html {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
footer.site-footer {
|
39
|
+
color: unset;
|
39
40
|
background-color: transparent;
|
40
41
|
|
41
42
|
.site-footer-inner {
|
@@ -228,10 +229,10 @@ html {
|
|
228
229
|
}
|
229
230
|
|
230
231
|
.post-tags {
|
231
|
-
display: inline-block;
|
232
232
|
padding-right: 150px;
|
233
233
|
|
234
234
|
.post-tag {
|
235
|
+
display: inline-block;
|
235
236
|
margin: 0 12px 0 0;
|
236
237
|
}
|
237
238
|
}
|
@@ -274,7 +275,7 @@ html {
|
|
274
275
|
}
|
275
276
|
|
276
277
|
.post-title {
|
277
|
-
margin-bottom:
|
278
|
+
margin-bottom: $spacing-unit * 0.2;
|
278
279
|
transition: 0.2s all;
|
279
280
|
|
280
281
|
a {
|
@@ -306,9 +307,9 @@ html {
|
|
306
307
|
}
|
307
308
|
|
308
309
|
.post-link {
|
309
|
-
@include relative-font-size(1.
|
310
|
+
@include relative-font-size(1.65);
|
310
311
|
font-weight: $base-font-weight * 1.5;
|
311
|
-
color: #
|
312
|
+
color: #333;
|
312
313
|
}
|
313
314
|
|
314
315
|
.post-excerpt {
|
@@ -379,7 +380,11 @@ html {
|
|
379
380
|
border-bottom: 1px solid #ebebeb;
|
380
381
|
|
381
382
|
.post-title {
|
382
|
-
margin-bottom:
|
383
|
+
margin-bottom: 6px;
|
384
|
+
}
|
385
|
+
|
386
|
+
.post-subtitle {
|
387
|
+
font-weight: lighter;
|
383
388
|
}
|
384
389
|
|
385
390
|
.post-meta {
|
@@ -497,6 +502,7 @@ html {
|
|
497
502
|
@include relative-font-size(1.125);
|
498
503
|
line-height: 15px;
|
499
504
|
color: #666;
|
505
|
+
max-width: 50%;
|
500
506
|
}
|
501
507
|
|
502
508
|
.previous:before {
|
@@ -568,6 +574,15 @@ html {
|
|
568
574
|
@include center-image;
|
569
575
|
transition: 0.1s all ease-in-out;
|
570
576
|
}
|
577
|
+
|
578
|
+
& > video {
|
579
|
+
width: 100vw;
|
580
|
+
object-fit: cover;
|
581
|
+
}
|
582
|
+
|
583
|
+
& > img.img-placeholder {
|
584
|
+
display: none;
|
585
|
+
}
|
571
586
|
}
|
572
587
|
|
573
588
|
.wrapper {
|
@@ -587,18 +602,23 @@ html {
|
|
587
602
|
> :nth-child(1) {
|
588
603
|
@include relative-font-size(3.9);
|
589
604
|
letter-spacing: -1px;
|
590
|
-
margin-bottom:
|
605
|
+
margin-bottom: 0.1em;
|
591
606
|
font-weight: normal;
|
592
607
|
transition: 0.2s all;
|
593
608
|
|
594
609
|
@include media-query($on-palm) {
|
595
|
-
@include relative-font-size(
|
610
|
+
@include relative-font-size(1.975);
|
596
611
|
}
|
597
612
|
}
|
598
613
|
|
599
614
|
> :nth-child(2) {
|
600
|
-
font-weight:
|
601
|
-
margin-bottom: 0;
|
615
|
+
font-weight: lighter;
|
616
|
+
margin-bottom: 0.8em;
|
617
|
+
transition: 0.2s all;
|
618
|
+
|
619
|
+
@include media-query($on-palm) {
|
620
|
+
@include relative-font-size(1.175);
|
621
|
+
}
|
602
622
|
}
|
603
623
|
|
604
624
|
> :last-child {
|
data/assets/css/main.scss
CHANGED
@@ -4,13 +4,22 @@
|
|
4
4
|
|
5
5
|
// Default theme colors
|
6
6
|
$theme-colors: (
|
7
|
-
coolblack: #090a0b,
|
8
|
-
spacegrey: #353535,
|
9
|
-
snowwhite: #ffffff,
|
7
|
+
"coolblack": #090a0b,
|
8
|
+
"spacegrey": #353535,
|
9
|
+
"snowwhite": #ffffff,
|
10
|
+
);
|
11
|
+
|
12
|
+
// Default brand colors
|
13
|
+
$brand-colors: (
|
14
|
+
"orangered": #ff5100,
|
15
|
+
"greatgold": #f2cb05,
|
16
|
+
"greenblue": #389092,
|
10
17
|
);
|
11
18
|
|
12
19
|
$theme-name: "{{ site.theme_color }}";
|
20
|
+
$brand-name: "{{ site.brand_color }}";
|
13
21
|
$theme-color: map-get($theme-colors, "snowwhite");
|
22
|
+
$brand-color: map-get($brand-colors, "orangered");
|
14
23
|
|
15
24
|
@if map-has-key($theme-colors, $theme-name) {
|
16
25
|
$theme-color: map-get($theme-colors, $theme-name);
|
@@ -18,4 +27,10 @@ $theme-color: map-get($theme-colors, "snowwhite");
|
|
18
27
|
$theme-color: {{ site.theme_color | default: '#ffffff' }};
|
19
28
|
}
|
20
29
|
|
30
|
+
@if map-has-key($brand-colors, $brand-name) {
|
31
|
+
$brand-color: map-get($brand-colors, $brand-name);
|
32
|
+
} @else if str-index($brand-name, "#") == 1 {
|
33
|
+
$brand-color: {{ site.brand_color | default: '#ff5100' }};
|
34
|
+
}
|
35
|
+
|
21
36
|
@import "yat";
|
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.8.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-06-28 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
|
@@ -161,6 +162,9 @@ files:
|
|
161
162
|
- _includes/extensions/theme-toggle.html
|
162
163
|
- _includes/extensions/trianglify.html
|
163
164
|
- _includes/functions.html
|
165
|
+
- _includes/functions/get_article_excerpt.html
|
166
|
+
- _includes/functions/get_article_words.html
|
167
|
+
- _includes/functions/get_banner.html
|
164
168
|
- _includes/functions/get_categories.html
|
165
169
|
- _includes/functions/get_datetimes.html
|
166
170
|
- _includes/functions/get_reading_time.html
|
@@ -196,6 +200,7 @@ files:
|
|
196
200
|
- _layouts/tags.html
|
197
201
|
- _sass/misc/article-menu.scss
|
198
202
|
- _sass/misc/common-list.scss
|
203
|
+
- _sass/misc/gitment.scss
|
199
204
|
- _sass/misc/google-translate.scss
|
200
205
|
- _sass/misc/theme-toggle.scss
|
201
206
|
- _sass/yat.scss
|
@@ -225,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
225
230
|
- !ruby/object:Gem::Version
|
226
231
|
version: '0'
|
227
232
|
requirements: []
|
228
|
-
rubygems_version: 3.
|
233
|
+
rubygems_version: 3.2.19
|
229
234
|
signing_key:
|
230
235
|
specification_version: 4
|
231
236
|
summary: Yet another theme for elegant writers with modern flat style and beautiful
|