jekyll-theme-chirpy 4.0.2 → 4.1.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 +66 -33
- data/_config.yml +16 -4
- data/_data/locales/en.yml +87 -0
- data/_data/locales/zh-CN.yml +86 -0
- data/_includes/footer.html +17 -8
- data/_includes/head.html +8 -6
- data/_includes/js-selector.html +8 -3
- data/_includes/no-zero-date.html +13 -0
- data/_includes/panel.html +3 -3
- data/_includes/post-nav.html +4 -4
- data/_includes/post-paginator.html +9 -1
- data/_includes/post-sharing.html +5 -3
- data/_includes/read-time.html +12 -2
- data/_includes/refactor-content.html +75 -6
- data/_includes/related-posts.html +1 -1
- data/_includes/search-results.html +1 -1
- data/_includes/sidebar.html +8 -7
- data/_includes/timeago.html +12 -16
- data/_includes/topbar.html +27 -21
- data/_layouts/archives.html +4 -3
- data/_layouts/categories.html +15 -18
- data/_layouts/category.html +2 -2
- data/_layouts/default.html +3 -1
- data/_layouts/home.html +3 -4
- data/_layouts/page.html +8 -1
- data/_layouts/post.html +25 -11
- data/_layouts/tag.html +2 -3
- data/_sass/addon/commons.scss +34 -21
- data/_sass/addon/syntax.scss +24 -16
- data/_sass/addon/variables.scss +25 -13
- data/_sass/jekyll-theme-chirpy.scss +2 -1
- data/_sass/layout/home.scss +30 -15
- data/_sass/layout/post.scss +0 -12
- data/_sass/variables-hook.scss +3 -0
- data/assets/404.html +15 -5
- data/assets/css/style.scss +7 -2
- data/assets/feed.xml +1 -1
- data/assets/js/dist/categories.min.js +1 -1
- data/assets/js/dist/commons.min.js +1 -1
- data/assets/js/dist/home.min.js +2 -2
- data/assets/js/dist/page.min.js +2 -2
- data/assets/js/dist/post.min.js +2 -2
- data/assets/js/dist/pvreport.min.js +1 -1
- metadata +6 -5
- data/_data/date_format.yml +0 -7
- data/_data/label.yml +0 -19
- data/_data/rights.yml +0 -11
@@ -0,0 +1,13 @@
|
|
1
|
+
{% comment %}
|
2
|
+
Remove the zero padding from a month/day string
|
3
|
+
{% endcomment %}
|
4
|
+
|
5
|
+
{% assign ret = include.date_str %}
|
6
|
+
{% assign _first_chat = ret | slice: 0 %}
|
7
|
+
|
8
|
+
{% if _first_chat == '0' %}
|
9
|
+
{% assign _last_idx = ret.size | minus: 1 %}
|
10
|
+
{% assign ret = ret | slice: 1, _last_idx %}
|
11
|
+
{% endif %}
|
12
|
+
|
13
|
+
{{ ret | replace: ' 0', ' ' }}
|
data/_includes/panel.html
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
{% if update_list.size > 0 %}
|
12
12
|
|
13
13
|
<div id="access-lastmod" class="post">
|
14
|
-
<span>{{- site.data.
|
14
|
+
<span>{{- site.data.locales[site.lang].panel.lastmod | default: 'Recent Update' -}}</span>
|
15
15
|
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
16
16
|
|
17
17
|
{% for item in update_list %}
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
{% if trending_tags.size > 0 %}
|
32
32
|
<div id="access-tags">
|
33
|
-
<span>{{- site.data.
|
33
|
+
<span>{{- site.data.locales[site.lang].panel.trending_tags | default: 'Trending Tags' -}}</span>
|
34
34
|
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
35
35
|
|
36
36
|
{% for tag_name in trending_tags %}
|
@@ -48,7 +48,7 @@
|
|
48
48
|
<script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@1.0.1/dist/bootstrap-toc.min.js"></script>
|
49
49
|
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
|
50
50
|
<span class="pl-3 pt-2 mb-2">
|
51
|
-
{{- site.data.
|
51
|
+
{{- site.data.locales[site.lang].panel.toc | default: 'Contents' -}}
|
52
52
|
</span>
|
53
53
|
<nav id="toc" data-toggle="toc"></nav>
|
54
54
|
</div>
|
data/_includes/post-nav.html
CHANGED
@@ -5,24 +5,24 @@
|
|
5
5
|
<div class="post-navigation d-flex justify-content-between">
|
6
6
|
{% if page.previous.url %}
|
7
7
|
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
|
8
|
-
prompt="{{ site.data.
|
8
|
+
prompt="{{ site.data.locales[site.lang].post.button.previous | default: 'previous' }}">
|
9
9
|
<p>{{ page.previous.title }}</p>
|
10
10
|
</a>
|
11
11
|
{% else %}
|
12
12
|
<span class="btn btn-outline-primary disabled"
|
13
|
-
prompt="{{ site.data.
|
13
|
+
prompt="{{ site.data.locales[site.lang].post.button.previous | default: 'previous' }}">
|
14
14
|
<p>-</p>
|
15
15
|
</span>
|
16
16
|
{% endif %}
|
17
17
|
|
18
18
|
{% if page.next.url %}
|
19
19
|
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
|
20
|
-
prompt="{{ site.data.
|
20
|
+
prompt="{{ site.data.locales[site.lang].post.button.next | default: 'next' }}">
|
21
21
|
<p>{{ page.next.title }}</p>
|
22
22
|
</a>
|
23
23
|
{% else %}
|
24
24
|
<span class="btn btn-outline-primary disabled"
|
25
|
-
prompt="{{ site.data.
|
25
|
+
prompt="{{ site.data.locales[site.lang].post.button.next | default: 'next' }}">
|
26
26
|
<p>-</p>
|
27
27
|
</span>
|
28
28
|
{% endif %}
|
@@ -2,13 +2,14 @@
|
|
2
2
|
The paginator for post list on HomgPage.
|
3
3
|
-->
|
4
4
|
|
5
|
-
<ul class="pagination mt-4 mb-0 pl-lg-2">
|
5
|
+
<ul class="pagination align-items-center mt-4 mb-0 pl-lg-2">
|
6
6
|
<!-- left arrow -->
|
7
7
|
{% if paginator.previous_page %}
|
8
8
|
{% assign prev_url = paginator.previous_page_path | relative_url %}
|
9
9
|
{% else %}
|
10
10
|
{% assign prev_url = "#" %}
|
11
11
|
{% endif %}
|
12
|
+
|
12
13
|
<li class="page-item {% unless paginator.previous_page %}disabled{% endunless %}">
|
13
14
|
<a class="page-link btn-box-shadow" href="{{ prev_url }}" aria-label="previous-page">
|
14
15
|
<i class="fas fa-angle-left"></i>
|
@@ -65,12 +66,19 @@
|
|
65
66
|
|
66
67
|
{% endfor %}
|
67
68
|
|
69
|
+
<!-- mobile pagination -->
|
70
|
+
<li class="page-index align-middle">
|
71
|
+
<span>{{ paginator.page }}</span>
|
72
|
+
<span class="text-muted">/ {{ paginator.total_pages }}</span>
|
73
|
+
</li>
|
74
|
+
|
68
75
|
<!-- right arrow -->
|
69
76
|
{% if paginator.next_page_path %}
|
70
77
|
{% assign next_url = paginator.next_page_path | relative_url %}
|
71
78
|
{% else %}
|
72
79
|
{% assign next_url = "#" %}
|
73
80
|
{% endif %}
|
81
|
+
|
74
82
|
<li class="page-item {% unless paginator.next_page_path %}disabled{% endunless %}">
|
75
83
|
<a class="page-link btn-box-shadow" href="{{ next_url }}" aria-label="next-page">
|
76
84
|
<i class="fas fa-angle-right"></i>
|
data/_includes/post-sharing.html
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
-->
|
4
4
|
|
5
5
|
<div class="share-wrapper">
|
6
|
-
<span class="share-label text-muted mr-1">{{ site.data.
|
6
|
+
<span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share | default: 'Share' }}</span>
|
7
7
|
<span class="share-icons">
|
8
8
|
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
9
9
|
{% assign url = page.url | absolute_url %}
|
@@ -16,8 +16,10 @@
|
|
16
16
|
</a>
|
17
17
|
{% endfor %}
|
18
18
|
|
19
|
-
<i class="fa-fw fas fa-link small" onclick="copyLink()"
|
20
|
-
data-toggle="tooltip" data-placement="top"
|
19
|
+
<i class="fa-fw fas fa-link small" onclick="copyLink('', '{{ site.data.locales[site.lang].post.button.copy.succeed }}')"
|
20
|
+
data-toggle="tooltip" data-placement="top"
|
21
|
+
title="{{ site.data.locales[site.lang].post.button.copy.title }}">
|
22
|
+
</i>
|
21
23
|
|
22
24
|
</span>
|
23
25
|
</div>
|
data/_includes/read-time.html
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
<!--
|
2
2
|
Calculate the post's reading time, and display the word count in tooltip
|
3
3
|
-->
|
4
|
+
|
4
5
|
{% assign words = include.content | strip_html | number_of_words: "auto" %}
|
5
6
|
|
6
7
|
<!-- words per minute -->
|
8
|
+
|
7
9
|
{% assign wpm = 180 %}
|
8
10
|
{% assign min_time = 1 %}
|
9
11
|
|
@@ -13,7 +15,15 @@
|
|
13
15
|
{% assign read_time = min_time %}
|
14
16
|
{% endunless %}
|
15
17
|
|
18
|
+
{% capture read_prompt %}
|
19
|
+
{{- site.data.locales[site.lang].post.read_time.prompt | default: "read" -}}
|
20
|
+
{% endcapture %}
|
21
|
+
|
16
22
|
<!-- return element -->
|
17
|
-
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
18
|
-
{{
|
23
|
+
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
24
|
+
title="{{ words }} {{ site.data.locales[site.lang].post.words | default: "words" }}">
|
25
|
+
{{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit | default: "min" -}}
|
26
|
+
{%- if include.prompt -%}
|
27
|
+
{% unless site.lang contains 'zh' %}{{" "}}{% endunless %}{{ read_prompt }}
|
28
|
+
{%- endif -%}
|
19
29
|
</span>
|
@@ -8,6 +8,7 @@
|
|
8
8
|
In order to allow a wide table to scroll horizontally,
|
9
9
|
we suround the markdown table with `<div class="table-wrapper">` and `</div>`
|
10
10
|
-->
|
11
|
+
|
11
12
|
{% if _content contains '<table>' %}
|
12
13
|
{% assign _content = _content
|
13
14
|
| replace: '<table>', '<div class="table-wrapper"><table>'
|
@@ -21,6 +22,7 @@
|
|
21
22
|
https://github.com/penibelst/jekyll-compress-html/issues/101
|
22
23
|
https://github.com/penibelst/jekyll-compress-html/issues/71#issuecomment-188144901
|
23
24
|
-->
|
25
|
+
|
24
26
|
{% if _content contains '<pre class="highlight">' %}
|
25
27
|
{% assign _content = _content
|
26
28
|
| replace: '<div class="highlight"><pre class="highlight"><code', '<div class="highlight"><code'
|
@@ -29,14 +31,20 @@
|
|
29
31
|
{% endif %}
|
30
32
|
|
31
33
|
<!-- Add attribute 'hide-bullet' to the checkbox list -->
|
34
|
+
|
32
35
|
{% if _content contains '<li class="task-list-item"><' %}
|
33
36
|
{% assign _content = _content
|
34
37
|
| replace: '"task-list-item"><', '"task-list-item" hide-bullet><'
|
35
38
|
%}
|
36
39
|
{% endif %}
|
37
40
|
|
41
|
+
|
42
|
+
<!-- images -->
|
43
|
+
|
38
44
|
{% if _content contains '<img src="' %}
|
39
45
|
|
46
|
+
<!-- add CDN prefix if it exists -->
|
47
|
+
|
40
48
|
{% if site.img_cdn != '' %}
|
41
49
|
{% assign img_path_replacement = '<img src="' | append: site.img_cdn | append: '/' %}
|
42
50
|
{% else %}
|
@@ -46,16 +54,77 @@
|
|
46
54
|
{% assign _content = _content | replace: '<img src="/', img_path_replacement %}
|
47
55
|
|
48
56
|
<!-- lazy-load images <https://github.com/ApoorvSaxena/lozad.js#usage> -->
|
49
|
-
{% assign img_placehodler
|
50
|
-
= 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' %}
|
51
57
|
|
52
|
-
{% assign
|
53
|
-
|
54
|
-
|
58
|
+
{% assign _content = _content | replace: '<img src="', '<img data-proofer-ignore data-src="' %}
|
59
|
+
|
60
|
+
<!-- add image placehoder to prevent layout reflow -->
|
61
|
+
|
62
|
+
{% assign _img_content = nil %}
|
63
|
+
|
64
|
+
{% assign _images = _content | split: '<img ' %}
|
65
|
+
|
66
|
+
{% for _img in _images %}
|
67
|
+
{% if forloop.first %}
|
68
|
+
{% assign _img_content = _img %}
|
69
|
+
{% continue %}
|
70
|
+
{% endif %}
|
71
|
+
|
72
|
+
{% assign _width = nil %}
|
73
|
+
{% assign _height = nil %}
|
74
|
+
{% assign _attrs = _img | split: '>' | first | split: ' ' %}
|
75
|
+
|
76
|
+
{% for _attr in _attrs %}
|
77
|
+
{% capture _key %}{{ _attr | split: '=' | first }}{% endcapture %}
|
78
|
+
{% capture _value %}{{ _attr | split: '=' | last | replace: '"', '' }}{% endcapture %}
|
79
|
+
|
80
|
+
{% case _key %}
|
81
|
+
{% when 'width' %}
|
82
|
+
{% assign _width = _value %}
|
83
|
+
{% when 'height' %}
|
84
|
+
{% assign _height = _value %}
|
85
|
+
{% endcase %}
|
55
86
|
|
56
|
-
|
87
|
+
{% if _width and _height %}
|
88
|
+
{% capture _svg %}data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 {{_width}} {{_height}}'%3E%3C/svg%3E{% endcapture %}
|
89
|
+
{% assign _img_content = _img_content | append: '<img src="' | append: _svg | append: '" ' | append: _img %}
|
90
|
+
{% break %}
|
91
|
+
{% endif %}
|
92
|
+
|
93
|
+
{% endfor %}
|
94
|
+
|
95
|
+
{% unless _width and _height %}
|
96
|
+
{% assign _img_content = _img_content | append: '<img ' | append: _img %}
|
97
|
+
{% endunless %}
|
98
|
+
|
99
|
+
{% endfor %}
|
100
|
+
|
101
|
+
{% assign _content = _img_content %}
|
57
102
|
|
58
103
|
{% endif %}
|
59
104
|
|
105
|
+
<!-- Add lang-badge for code snippets -->
|
106
|
+
|
107
|
+
{% if _content contains '<div class="language-' %}
|
108
|
+
{% assign _code_splits = _content | split: '<div class="language-' %}
|
109
|
+
{% assign _new_content = nil %}
|
110
|
+
|
111
|
+
{% for _snippet in _code_splits %}
|
112
|
+
{% if forloop.first %}
|
113
|
+
{% assign _new_content = _snippet %}
|
114
|
+
{% else %}
|
115
|
+
{% assign _lang = _snippet | split: ' ' | first %}
|
116
|
+
{% capture _tag_head %}<div lang="{{_lang}}" class="language-{% endcapture %}
|
117
|
+
{% assign _new_content = _new_content | append: _tag_head | append: _snippet %}
|
118
|
+
{% endif %}
|
119
|
+
{% endfor %}
|
120
|
+
|
121
|
+
{% if _new_content %}
|
122
|
+
{% assign _content = _new_content %}
|
123
|
+
{% endif %}
|
124
|
+
|
125
|
+
{% endif %}
|
126
|
+
|
127
|
+
|
60
128
|
<!-- return -->
|
129
|
+
|
61
130
|
{{ _content }}
|
@@ -81,7 +81,7 @@
|
|
81
81
|
{% if index_list.size > 0 %}
|
82
82
|
<div id="related-posts" class="mt-5 mb-2 mb-sm-4">
|
83
83
|
<h3 class="pt-2 mt-1 mb-4 ml-1"
|
84
|
-
data-toc-skip>{{ site.data.
|
84
|
+
data-toc-skip>{{ site.data.locales[site.lang].post.relate_posts | default: 'Further Reading' }}</h3>
|
85
85
|
<div class="card-deck mb-4">
|
86
86
|
{% for entry in index_list %}
|
87
87
|
{% assign index = entry | plus: 0 %}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
|
5
5
|
<div class="col-12 col-sm-11 post-content">
|
6
6
|
<div id="search-hints">
|
7
|
-
<h4 class="text-muted mb-4">{{ site.data.
|
7
|
+
<h4 class="text-muted mb-4">{{ site.data.locales[site.lang].panel.trending_tags | default: 'Trending Tags' }}</h4>
|
8
8
|
|
9
9
|
{% include trending-tags.html %}
|
10
10
|
|
data/_includes/sidebar.html
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
The Side Bar
|
3
3
|
-->
|
4
4
|
|
5
|
-
<div id="sidebar" class="d-flex flex-column align-items-end">
|
6
|
-
|
5
|
+
<div id="sidebar" class="d-flex flex-column align-items-end" lang="{{lang}}">
|
7
6
|
<div class="profile-wrapper text-center">
|
8
7
|
<div id="avatar">
|
9
8
|
<a href="{{ '/' | relative_url }}" alt="avatar" class="mx-auto">
|
@@ -21,19 +20,19 @@
|
|
21
20
|
</div>
|
22
21
|
|
23
22
|
<div class="site-title mt-3">
|
24
|
-
<a href="{{ '/' | relative_url }}">{{
|
23
|
+
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
|
25
24
|
</div>
|
26
|
-
|
27
|
-
<div class="site-subtitle font-italic">{{- site.tagline -}}</div>
|
25
|
+
<div class="site-subtitle font-italic">{{ site.tagline }}</div>
|
28
26
|
|
29
27
|
</div><!-- .profile-wrapper -->
|
30
28
|
|
31
29
|
<ul class="w-100">
|
30
|
+
|
32
31
|
<!-- home -->
|
33
32
|
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
34
33
|
<a href="{{ '/' | relative_url }}" class="nav-link">
|
35
34
|
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
|
36
|
-
<span>{{ "
|
35
|
+
<span>{{ site.data.locales[site.lang].tabs.home | default: "home" | upcase }}</span>
|
37
36
|
</a>
|
38
37
|
</li>
|
39
38
|
<!-- the real tabs -->
|
@@ -41,7 +40,9 @@
|
|
41
40
|
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
|
42
41
|
<a href="{{ tab.url | relative_url }}" class="nav-link">
|
43
42
|
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
|
44
|
-
|
43
|
+
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
44
|
+
|
45
|
+
<span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab_name | upcase }}</span>
|
45
46
|
</a>
|
46
47
|
</li> <!-- .nav-item -->
|
47
48
|
{% endfor %}
|
data/_includes/timeago.html
CHANGED
@@ -3,29 +3,25 @@
|
|
3
3
|
See: /assets/js/_utils/timeage.js
|
4
4
|
-->
|
5
5
|
|
6
|
-
{% assign tooltip_df = site.data.date_format.tooltip | default: '%a, %b %e, %Y, %l:%M %p %z' %}
|
7
|
-
{% assign post_long_df = site.data.date_format.post.long | default: '%b %e, %Y' %}
|
8
|
-
{% assign post_short_df = site.data.date_format.post.short | default: '%b %e' %}
|
6
|
+
{% assign tooltip_df = site.data.locales[site.lang].date_format.tooltip | default: '%a, %b %e, %Y, %l:%M %p %z' %}
|
7
|
+
{% assign post_long_df = site.data.locales[site.lang].date_format.post.long | default: '%b %e, %Y' %}
|
8
|
+
{% assign post_short_df = site.data.locales[site.lang].date_format.post.short | default: '%b %e' %}
|
9
9
|
|
10
|
+
{% if include.preposition %}
|
11
|
+
{{ include.preposition }}
|
12
|
+
{% endif %}
|
10
13
|
<span class="timeago {% if include.class %}{{ include.class }}{% endif %}"
|
11
14
|
{% if include.tooltip %}
|
12
15
|
data-toggle="tooltip"
|
13
16
|
data-placement="bottom"
|
14
17
|
title="{{ include.date | date: tooltip_df }}"
|
15
|
-
{% endif %}
|
16
|
-
|
17
|
-
{
|
18
|
-
{
|
19
|
-
|
20
|
-
{% assign this_year = site.time | date: "%Y" %}
|
21
|
-
{% assign post_year = include.date | date: "%Y" %}
|
22
|
-
|
23
|
-
{% if post_year == this_year %}
|
18
|
+
{% endif %}>
|
19
|
+
{%- assign this_year = site.time | date: "%Y" -%}
|
20
|
+
{%- assign post_year = include.date | date: "%Y" -%}
|
21
|
+
{%- if post_year == this_year -%}
|
24
22
|
{{ include.date | date: post_short_df }}
|
25
|
-
{
|
23
|
+
{%- else -%}
|
26
24
|
{{ include.date | date: post_long_df }}
|
27
|
-
{
|
28
|
-
|
25
|
+
{%- endif -%}
|
29
26
|
<i class="unloaded">{{ include.date | date_to_xmlschema }}</i>
|
30
|
-
|
31
27
|
</span>
|
data/_includes/topbar.html
CHANGED
@@ -8,33 +8,38 @@
|
|
8
8
|
|
9
9
|
{% assign paths = page.url | split: '/' %}
|
10
10
|
|
11
|
-
{% if paths.size == 0 %}
|
11
|
+
{% if paths.size == 0 or page.layout == 'home' %}
|
12
12
|
<!-- index page -->
|
13
|
-
<span>{{ '
|
13
|
+
<span>{{ site.data.locales[site.lang].tabs.home | default: 'home' | capitalize }}</span>
|
14
|
+
|
14
15
|
{% else %}
|
15
16
|
|
16
17
|
{% for item in paths %}
|
17
18
|
|
18
19
|
{% if forloop.first %}
|
19
|
-
{% unless page.layout == 'post' %}
|
20
20
|
<span>
|
21
|
-
<a href="{{ '/' | relative_url }}">
|
21
|
+
<a href="{{ '/' | relative_url }}">
|
22
|
+
{{ site.data.locales[site.lang].tabs.home | default: 'home' | capitalize }}
|
23
|
+
</a>
|
22
24
|
</span>
|
23
|
-
{% endunless %}
|
24
25
|
|
25
26
|
{% elsif forloop.last %}
|
26
|
-
<span>{{ page.title }}</span>
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
{%
|
31
|
-
|
32
|
-
{% assign url = '/' %}
|
28
|
+
{% if page.collection == 'tabs' %}
|
29
|
+
<span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
|
30
|
+
{% else %}
|
31
|
+
<span>{{ page.title }}</span>
|
33
32
|
{% endif %}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
|
34
|
+
{% else %}
|
35
|
+
|
36
|
+
{% unless page.layout == 'post' %}
|
37
|
+
<span>
|
38
|
+
<a href="{{ item | relative_url }}">
|
39
|
+
{{ site.data.locales[site.lang].tabs[item] | default: page.title }}
|
40
|
+
</a>
|
41
|
+
</span>
|
42
|
+
{% endunless %}
|
38
43
|
|
39
44
|
{% endif %}
|
40
45
|
|
@@ -48,11 +53,12 @@
|
|
48
53
|
|
49
54
|
<div id="topbar-title">
|
50
55
|
{% if page.layout == 'home' %}
|
51
|
-
{{- site.title -}}
|
52
|
-
{% elsif page.
|
53
|
-
{{
|
56
|
+
{{- site.data.locales[site.lang].title | default: site.title -}}
|
57
|
+
{% elsif page.collection == 'tabs' %}
|
58
|
+
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
59
|
+
{{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
|
54
60
|
{% else %}
|
55
|
-
{{- page.layout | capitalize -}}
|
61
|
+
{{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
|
56
62
|
{% endif %}
|
57
63
|
</div>
|
58
64
|
|
@@ -60,10 +66,10 @@
|
|
60
66
|
<span id="search-wrapper" class="align-items-center">
|
61
67
|
<i class="fas fa-search fa-fw"></i>
|
62
68
|
<input class="form-control" id="search-input" type="search"
|
63
|
-
aria-label="search" autocomplete="off" placeholder="{{ site.data.
|
69
|
+
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | default: 'Search' | capitalize }}...">
|
64
70
|
<i class="fa fa-times-circle fa-fw" id="search-cleaner"></i>
|
65
71
|
</span>
|
66
|
-
<span id="search-cancel" >Cancel</span>
|
72
|
+
<span id="search-cancel" >{{ site.data.locales[site.lang].search.cancel | default: 'Cancel' }}</span>
|
67
73
|
</div>
|
68
74
|
|
69
75
|
</div>
|