jekyll-theme-yat 1.4.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -2
- data/_includes/sidebar/archive-list.html +1 -1
- data/_includes/sidebar/article-menu.html +50 -2
- data/_includes/sidebar/category-list.html +1 -1
- data/_includes/sidebar/common-list.html +1 -1
- data/_includes/sidebar/tag-list.html +1 -1
- data/_includes/views/banner.html +1 -1
- data/_layouts/about.html +9 -0
- data/_layouts/post.html +28 -11
- data/_sass/misc/article-menu.scss +3 -2
- data/_sass/yat/_base.scss +1 -4
- data/_sass/yat/_layout.scss +22 -3
- data/assets/images/banners/home.jpeg +0 -0
- metadata +33 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d298e53ce0ab4f109de5d89f3da05a0a7b23e0e32e37b7e5a9ef0636c9ce3bb
|
4
|
+
data.tar.gz: 72b2b04a663a236aa0b1e3016a9ecbf0530a12198efa29e8d75980e10d207ed7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad213b0337a5b5a3b60d4fd281a8234a78bde4204fe80fef6bc105ea3afbad38bda338688da2a7981c33ce699893a33c1dbd32df488adc1f84cdd772de2dcc9e
|
7
|
+
data.tar.gz: 6bc8650cf7e58724f4fbf29116a04cfb348e032d9bc6ab23886ae6b7ce5fbc222a371b2e33bf754b263fa64dbd2dec66fe57cf3fe72a0536cb6f6e9aac643a54
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# jekyll-theme-yat
|
2
|
+
[![Github Pages](https://github.com/jeffreytse/jekyll-theme-yat/workflows/Github%20Pages/badge.svg)](https://jeffreytse.github.io/jekyll-theme-yat)
|
2
3
|
[![Gem Version](https://badge.fury.io/rb/jekyll-theme-yat.svg)](http://badge.fury.io/rb/jekyll-theme-yat)
|
3
4
|
[![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)
|
4
5
|
[![Donate (Liberapay)](http://img.shields.io/liberapay/goal/jeffreytse.svg?logo=liberapay)](https://liberapay.com/jeffreytse)
|
@@ -13,10 +14,27 @@ Hey, nice to meet you, you found this Jekyll theme. Here the yet another theme i
|
|
13
14
|
|
14
15
|
<p align="center">
|
15
16
|
|
16
|
-
<img src="https://user-images.githubusercontent.com/9413601/
|
17
|
+
<img src="https://user-images.githubusercontent.com/9413601/91842897-6a840b00-ec87-11ea-95ca-52abcc1ac063.png" alt="demo-screenshot" width="780px"/>
|
17
18
|
|
18
19
|
</p>
|
19
20
|
|
21
|
+
## Features
|
22
|
+
|
23
|
+
- Full layouts `home`, `post`, `tags`, `archive` and `about`.
|
24
|
+
- Uses font awesome 5 for icons.
|
25
|
+
- Beautiful Syntax Highlight using [hilight.js][hilight-js].
|
26
|
+
- RSS support using [Jekyll Feed][jekyll-feed] gem.
|
27
|
+
- Optimized for search engines using [Jekyll Seo Tag][jekyll-seo-tag] gem.
|
28
|
+
- Sitemap support using [Jekyll Sitemap][jekyll-sitemap] gem.
|
29
|
+
- Complex and flexible table support using [Jekyll Spaceship][jekyll-spaceship] gem.
|
30
|
+
- MathJAX and LaTeX optional support using [Jekyll Spaceship][jekyll-spaceship] gem.
|
31
|
+
- Media (Youtube, Spotify, etc.) support using [Jekyll Spaceship][jekyll-spaceship] gem.
|
32
|
+
- Diagram (PlantUML, Mermaid) support using [Jekyll Spaceship][jekyll-spaceship] gem.
|
33
|
+
- Google Translation support.
|
34
|
+
- New post tag support.
|
35
|
+
|
36
|
+
Also, visit the [Live Demo][yat-live-demo] site for the theme.
|
37
|
+
|
20
38
|
## Installation
|
21
39
|
|
22
40
|
Add this line to your Jekyll site's `Gemfile`:
|
@@ -41,7 +59,12 @@ Or install it yourself as:
|
|
41
59
|
|
42
60
|
## Usage
|
43
61
|
|
44
|
-
|
62
|
+
Add or update your available layouts, includes, sass and/or assets.
|
63
|
+
|
64
|
+
GitHub Pages runs in `safe` mode and only allows [a set of whitelisted plugins](https://pages.github.com/versions/).
|
65
|
+
To use the third-party gem in GitHub Pages without limitation:
|
66
|
+
|
67
|
+
* Here is a GitHub Action named [jekyll-deploy-action](https://github.com/jeffreytse/jekyll-deploy-action) for Jekyll site deployment conveniently. 👍
|
45
68
|
|
46
69
|
## Development
|
47
70
|
|
@@ -61,3 +84,13 @@ You can start by [opening an issue](https://github.com/jeffreytse/jekyll-theme-y
|
|
61
84
|
## License
|
62
85
|
|
63
86
|
This theme is licensed under the [MIT license](https://opensource.org/licenses/mit-license.php) © JeffreyTse.
|
87
|
+
|
88
|
+
<!-- External links -->
|
89
|
+
[jekyll]: https://jekyllrb.com/
|
90
|
+
[yat-git-repo]: https://github.com/jeffreytse/jekyll-theme-yat/
|
91
|
+
[yat-live-demo]: https://jeffreytse.github.io/jekyll-theme-yat/
|
92
|
+
[jekyll-spaceship]: https://github.com/jeffreytse/jekyll-spaceship
|
93
|
+
[jekyll-seo-tag]: https://github.com/jekyll/jekyll-seo-tag
|
94
|
+
[jekyll-sitemap]: https://github.com/jekyll/jekyll-sitemap
|
95
|
+
[jekyll-feed]: https://github.com/jekyll/jekyll-feed
|
96
|
+
[hilight-js]: https://github.com/highlightjs/highlight.js
|
@@ -36,10 +36,54 @@
|
|
36
36
|
// The header element
|
37
37
|
var header = document.querySelector('header.site-header');
|
38
38
|
|
39
|
+
function doMenuCollapse(index, over_items=20) {
|
40
|
+
var items = menuContent.firstChild.children;
|
41
|
+
|
42
|
+
if (items.length < over_items) {
|
43
|
+
return;
|
44
|
+
}
|
45
|
+
|
46
|
+
var activeItem = items[index];
|
47
|
+
var beginItem = activeItem
|
48
|
+
var endItem = activeItem
|
49
|
+
var beginIndex = index;
|
50
|
+
var endIndex = index + 1;
|
51
|
+
while (beginIndex >= 0
|
52
|
+
&& !items[beginIndex].classList.contains('h-h2')) {
|
53
|
+
beginIndex -= 1;
|
54
|
+
}
|
55
|
+
while (endIndex < items.length
|
56
|
+
&& !items[endIndex].classList.contains('h-h2')) {
|
57
|
+
endIndex += 1;
|
58
|
+
}
|
59
|
+
for (var i = 0; i < beginIndex; i++) {
|
60
|
+
item = items[i]
|
61
|
+
if (!item.classList.contains('h-h2')) {
|
62
|
+
item.style.display = 'none';
|
63
|
+
}
|
64
|
+
}
|
65
|
+
for (var i = beginIndex + 1; i < endIndex; i++) {
|
66
|
+
item = items[i]
|
67
|
+
// if (!item.classList.contains('h-h2')) {
|
68
|
+
item.style.display = '';
|
69
|
+
// }
|
70
|
+
}
|
71
|
+
for (var i = endIndex; i < items.length; i++) {
|
72
|
+
item = items[i]
|
73
|
+
if (!item.classList.contains('h-h2')) {
|
74
|
+
item.style.display = 'none';
|
75
|
+
}
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
// Init menu collapsed
|
80
|
+
doMenuCollapse(-1);
|
81
|
+
|
39
82
|
// Active the menu item
|
40
83
|
window.addEventListener('scroll', function (event) {
|
41
84
|
var lastActive = menuContent.querySelector('.active');
|
42
85
|
var changed = true;
|
86
|
+
var activeIndex = -1;
|
43
87
|
for (var i = headings.length - 1; i >= 0; i--) {
|
44
88
|
var h = headings[i];
|
45
89
|
var headingRect = h.getBoundingClientRect();
|
@@ -53,6 +97,7 @@
|
|
53
97
|
var curActive = a.parentNode;
|
54
98
|
if (curActive) {
|
55
99
|
curActive.classList.add('active');
|
100
|
+
activeIndex = i;
|
56
101
|
}
|
57
102
|
if (lastActive == curActive) {
|
58
103
|
changed = false;
|
@@ -60,8 +105,11 @@
|
|
60
105
|
break;
|
61
106
|
}
|
62
107
|
}
|
63
|
-
if (
|
64
|
-
lastActive
|
108
|
+
if (changed) {
|
109
|
+
if (lastActive) {
|
110
|
+
lastActive.classList.remove('active');
|
111
|
+
}
|
112
|
+
doMenuCollapse(activeIndex);
|
65
113
|
}
|
66
114
|
event.preventDefault();
|
67
115
|
});
|
data/_includes/views/banner.html
CHANGED
@@ -21,7 +21,7 @@
|
|
21
21
|
{% if banner %}
|
22
22
|
<section class="page-banner">
|
23
23
|
<div class="page-banner-img">
|
24
|
-
<div style="background-image: url({{ banner }})"></div>
|
24
|
+
<div style="background-image: url({{ banner | relative_url }})"></div>
|
25
25
|
</div>
|
26
26
|
<div class="wrapper">
|
27
27
|
<div class="page-banner-inner">
|
data/_layouts/about.html
ADDED
data/_layouts/post.html
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
layout: framework
|
3
3
|
banner:
|
4
4
|
banner_html: post-header.html
|
5
|
+
hidden: []
|
5
6
|
sidebar:
|
6
7
|
- article-menu
|
7
8
|
---
|
@@ -13,47 +14,63 @@ sidebar:
|
|
13
14
|
{%- include functions.html func='get_value' -%}
|
14
15
|
{%- assign banner = return -%}
|
15
16
|
|
16
|
-
{%-
|
17
|
+
{%- assign name = 'hidden' -%}
|
18
|
+
{%- include functions.html func='get_value' -%}
|
19
|
+
{%- assign hidden = return -%}
|
20
|
+
|
21
|
+
{%- assign result = hidden | where_exp: "item", "item == 'header'" -%}
|
22
|
+
{%- if banner == nil and result.size == 0 -%}
|
17
23
|
{%- include views/post-header.html -%}
|
18
24
|
{%- endif -%}
|
19
25
|
|
20
26
|
{%- include views/article.html -%}
|
21
27
|
|
28
|
+
{%- assign result = hidden | where_exp: "item", "item == 'navigator'" -%}
|
29
|
+
{%- if result.size == 0 -%}
|
22
30
|
<div class="post-nav">
|
23
31
|
{%- if page.previous -%}
|
24
|
-
<a class="previous" href="{{ page.previous.url }}" title="{{
|
32
|
+
<a class="previous" href="{{ page.previous.url | relative_url }}" title="{{
|
25
33
|
page.previous.title | escape }}">{{ page.previous.title | escape | truncatewords: 6 }}</a>
|
26
34
|
{%- else -%}
|
27
35
|
<span></span>
|
28
36
|
{%- endif -%}
|
29
37
|
|
30
38
|
{%- if page.next -%}
|
31
|
-
<a class="next" href="{{ page.next.url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a>
|
39
|
+
<a class="next" href="{{ page.next.url | relative_url }}" title="{{ page.next.title | escape }}">{{ page.next.title | escape | truncatewords: 6 }}</a>
|
32
40
|
{%- else -%}
|
33
41
|
<span></span>
|
34
42
|
{%- endif -%}
|
35
43
|
</div>
|
44
|
+
{%- endif -%}
|
36
45
|
|
46
|
+
{%- assign result = hidden | where_exp: "item", "item == 'related_posts'" -%}
|
47
|
+
{%- if result.size == 0 -%}
|
37
48
|
<div class="post-related">
|
38
49
|
<div>Related Articles</div>
|
39
50
|
<ul>
|
40
51
|
{% assign posts = site[page.collection] | sample:4 %}
|
41
52
|
{%- for post in posts -%}
|
42
|
-
<li><a class="post-link" href="{{post.url}}" title="{{ page.next.title | escape }}">{{ post.title | escape | truncatewords: 12 }}</a></li>
|
53
|
+
<li><a class="post-link" href="{{post.url | relative_url}}" title="{{ page.next.title | escape }}">{{ post.title | escape | truncatewords: 12 }}</a></li>
|
43
54
|
{%- endfor -%}
|
44
55
|
</ul>
|
45
56
|
</div>
|
57
|
+
{%- endif -%}
|
46
58
|
|
47
|
-
{%-
|
59
|
+
{%- assign result = hidden | where_exp: "item", "item == 'comments'" -%}
|
60
|
+
{%- if result.size == 0 -%}
|
61
|
+
<div class="post-comments">
|
62
|
+
{%- if page.comments != false -%}
|
48
63
|
|
49
|
-
|
50
|
-
|
51
|
-
|
64
|
+
{%- if site.disqus.shortname -%}
|
65
|
+
{%- include extensions/comments/disqus.html -%}
|
66
|
+
{%- endif -%}
|
52
67
|
|
53
|
-
|
54
|
-
|
55
|
-
|
68
|
+
{%- if site.gitment.username -%}
|
69
|
+
{%- include extensions/comments/gitment.html -%}
|
70
|
+
{%- endif -%}
|
56
71
|
|
72
|
+
{%- endif -%}
|
73
|
+
</div>
|
57
74
|
{%- endif -%}
|
58
75
|
|
59
76
|
</section>
|
data/_sass/yat/_base.scss
CHANGED
@@ -100,8 +100,6 @@ h1, h2, h3, h4, h5, h6 {
|
|
100
100
|
font-weight: $base-font-weight * 1.5;
|
101
101
|
}
|
102
102
|
|
103
|
-
|
104
|
-
|
105
103
|
/**
|
106
104
|
* Links
|
107
105
|
*/
|
@@ -122,7 +120,6 @@ a {
|
|
122
120
|
}
|
123
121
|
}
|
124
122
|
|
125
|
-
|
126
123
|
/**
|
127
124
|
* Blockquotes
|
128
125
|
*/
|
@@ -154,7 +151,7 @@ code {
|
|
154
151
|
padding: 1px 5px;
|
155
152
|
border-radius: 3px;
|
156
153
|
color: #fff;
|
157
|
-
background-color:
|
154
|
+
background-color: #545454;
|
158
155
|
}
|
159
156
|
|
160
157
|
pre {
|
data/_sass/yat/_layout.scss
CHANGED
@@ -319,10 +319,15 @@ html {
|
|
319
319
|
border: 1px solid;
|
320
320
|
padding: 2px 4px;
|
321
321
|
border-radius: 2px;
|
322
|
+
transition: color 0.2s;
|
322
323
|
|
323
324
|
&:not(:first-child) {
|
324
325
|
margin-left: 8px;
|
325
326
|
}
|
327
|
+
|
328
|
+
&:hover {
|
329
|
+
color: #777;
|
330
|
+
}
|
326
331
|
}
|
327
332
|
|
328
333
|
.paginator {
|
@@ -387,6 +392,9 @@ html {
|
|
387
392
|
|
388
393
|
.post-content {
|
389
394
|
margin-bottom: $spacing-unit;
|
395
|
+
overflow-wrap: break-word;
|
396
|
+
word-wrap: break-word;
|
397
|
+
word-break: break-all;
|
390
398
|
|
391
399
|
h2 {
|
392
400
|
@include relative-font-size(2);
|
@@ -412,7 +420,7 @@ html {
|
|
412
420
|
}
|
413
421
|
}
|
414
422
|
|
415
|
-
img, iframe {
|
423
|
+
img, svg, iframe {
|
416
424
|
margin-left: auto;
|
417
425
|
margin-right: auto;
|
418
426
|
display: block;
|
@@ -474,6 +482,10 @@ html {
|
|
474
482
|
}
|
475
483
|
}
|
476
484
|
|
485
|
+
.post-comments {
|
486
|
+
padding-top: 25px;
|
487
|
+
}
|
488
|
+
|
477
489
|
|
478
490
|
/**
|
479
491
|
* Posts misc
|
@@ -578,8 +590,7 @@ html {
|
|
578
590
|
> :nth-child(1) {
|
579
591
|
@include relative-font-size(3.9);
|
580
592
|
letter-spacing: -1px;
|
581
|
-
|
582
|
-
margin-bottom: 18px;
|
593
|
+
margin-bottom: 16px;
|
583
594
|
font-weight: normal;
|
584
595
|
transition: 0.2s all;
|
585
596
|
|
@@ -602,6 +613,10 @@ html {
|
|
602
613
|
@include relative-font-size(1.525);
|
603
614
|
color: #ffffffcc;
|
604
615
|
padding-right: 280px;
|
616
|
+
|
617
|
+
@include media-query($on-palm) {
|
618
|
+
padding-right: 0;
|
619
|
+
}
|
605
620
|
}
|
606
621
|
|
607
622
|
.post-meta {
|
@@ -616,6 +631,10 @@ html {
|
|
616
631
|
color: #999;
|
617
632
|
padding-right: 280px;
|
618
633
|
|
634
|
+
@include media-query($on-palm) {
|
635
|
+
padding-right: 0;
|
636
|
+
}
|
637
|
+
|
619
638
|
.post-tag {
|
620
639
|
@include relative-font-size(1.125);
|
621
640
|
display: inline-block;
|
Binary file
|
metadata
CHANGED
@@ -1,57 +1,75 @@
|
|
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.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jeffreytse
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.6'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '3.0'
|
20
23
|
type: :development
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
29
|
+
version: '1.6'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.0'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rake
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
|
-
- - "
|
37
|
+
- - ">="
|
32
38
|
- !ruby/object:Gem::Version
|
33
39
|
version: '12.0'
|
40
|
+
- - "<"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '13.0'
|
34
43
|
type: :development
|
35
44
|
prerelease: false
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
37
46
|
requirements:
|
38
|
-
- - "
|
47
|
+
- - ">="
|
39
48
|
- !ruby/object:Gem::Version
|
40
49
|
version: '12.0'
|
50
|
+
- - "<"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: '13.0'
|
41
53
|
- !ruby/object:Gem::Dependency
|
42
54
|
name: jekyll
|
43
55
|
requirement: !ruby/object:Gem::Requirement
|
44
56
|
requirements:
|
45
|
-
- - "
|
57
|
+
- - ">"
|
46
58
|
- !ruby/object:Gem::Version
|
47
|
-
version: '3.
|
59
|
+
version: '3.5'
|
60
|
+
- - "<"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '5.0'
|
48
63
|
type: :runtime
|
49
64
|
prerelease: false
|
50
65
|
version_requirements: !ruby/object:Gem::Requirement
|
51
66
|
requirements:
|
52
|
-
- - "
|
67
|
+
- - ">"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3.5'
|
70
|
+
- - "<"
|
53
71
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
72
|
+
version: '5.0'
|
55
73
|
- !ruby/object:Gem::Dependency
|
56
74
|
name: jekyll-feed
|
57
75
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,6 +184,7 @@ files:
|
|
166
184
|
- _includes/views/segments.html
|
167
185
|
- _includes/views/site-brand.html
|
168
186
|
- _layouts/404.html
|
187
|
+
- _layouts/about.html
|
169
188
|
- _layouts/archives.html
|
170
189
|
- _layouts/articles.html
|
171
190
|
- _layouts/categories.html
|
@@ -181,6 +200,7 @@ files:
|
|
181
200
|
- _sass/yat/_base.scss
|
182
201
|
- _sass/yat/_layout.scss
|
183
202
|
- assets/css/main.scss
|
203
|
+
- assets/images/banners/home.jpeg
|
184
204
|
- assets/js/main.js
|
185
205
|
homepage: https://github.com/jeffreytse/jekyll-theme-yat
|
186
206
|
licenses:
|
@@ -202,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
202
222
|
- !ruby/object:Gem::Version
|
203
223
|
version: '0'
|
204
224
|
requirements: []
|
205
|
-
rubygems_version: 3.
|
225
|
+
rubygems_version: 3.1.4
|
206
226
|
signing_key:
|
207
227
|
specification_version: 4
|
208
228
|
summary: Yet another theme for elegant writers with modern flat style.
|