jekyll-theme-yat 1.7.0 → 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 +62 -18
- data/_data/translate_langs.yml +9 -9
- data/_includes/extensions/hashlocate.html +1 -0
- 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 +31 -21
- data/_includes/views/banner.html +88 -7
- 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 +4 -0
- data/_sass/yat.scss +1 -2
- data/_sass/yat/_dark.scss +20 -5
- data/_sass/yat/_layout.scss +28 -9
- data/assets/css/main.scss +18 -3
- metadata +6 -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,13 +1,57 @@
|
|
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
56
|
Hey, nice to meet you, you found this [Jekyll][jekyll] theme. Here the
|
13
57
|
**Yet Another Theme** is a modern responsive theme, and it's quiet clear,
|
@@ -29,13 +73,13 @@ a star!**
|
|
29
73
|
|
30
74
|
</p>
|
31
75
|
|
32
|
-
## Features
|
76
|
+
## ✨ Features
|
33
77
|
|
34
78
|
- Support beautiful __Night Mode__.
|
35
79
|
- Modern responsive web design.
|
36
80
|
- Full layouts `home`, `post`, `tags`, `archive` and `about`.
|
37
81
|
- Uses font awesome 5 for icons.
|
38
|
-
- Beautiful Syntax Highlight using [
|
82
|
+
- Beautiful Syntax Highlight using [highlight.js][highlight-js].
|
39
83
|
- RSS support using [Jekyll Feed][jekyll-feed] gem.
|
40
84
|
- Optimized for search engines using [Jekyll Seo Tag][jekyll-seo-tag] gem.
|
41
85
|
- Sitemap support using [Jekyll Sitemap][jekyll-sitemap] gem.
|
@@ -48,7 +92,7 @@ a star!**
|
|
48
92
|
|
49
93
|
Also, visit the [Live Demo][yat-live-demo] site for the theme.
|
50
94
|
|
51
|
-
## Installation
|
95
|
+
## 🛠️ Installation
|
52
96
|
|
53
97
|
There are three ways to install:
|
54
98
|
|
@@ -107,7 +151,7 @@ And then execute:
|
|
107
151
|
$ bundle
|
108
152
|
```
|
109
153
|
|
110
|
-
|
154
|
+
### GitHub Pages without limitation
|
111
155
|
|
112
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__.
|
113
157
|
|
@@ -116,11 +160,11 @@ To use the third-party gem in GitHub Pages without limitation:
|
|
116
160
|
Here is a GitHub Action named [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) for Jekyll site deployment conveniently. 👍
|
117
161
|
|
118
162
|
|
119
|
-
## Usage
|
163
|
+
## 📚 Usage
|
120
164
|
|
121
165
|
Add or update your available layouts, includes, sass and/or assets.
|
122
166
|
|
123
|
-
## Development
|
167
|
+
## ✏️ Development
|
124
168
|
|
125
169
|
To set up your environment to develop this theme, run `bundle install`.
|
126
170
|
|
@@ -129,13 +173,13 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
|
|
129
173
|
When your theme is released, only the files in `_data`, `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
130
174
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-yat.gemspec` accordingly.
|
131
175
|
|
132
|
-
## Contributing
|
176
|
+
## 🔫 Contributing
|
133
177
|
|
134
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.
|
135
179
|
|
136
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.
|
137
181
|
|
138
|
-
## License
|
182
|
+
## 🌈 License
|
139
183
|
|
140
184
|
This theme is licensed under the [MIT license](https://opensource.org/licenses/mit-license.php) © JeffreyTse.
|
141
185
|
|
@@ -147,4 +191,4 @@ This theme is licensed under the [MIT license](https://opensource.org/licenses/m
|
|
147
191
|
[jekyll-seo-tag]: https://github.com/jekyll/jekyll-seo-tag
|
148
192
|
[jekyll-sitemap]: https://github.com/jekyll/jekyll-sitemap
|
149
193
|
[jekyll-feed]: https://github.com/jekyll/jekyll-feed
|
150
|
-
[
|
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
|
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,31 +2,41 @@
|
|
2
2
|
{%- assign name = include.params.name -%}
|
3
3
|
{%- endif -%}
|
4
4
|
|
5
|
-
{%- assign
|
5
|
+
{%- assign return = nil -%}
|
6
|
+
|
7
|
+
{%- assign keys = name | split:'.' -%}
|
6
8
|
{%- assign name = keys.first -%}
|
9
|
+
{%- assign keys = keys | shift -%}
|
7
10
|
|
8
|
-
{%-
|
9
|
-
{%- assign return = page[name] -%}
|
10
|
-
{%- elsif site[name] != nil -%}
|
11
|
-
{%- assign return = site[name] -%}
|
12
|
-
{%- elsif site.data[name] != nil -%}
|
13
|
-
{%- assign return = site.data[name] -%}
|
14
|
-
{%- elsif site.defaults[page.layout][name] != nil -%}
|
15
|
-
{%- assign return = site.defaults[page.layout][name] -%}
|
16
|
-
{%- elsif site.data.defaults[page.layout][name] != nil -%}
|
17
|
-
{%- assign return = site.data.defaults[page.layout][name] -%}
|
18
|
-
{%- elsif layout[name] != nil -%}
|
19
|
-
{%- assign return = layout[name] -%}
|
20
|
-
{%- else -%}
|
21
|
-
{%- assign return = include.params.default -%}
|
22
|
-
{%- endif -%}
|
11
|
+
{%- for step in (1..7) -%}
|
23
12
|
|
24
|
-
{%-
|
25
|
-
{%-
|
26
|
-
|
27
|
-
|
28
|
-
|
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 -%}
|
29
38
|
{%- break -%}
|
30
39
|
{%- endif -%}
|
40
|
+
|
31
41
|
{%- endfor -%}
|
32
42
|
|
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/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>
|
data/_sass/misc/gitment.scss
CHANGED
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;
|
@@ -12,7 +12,6 @@ $spacing-unit: 30px !default;
|
|
12
12
|
|
13
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;
|
data/_sass/yat/_dark.scss
CHANGED
@@ -2,11 +2,22 @@ $dark-background-color: #0e0e0e !default;
|
|
2
2
|
$dark-text-color: #bbb !default;
|
3
3
|
|
4
4
|
html[data-theme="dark"] {
|
5
|
-
|
6
5
|
&[data-scroll-status='top'] {
|
7
|
-
.site-
|
8
|
-
|
9
|
-
|
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
|
+
}
|
10
21
|
}
|
11
22
|
}
|
12
23
|
|
@@ -20,6 +31,10 @@ html[data-theme="dark"] {
|
|
20
31
|
background-color: #454545;
|
21
32
|
}
|
22
33
|
|
34
|
+
blockquote {
|
35
|
+
border-left: 4px solid #484848;
|
36
|
+
}
|
37
|
+
|
23
38
|
table {
|
24
39
|
color: #9d9d9d;
|
25
40
|
|
@@ -80,7 +95,7 @@ html[data-theme="dark"] {
|
|
80
95
|
.page-banner {
|
81
96
|
.page-banner-img {
|
82
97
|
& > *:first-child {
|
83
|
-
opacity: 0.
|
98
|
+
opacity: 0.718;
|
84
99
|
}
|
85
100
|
}
|
86
101
|
}
|
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 {
|
@@ -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 {
|
@@ -569,6 +574,15 @@ html {
|
|
569
574
|
@include center-image;
|
570
575
|
transition: 0.1s all ease-in-out;
|
571
576
|
}
|
577
|
+
|
578
|
+
& > video {
|
579
|
+
width: 100vw;
|
580
|
+
object-fit: cover;
|
581
|
+
}
|
582
|
+
|
583
|
+
& > img.img-placeholder {
|
584
|
+
display: none;
|
585
|
+
}
|
572
586
|
}
|
573
587
|
|
574
588
|
.wrapper {
|
@@ -588,18 +602,23 @@ html {
|
|
588
602
|
> :nth-child(1) {
|
589
603
|
@include relative-font-size(3.9);
|
590
604
|
letter-spacing: -1px;
|
591
|
-
margin-bottom:
|
605
|
+
margin-bottom: 0.1em;
|
592
606
|
font-weight: normal;
|
593
607
|
transition: 0.2s all;
|
594
608
|
|
595
609
|
@include media-query($on-palm) {
|
596
|
-
@include relative-font-size(
|
610
|
+
@include relative-font-size(1.975);
|
597
611
|
}
|
598
612
|
}
|
599
613
|
|
600
614
|
> :nth-child(2) {
|
601
|
-
font-weight:
|
602
|
-
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
|
+
}
|
603
622
|
}
|
604
623
|
|
605
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";
|
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: 2021-
|
11
|
+
date: 2021-06-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -162,6 +162,9 @@ files:
|
|
162
162
|
- _includes/extensions/theme-toggle.html
|
163
163
|
- _includes/extensions/trianglify.html
|
164
164
|
- _includes/functions.html
|
165
|
+
- _includes/functions/get_article_excerpt.html
|
166
|
+
- _includes/functions/get_article_words.html
|
167
|
+
- _includes/functions/get_banner.html
|
165
168
|
- _includes/functions/get_categories.html
|
166
169
|
- _includes/functions/get_datetimes.html
|
167
170
|
- _includes/functions/get_reading_time.html
|
@@ -227,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
230
|
- !ruby/object:Gem::Version
|
228
231
|
version: '0'
|
229
232
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
233
|
+
rubygems_version: 3.2.19
|
231
234
|
signing_key:
|
232
235
|
specification_version: 4
|
233
236
|
summary: Yet another theme for elegant writers with modern flat style and beautiful
|