jekyll-theme-chirpy 5.0.2 → 6.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +64 -74
- data/_data/locales/ar.yml +91 -0
- data/_data/locales/bg-BG.yml +81 -0
- data/_data/locales/cs-CZ.yml +89 -0
- data/_data/locales/de-DE.yml +80 -0
- data/_data/locales/el-GR.yml +91 -0
- data/_data/locales/en.yml +23 -23
- data/_data/locales/es-ES.yml +77 -0
- data/_data/locales/fi-FI.yml +90 -0
- data/_data/locales/fr-FR.yml +77 -0
- data/_data/locales/hu-HU.yml +79 -0
- data/_data/locales/id-ID.yml +5 -19
- data/_data/locales/it-IT.yml +90 -0
- data/_data/locales/ko-KR.yml +12 -19
- data/_data/locales/my-MM.yml +77 -0
- data/_data/locales/pt-BR.yml +77 -0
- data/_data/locales/ru-RU.yml +77 -0
- data/_data/locales/sl-SI.yml +91 -0
- data/_data/locales/sv-SE.yml +91 -0
- data/_data/locales/th.yml +91 -0
- data/_data/locales/tr-TR.yml +77 -0
- data/_data/locales/uk-UA.yml +77 -0
- data/_data/locales/vi-VN.yml +76 -0
- data/_data/locales/zh-CN.yml +13 -20
- data/_data/locales/zh-TW.yml +83 -0
- data/_data/origin/basic.yml +48 -0
- data/_data/origin/cors.yml +59 -0
- data/_includes/comments/disqus.html +27 -31
- data/_includes/comments/giscus.html +64 -0
- data/_includes/comments/utterances.html +2 -2
- data/_includes/datetime.html +20 -0
- data/_includes/embed/twitch.html +4 -0
- data/_includes/embed/youtube.html +6 -0
- data/_includes/footer.html +31 -32
- data/_includes/head.html +66 -46
- data/_includes/js-selector.html +83 -45
- data/_includes/jsdelivr-combine.html +26 -0
- data/_includes/lang.html +1 -1
- data/_includes/mermaid.html +30 -29
- data/_includes/metadata-hook.html +1 -0
- data/_includes/mode-toggle.html +66 -51
- data/_includes/notification.html +24 -0
- data/_includes/origin-type.html +13 -0
- data/_includes/post-nav.html +26 -22
- data/_includes/post-paginator.html +79 -76
- data/_includes/post-sharing.html +27 -16
- data/_includes/read-time.html +17 -10
- data/_includes/refactor-content.html +129 -73
- data/_includes/related-posts.html +48 -58
- data/_includes/search-loader.html +32 -31
- data/_includes/search-results.html +4 -5
- data/_includes/sidebar.html +79 -67
- data/_includes/toc.html +4 -7
- data/_includes/topbar.html +62 -56
- data/_includes/trending-tags.html +15 -19
- data/_includes/update-list.html +14 -15
- data/_layouts/archives.html +25 -29
- data/_layouts/categories.html +97 -58
- data/_layouts/category.html +8 -10
- data/_layouts/default.html +67 -31
- data/_layouts/home.html +67 -56
- data/_layouts/page.html +20 -58
- data/_layouts/post.html +85 -94
- data/_layouts/tag.html +8 -10
- data/_layouts/tags.html +6 -5
- data/_sass/addon/commons.scss +679 -878
- data/_sass/addon/module.scss +70 -23
- data/_sass/addon/syntax.scss +127 -110
- data/_sass/addon/variables.scss +16 -18
- data/_sass/colors/syntax-dark.scss +138 -0
- data/_sass/colors/syntax-light.scss +179 -0
- data/_sass/colors/{dark-typography.scss → typography-dark.scss} +58 -56
- data/_sass/colors/typography-light.scss +110 -0
- data/_sass/layout/archives.scss +86 -89
- data/_sass/layout/categories.scss +29 -13
- data/_sass/layout/category-tag.scss +9 -10
- data/_sass/layout/home.scss +132 -114
- data/_sass/layout/post.scss +213 -173
- data/_sass/layout/tags.scss +1 -1
- data/_sass/main.scss +13 -0
- data/assets/404.html +1 -20
- data/assets/css/jekyll-theme-chirpy.scss +6 -0
- data/assets/feed.xml +2 -2
- data/assets/js/data/search.json +8 -5
- data/assets/js/data/swcache.js +14 -29
- data/assets/js/dist/categories.min.js +2 -4
- data/assets/js/dist/commons.min.js +2 -4
- data/assets/js/dist/home.min.js +2 -4
- data/assets/js/dist/misc.min.js +4 -0
- data/assets/js/dist/page.min.js +2 -4
- data/assets/js/dist/post.min.js +2 -4
- data/assets/js/pwa/app.js +42 -4
- data/assets/js/pwa/sw.js +46 -44
- data/assets/js/pwa/unregister.js +12 -0
- metadata +64 -32
- data/_config.yml +0 -175
- data/_data/contact.yml +0 -30
- data/_data/share.yml +0 -27
- data/_includes/css-selector.html +0 -15
- data/_includes/no-zero-date.html +0 -13
- data/_includes/timeago.html +0 -26
- data/_plugins/posts-lastmod-hook.rb +0 -14
- data/_sass/colors/dark-syntax.scss +0 -87
- data/_sass/colors/light-syntax.scss +0 -79
- data/_sass/colors/light-typography.scss +0 -81
- data/_sass/jekyll-theme-chirpy.scss +0 -24
- data/_tabs/about.md +0 -8
- data/_tabs/archives.md +0 -7
- data/_tabs/categories.md +0 -6
- data/_tabs/tags.md +0 -6
- data/assets/css/style.scss +0 -12
- data/assets/js/dist/pvreport.min.js +0 -6
- data/index.html +0 -4
@@ -1,24 +1,31 @@
|
|
1
|
-
<!--
|
2
|
-
Recommend the other 3 posts according to the tags and categories of the current post,
|
3
|
-
if the number is not enough, use the other latest posts to supplement.
|
4
|
-
-->
|
1
|
+
<!-- Recommend the other 3 posts according to the tags and categories of the current post. -->
|
5
2
|
|
6
|
-
<!-- The total size of related posts
|
3
|
+
<!-- The total size of related posts -->
|
7
4
|
{% assign TOTAL_SIZE = 3 %}
|
8
5
|
|
9
|
-
<!-- An random integer that bigger than 0
|
6
|
+
<!-- An random integer that bigger than 0 -->
|
10
7
|
{% assign TAG_SCORE = 1 %}
|
11
8
|
|
12
|
-
<!-- Equals to TAG_SCORE / {max_categories_hierarchy}
|
9
|
+
<!-- Equals to TAG_SCORE / {max_categories_hierarchy} -->
|
13
10
|
{% assign CATEGORY_SCORE = 0.5 %}
|
14
11
|
|
15
|
-
{% assign SEPARATOR =
|
12
|
+
{% assign SEPARATOR = ':' %}
|
16
13
|
|
17
|
-
{% assign
|
18
|
-
|
14
|
+
{% assign match_posts = '' | split: '' %}
|
15
|
+
|
16
|
+
{% for category in page.categories %}
|
17
|
+
{% assign match_posts = match_posts | push: site.categories[category] | uniq %}
|
18
|
+
{% endfor %}
|
19
|
+
|
20
|
+
{% for tag in page.tags %}
|
21
|
+
{% assign match_posts = match_posts | push: site.tags[tag] | uniq %}
|
22
|
+
{% endfor %}
|
23
|
+
|
24
|
+
{% assign last_index = match_posts.size | minus: 1 %}
|
25
|
+
{% assign score_list = '' | split: '' %}
|
19
26
|
|
20
27
|
{% for i in (0..last_index) %}
|
21
|
-
{% assign post =
|
28
|
+
{% assign post = match_posts[i] %}
|
22
29
|
|
23
30
|
{% if post.url == page.url %}
|
24
31
|
{% continue %}
|
@@ -42,11 +49,9 @@
|
|
42
49
|
{% capture score_item %}{{ score }}{{ SEPARATOR }}{{ i }}{% endcapture %}
|
43
50
|
{% assign score_list = score_list | push: score_item %}
|
44
51
|
{% endif %}
|
45
|
-
|
46
52
|
{% endfor %}
|
47
53
|
|
48
|
-
|
49
|
-
{% assign index_list = "" | split: "" %}
|
54
|
+
{% assign index_list = '' | split: '' %}
|
50
55
|
|
51
56
|
{% if score_list.size > 0 %}
|
52
57
|
{% assign score_list = score_list | sort | reverse %}
|
@@ -56,51 +61,36 @@
|
|
56
61
|
{% endfor %}
|
57
62
|
{% endif %}
|
58
63
|
|
59
|
-
|
60
|
-
{% assign less = TOTAL_SIZE | minus: index_list.size %}
|
61
|
-
|
62
|
-
{% if less > 0 %}
|
63
|
-
|
64
|
-
{% for i in (0..last_index) %}
|
65
|
-
{% assign post = site.posts[i] %}
|
66
|
-
{% if post.url != page.url %}
|
67
|
-
{% capture cur_index %}{{ i }}{% endcapture %}
|
68
|
-
{% unless index_list contains cur_index %}
|
69
|
-
{% assign index_list = index_list | push: cur_index %}
|
70
|
-
{% assign less = less | minus: 1 %}
|
71
|
-
{% if less <= 0 %}
|
72
|
-
{% break %}
|
73
|
-
{% endif %}
|
74
|
-
{% endunless %}
|
75
|
-
{% endif %}
|
76
|
-
{% endfor %}
|
77
|
-
|
78
|
-
{% endif %}
|
64
|
+
{% assign relate_posts = '' | split: '' %}
|
79
65
|
|
66
|
+
{% for index in index_list %}
|
67
|
+
{% assign i = index | to_integer %}
|
68
|
+
{% assign relate_posts = relate_posts | push: match_posts[i] %}
|
69
|
+
{% endfor %}
|
80
70
|
|
81
|
-
{% if
|
82
|
-
<
|
83
|
-
<h3 class="
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
{%
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
</
|
71
|
+
{% if relate_posts.size > 0 %}
|
72
|
+
<aside id="related-posts" aria-labelledby="related-label">
|
73
|
+
<h3 class="mb-4" id="related-label">
|
74
|
+
{{- site.data.locales[include.lang].post.relate_posts -}}
|
75
|
+
</h3>
|
76
|
+
<nav class="row row-cols-1 row-cols-md-2 row-cols-xl-3 g-4 mb-4">
|
77
|
+
{% for post in relate_posts %}
|
78
|
+
<article class="col">
|
79
|
+
<a href="{{ post.url | relative_url }}" class="post-preview card h-100">
|
80
|
+
<div class="card-body">
|
81
|
+
{% include datetime.html date=post.date class="small" lang=include.lang %}
|
82
|
+
<h4 class="pt-0 my-2">{{ post.title }}</h4>
|
83
|
+
<div class="text-muted small">
|
84
|
+
<p>
|
85
|
+
{% include no-linenos.html content=post.content %}
|
86
|
+
{{ content | markdownify | strip_html | truncate: 200 | escape }}
|
87
|
+
</p>
|
88
|
+
</div>
|
99
89
|
</div>
|
100
|
-
</
|
101
|
-
</
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
90
|
+
</a>
|
91
|
+
</article>
|
92
|
+
{% endfor %}
|
93
|
+
</nav>
|
94
|
+
</aside>
|
95
|
+
<!-- #related-posts -->
|
106
96
|
{% endif %}
|
@@ -4,43 +4,44 @@
|
|
4
4
|
-->
|
5
5
|
|
6
6
|
{% capture result_elem %}
|
7
|
-
<
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
</
|
7
|
+
<article class="px-1 px-sm-2 px-lg-4 px-xl-0">
|
8
|
+
<header>
|
9
|
+
<h2><a href="{url}">{title}</a></h2>
|
10
|
+
<div class="post-meta d-flex flex-column flex-sm-row text-muted mt-1 mb-1">
|
11
|
+
{categories}
|
12
|
+
{tags}
|
13
|
+
</div>
|
14
|
+
</header>
|
15
|
+
<p>{snippet}</p>
|
16
|
+
</article>
|
15
17
|
{% endcapture %}
|
16
18
|
|
17
|
-
{% capture not_found %}<p class="mt-5">{{ site.data.locales[lang].search.no_results }}</p>{% endcapture %}
|
18
|
-
|
19
|
-
<script src="https://cdn.jsdelivr.net/npm/simple-jekyll-search@1.10.0/dest/simple-jekyll-search.min.js"></script>
|
19
|
+
{% capture not_found %}<p class="mt-5">{{ site.data.locales[include.lang].search.no_results }}</p>{% endcapture %}
|
20
20
|
|
21
21
|
<script>
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
if (
|
31
|
-
|
32
|
-
|
33
|
-
|
22
|
+
/* Note: dependent library will be loaded in `js-selector.html` */
|
23
|
+
SimpleJekyllSearch({
|
24
|
+
searchInput: document.getElementById('search-input'),
|
25
|
+
resultsContainer: document.getElementById('search-results'),
|
26
|
+
json: '{{ '/assets/js/data/search.json' | relative_url }}',
|
27
|
+
searchResultTemplate: '{{ result_elem | strip_newlines }}',
|
28
|
+
noResultsText: '{{ not_found }}',
|
29
|
+
templateMiddleware: function(prop, value, template) {
|
30
|
+
if (prop === 'categories') {
|
31
|
+
if (value === '') {
|
32
|
+
return `${value}`;
|
33
|
+
} else {
|
34
|
+
return `<div class="me-sm-4"><i class="far fa-folder fa-fw"></i>${value}</div>`;
|
35
|
+
}
|
34
36
|
}
|
35
|
-
}
|
36
37
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
38
|
+
if (prop === 'tags') {
|
39
|
+
if (value === '') {
|
40
|
+
return `${value}`;
|
41
|
+
} else {
|
42
|
+
return `<div><i class="fa fa-tag fa-fw"></i>${value}</div>`;
|
43
|
+
}
|
42
44
|
}
|
43
45
|
}
|
44
|
-
}
|
45
|
-
});
|
46
|
+
});
|
46
47
|
</script>
|
@@ -1,10 +1,9 @@
|
|
1
|
-
<!--
|
2
|
-
|
3
|
-
-->
|
1
|
+
<!-- The Search results -->
|
2
|
+
|
4
3
|
<div id="search-result-wrapper" class="d-flex justify-content-center unloaded">
|
5
|
-
<div class="col-
|
4
|
+
<div class="col-11 content">
|
6
5
|
<div id="search-hints">
|
7
|
-
{%
|
6
|
+
{% include_cached trending-tags.html %}
|
8
7
|
</div>
|
9
8
|
<div id="search-results" class="d-flex flex-wrap justify-content-center text-muted mt-3"></div>
|
10
9
|
</div>
|
data/_includes/sidebar.html
CHANGED
@@ -1,60 +1,56 @@
|
|
1
|
-
<!--
|
2
|
-
The Side Bar
|
3
|
-
-->
|
1
|
+
<!-- The Side Bar -->
|
4
2
|
|
5
|
-
<
|
6
|
-
<
|
7
|
-
<
|
8
|
-
|
9
|
-
{%
|
10
|
-
|
11
|
-
{%- if site.avatar contains '://' -%}
|
3
|
+
<aside aria-label="Sidebar" id="sidebar" class="d-flex flex-column align-items-end">
|
4
|
+
<header class="profile-wrapper">
|
5
|
+
<a href="{{ '/' | relative_url }}" id="avatar" class="rounded-circle">
|
6
|
+
{% if site.avatar != empty and site.avatar %}
|
7
|
+
{% capture avatar_url %}
|
8
|
+
{% if site.avatar contains '://' %}
|
12
9
|
{{ site.avatar }}
|
13
|
-
{
|
10
|
+
{% elsif site.img_cdn != empty and site.img_cdn %}
|
14
11
|
{{ site.avatar | prepend: site.img_cdn }}
|
15
|
-
{
|
12
|
+
{% else %}
|
16
13
|
{{ site.avatar | relative_url }}
|
17
|
-
{
|
14
|
+
{% endif %}
|
18
15
|
{% endcapture %}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
</div>
|
16
|
+
<img src="{{ avatar_url | strip }}" width="112" height="112" alt="avatar" onerror="this.style.display='none'">
|
17
|
+
{% endif %}
|
18
|
+
</a>
|
23
19
|
|
24
|
-
<
|
20
|
+
<h1 class="site-title">
|
25
21
|
<a href="{{ '/' | relative_url }}">{{ site.title }}</a>
|
26
|
-
</
|
27
|
-
<
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
<ul class="w-100">
|
32
|
-
|
33
|
-
<!-- home -->
|
34
|
-
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
35
|
-
<a href="{{ '/' | relative_url }}" class="nav-link">
|
36
|
-
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
|
37
|
-
<span>{{ site.data.locales[lang].tabs.home | upcase }}</span>
|
38
|
-
</a>
|
39
|
-
</li>
|
40
|
-
<!-- the real tabs -->
|
41
|
-
{% for tab in site.tabs %}
|
42
|
-
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
|
43
|
-
<a href="{{ tab.url | relative_url }}" class="nav-link">
|
44
|
-
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
|
45
|
-
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
46
|
-
|
47
|
-
<span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
|
48
|
-
</a>
|
49
|
-
</li> <!-- .nav-item -->
|
50
|
-
{% endfor %}
|
22
|
+
</h1>
|
23
|
+
<p class="site-subtitle fst-italic mb-0">{{ site.tagline }}</p>
|
24
|
+
</header>
|
25
|
+
<!-- .profile-wrapper -->
|
51
26
|
|
52
|
-
|
27
|
+
<nav class="flex-column flex-grow-1 w-100 ps-0">
|
28
|
+
<ul class="nav">
|
29
|
+
<!-- home -->
|
30
|
+
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
31
|
+
<a href="{{ '/' | relative_url }}" class="nav-link">
|
32
|
+
<i class="fa-fw fas fa-home"></i>
|
33
|
+
<span>{{ site.data.locales[include.lang].tabs.home | upcase }}</span>
|
34
|
+
</a>
|
35
|
+
</li>
|
36
|
+
<!-- the real tabs -->
|
37
|
+
{% for tab in site.tabs %}
|
38
|
+
<li class="nav-item{% if tab.url == page.url %}{{ " active" }}{% endif %}">
|
39
|
+
<a href="{{ tab.url | relative_url }}" class="nav-link">
|
40
|
+
<i class="fa-fw {{ tab.icon }}"></i>
|
41
|
+
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
53
42
|
|
54
|
-
|
43
|
+
<span>{{ site.data.locales[include.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
|
44
|
+
</a>
|
45
|
+
</li>
|
46
|
+
<!-- .nav-item -->
|
47
|
+
{% endfor %}
|
48
|
+
</ul>
|
49
|
+
</nav>
|
55
50
|
|
51
|
+
<div class="sidebar-bottom d-flex flex-wrap align-items-center w-100">
|
56
52
|
{% unless site.theme_mode %}
|
57
|
-
<button class="mode-toggle btn" aria-label="Switch Mode">
|
53
|
+
<button type="button" class="mode-toggle btn" aria-label="Switch Mode">
|
58
54
|
<i class="fas fa-adjust"></i>
|
59
55
|
</button>
|
60
56
|
|
@@ -64,30 +60,46 @@
|
|
64
60
|
{% endunless %}
|
65
61
|
|
66
62
|
{% for entry in site.data.contact %}
|
67
|
-
{%
|
68
|
-
{
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
{
|
63
|
+
{% case entry.type %}
|
64
|
+
{% when 'github', 'twitter' %}
|
65
|
+
{%- capture url -%}
|
66
|
+
https://{{ entry.type }}.com/{{ site[entry.type].username }}
|
67
|
+
{%- endcapture -%}
|
68
|
+
{% when 'email' %}
|
73
69
|
{% assign email = site.social.email | split: '@' %}
|
74
|
-
|
75
|
-
|
76
|
-
{
|
77
|
-
{
|
78
|
-
{
|
79
|
-
{
|
80
|
-
|
70
|
+
{%- capture url -%}
|
71
|
+
javascript:location.href = 'mailto:' + ['{{ email[0] }}','{{ email[1] }}'].join('@')
|
72
|
+
{%- endcapture -%}
|
73
|
+
{% when 'rss' %}
|
74
|
+
{% assign url = '/feed.xml' | relative_url %}
|
75
|
+
{% else %}
|
76
|
+
{% assign url = entry.url %}
|
77
|
+
{% endcase %}
|
81
78
|
|
82
79
|
{% if url %}
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
{% endif %}
|
80
|
+
<a
|
81
|
+
href="{{ url }}"
|
82
|
+
aria-label="{{ entry.type }}"
|
83
|
+
{% assign link_types = '' %}
|
88
84
|
|
89
|
-
|
85
|
+
{% unless entry.noblank %}
|
86
|
+
target="_blank"
|
87
|
+
{% assign link_types = 'noopener noreferrer' %}
|
88
|
+
{% endunless %}
|
90
89
|
|
91
|
-
|
90
|
+
{% if entry.type == 'mastodon' %}
|
91
|
+
{% assign link_types = link_types | append: ' me' | strip %}
|
92
|
+
{% endif %}
|
92
93
|
|
93
|
-
|
94
|
+
{% unless link_types == empty %}
|
95
|
+
rel="{{ link_types }}"
|
96
|
+
{% endunless %}
|
97
|
+
>
|
98
|
+
<i class="{{ entry.icon }}"></i>
|
99
|
+
</a>
|
100
|
+
{% endif %}
|
101
|
+
{% endfor %}
|
102
|
+
</div>
|
103
|
+
<!-- .sidebar-bottom -->
|
104
|
+
</aside>
|
105
|
+
<!-- #sidebar -->
|
data/_includes/toc.html
CHANGED
@@ -6,11 +6,8 @@
|
|
6
6
|
{% endif %}
|
7
7
|
|
8
8
|
{% if enable_toc %}
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
<div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[lang].panel.toc -}}</div>
|
14
|
-
<nav id="toc" data-toggle="toc"></nav>
|
15
|
-
</div>
|
9
|
+
<section id="toc-wrapper" class="ps-0 pe-4 mb-5">
|
10
|
+
<h2 class="panel-heading ps-3 pt-2 mb-2">{{- site.data.locales[include.lang].panel.toc -}}</h2>
|
11
|
+
<nav id="toc"></nav>
|
12
|
+
</section>
|
16
13
|
{% endif %}
|
data/_includes/topbar.html
CHANGED
@@ -1,71 +1,77 @@
|
|
1
|
-
<!--
|
2
|
-
The Top Bar
|
3
|
-
-->
|
1
|
+
<!-- The Top Bar -->
|
4
2
|
|
5
|
-
<
|
6
|
-
<div
|
7
|
-
|
3
|
+
<header id="topbar-wrapper" aria-label="Top Bar">
|
4
|
+
<div
|
5
|
+
id="topbar"
|
6
|
+
class="d-flex align-items-center justify-content-between px-lg-3 h-100"
|
7
|
+
>
|
8
|
+
<nav id="breadcrumb" aria-label="Breadcrumb">
|
9
|
+
{% assign paths = page.url | split: '/' %}
|
8
10
|
|
9
|
-
|
11
|
+
{% if paths.size == 0 or page.layout == 'home' %}
|
12
|
+
<!-- index page -->
|
13
|
+
<span>{{ site.data.locales[include.lang].tabs.home | capitalize }}</span>
|
10
14
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
{{ site.data.locales[lang].tabs
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
15
|
+
{% else %}
|
16
|
+
{% for item in paths %}
|
17
|
+
{% if forloop.first %}
|
18
|
+
<span>
|
19
|
+
<a href="{{ '/' | relative_url }}">
|
20
|
+
{{ site.data.locales[include.lang].tabs.home | capitalize }}
|
21
|
+
</a>
|
22
|
+
</span>
|
23
|
+
|
24
|
+
{% elsif forloop.last %}
|
25
|
+
{% if page.collection == 'tabs' %}
|
26
|
+
<span>{{ site.data.locales[include.lang].tabs[item] | default: page.title }}</span>
|
27
|
+
{% else %}
|
28
|
+
<span>{{ page.title }}</span>
|
29
|
+
{% endif %}
|
30
|
+
|
31
|
+
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
32
|
+
<span>
|
33
|
+
<a href="{{ item | relative_url }}">
|
34
|
+
{{ site.data.locales[include.lang].tabs[item] | default: page.title }}
|
35
|
+
</a>
|
36
|
+
</span>
|
32
37
|
{% endif %}
|
38
|
+
{% endfor %}
|
39
|
+
{% endif %}
|
40
|
+
</nav>
|
41
|
+
<!-- endof #breadcrumb -->
|
33
42
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
{{ site.data.locales[lang].tabs[item] | default: page.title }}
|
38
|
-
</a>
|
39
|
-
</span>
|
40
|
-
{% endif %}
|
41
|
-
|
42
|
-
{% endfor %}
|
43
|
-
|
44
|
-
{% endif %}
|
45
|
-
|
46
|
-
</span><!-- endof #breadcrumb -->
|
47
|
-
|
48
|
-
<i id="sidebar-trigger" class="fas fa-bars fa-fw"></i>
|
43
|
+
<button type="button" id="sidebar-trigger" class="btn btn-link">
|
44
|
+
<i class="fas fa-bars fa-fw"></i>
|
45
|
+
</button>
|
49
46
|
|
50
47
|
<div id="topbar-title">
|
51
48
|
{% if page.layout == 'home' %}
|
52
|
-
{{- site.data.locales[lang].title | default: site.title -}}
|
53
|
-
{% elsif page.collection == 'tabs' or page.
|
49
|
+
{{- site.data.locales[include.lang].title | default: site.title -}}
|
50
|
+
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
54
51
|
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
55
|
-
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
52
|
+
{{- site.data.locales[include.lang].tabs[tab_key] | default: page.title -}}
|
56
53
|
{% else %}
|
57
|
-
{{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
|
54
|
+
{{- site.data.locales[include.lang].layout[page.layout] | default: page.layout | capitalize -}}
|
58
55
|
{% endif %}
|
59
56
|
</div>
|
60
57
|
|
61
|
-
<
|
62
|
-
<span id="search-wrapper" class="align-items-center">
|
58
|
+
<button type="button" id="search-trigger" class="btn btn-link">
|
63
59
|
<i class="fas fa-search fa-fw"></i>
|
64
|
-
|
65
|
-
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
|
66
|
-
<i class="fa fa-times-circle fa-fw" id="search-cleaner"></i>
|
67
|
-
</span>
|
68
|
-
<span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
|
69
|
-
</div>
|
60
|
+
</button>
|
70
61
|
|
71
|
-
|
62
|
+
<search class="align-items-center ms-3 ms-lg-0">
|
63
|
+
<i class="fas fa-search fa-fw"></i>
|
64
|
+
<input
|
65
|
+
class="form-control"
|
66
|
+
id="search-input"
|
67
|
+
type="search"
|
68
|
+
aria-label="search"
|
69
|
+
autocomplete="off"
|
70
|
+
placeholder="{{ site.data.locales[include.lang].search.hint | capitalize }}..."
|
71
|
+
>
|
72
|
+
</search>
|
73
|
+
<button type="button" class="btn btn-link text-decoration-none" id="search-cancel">
|
74
|
+
{{- site.data.locales[include.lang].search.cancel -}}
|
75
|
+
</button>
|
76
|
+
</div>
|
77
|
+
</header>
|
@@ -1,29 +1,27 @@
|
|
1
|
-
|
2
|
-
The trending tags list
|
3
|
-
{% endcomment %}
|
1
|
+
<!-- The trending tags list -->
|
4
2
|
|
5
3
|
{% assign MAX = 10 %}
|
6
4
|
|
7
|
-
{% assign size_list =
|
8
|
-
{% assign tag_list =
|
5
|
+
{% assign size_list = '' | split: '' %}
|
6
|
+
{% assign tag_list = '' | split: '' %}
|
9
7
|
|
10
8
|
{% for tag in site.tags %}
|
11
9
|
{% assign size = tag | last | size %}
|
12
10
|
{% assign size_list = size_list | push: size %}
|
13
11
|
|
14
|
-
{% assign tag_str = tag | first | append:
|
15
|
-
{% assign tag_list =
|
12
|
+
{% assign tag_str = tag | first | append: '::' | append: size %}
|
13
|
+
{% assign tag_list = tag_list | push: tag_str %}
|
16
14
|
{% endfor %}
|
17
15
|
|
18
16
|
{% assign size_list = size_list | sort | reverse %}
|
19
17
|
|
20
18
|
{% assign tag_list = tag_list | sort_natural %}
|
21
19
|
|
22
|
-
{% assign trending_tags =
|
20
|
+
{% assign trending_tags = '' | split: '' %}
|
23
21
|
|
24
22
|
{% for size in size_list limit: MAX %}
|
25
23
|
{% for tag_str in tag_list %}
|
26
|
-
{% assign tag = tag_str | split:
|
24
|
+
{% assign tag = tag_str | split: '::' %}
|
27
25
|
{% assign tag_name = tag | first %}
|
28
26
|
{% assign tag_size = tag | last | plus: 0 %}
|
29
27
|
{% if tag_size == size %}
|
@@ -36,15 +34,13 @@
|
|
36
34
|
{% endfor %}
|
37
35
|
|
38
36
|
{% if trending_tags.size > 0 %}
|
39
|
-
<
|
40
|
-
<
|
41
|
-
<div class="d-flex flex-wrap mt-3 mb-1
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
{% endfor %}
|
47
|
-
|
37
|
+
<section>
|
38
|
+
<h2 class="panel-heading">{{- site.data.locales[include.lang].panel.trending_tags -}}</h2>
|
39
|
+
<div class="d-flex flex-wrap mt-3 mb-1 me-3">
|
40
|
+
{% for tag_name in trending_tags %}
|
41
|
+
{% assign url = tag_name | slugify | url_encode | prepend: '/tags/' | append: '/' %}
|
42
|
+
<a class="post-tag btn btn-outline-primary" href="{{ url | relative_url }}">{{ tag_name }}</a>
|
43
|
+
{% endfor %}
|
48
44
|
</div>
|
49
|
-
</
|
45
|
+
</section>
|
50
46
|
{% endif %}
|