refactor: reduce language include file
This commit is contained in:
parent
6852ceb280
commit
d96fa5aa0c
23 changed files with 59 additions and 85 deletions
|
@ -4,8 +4,8 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
{% assign wrap_elem = include.wrap | default: 'em' %}
|
{% assign wrap_elem = include.wrap | default: 'em' %}
|
||||||
{% assign df_strftime = site.data.locales[lang].df.post.strftime | default: '%d/%m/%Y' %}
|
{% assign df_strftime = site.data.locales[site.lang].df.post.strftime | default: '%d/%m/%Y' %}
|
||||||
{% assign df_dayjs = site.data.locales[lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
|
{% assign df_dayjs = site.data.locales[site.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
|
||||||
|
|
||||||
<{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}"
|
<{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}"
|
||||||
data-ts="{{ include.date | date: '%s' }}"
|
data-ts="{{ include.date | date: '%s' }}"
|
||||||
|
|
|
@ -7,9 +7,9 @@
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
© {{ 'now' | date: "%Y" }}
|
© {{ 'now' | date: "%Y" }}
|
||||||
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
|
<a href="{{ site.social.links[0] }}">{{ site.social.name }}</a>.
|
||||||
{% if site.data.locales[lang].copyright.brief %}
|
{% if site.data.locales[site.lang].copyright.brief %}
|
||||||
<span data-toggle="tooltip" data-placement="top"
|
<span data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ site.data.locales[lang].copyright.verbose }}">{{ site.data.locales[lang].copyright.brief }}</span>
|
title="{{ site.data.locales[site.lang].copyright.verbose }}">{{ site.data.locales[site.lang].copyright.brief }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
|
<a href="https://github.com/cotes2020/jekyll-theme-chirpy" target="_blank" rel="noopener">Chirpy</a>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].meta
|
{{ site.data.locales[site.lang].meta
|
||||||
| default: 'Powered by :PLATFORM with :THEME theme.'
|
| default: 'Powered by :PLATFORM with :THEME theme.'
|
||||||
| replace: ':PLATFORM', _platform | replace: ':THEME', _theme
|
| replace: ':PLATFORM', _platform | replace: ':THEME', _theme
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,8 +0,0 @@
|
||||||
{% comment %}
|
|
||||||
Detect appearance language and return it through variable "lang"
|
|
||||||
{% endcomment %}
|
|
||||||
{% if site.data.locales[site.lang] %}
|
|
||||||
{% assign lang = site.lang %}
|
|
||||||
{% else %}
|
|
||||||
{% assign lang = 'en' %}
|
|
||||||
{% endif %}
|
|
|
@ -5,24 +5,24 @@
|
||||||
<div class="post-navigation d-flex justify-content-between">
|
<div class="post-navigation d-flex justify-content-between">
|
||||||
{% if page.previous.url %}
|
{% if page.previous.url %}
|
||||||
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
|
<a href="{{ site.baseurl }}{{ page.previous.url }}" class="btn btn-outline-primary"
|
||||||
prompt="{{ site.data.locales[lang].post.button.previous }}">
|
prompt="{{ site.data.locales[site.lang].post.button.previous }}">
|
||||||
<p>{{ page.previous.title }}</p>
|
<p>{{ page.previous.title }}</p>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="btn btn-outline-primary disabled"
|
<div class="btn btn-outline-primary disabled"
|
||||||
prompt="{{ site.data.locales[lang].post.button.previous }}">
|
prompt="{{ site.data.locales[site.lang].post.button.previous }}">
|
||||||
<p>-</p>
|
<p>-</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if page.next.url %}
|
{% if page.next.url %}
|
||||||
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
|
<a href="{{ site.baseurl }}{{page.next.url}}" class="btn btn-outline-primary"
|
||||||
prompt="{{ site.data.locales[lang].post.button.next }}">
|
prompt="{{ site.data.locales[site.lang].post.button.next }}">
|
||||||
<p>{{ page.next.title }}</p>
|
<p>{{ page.next.title }}</p>
|
||||||
</a>
|
</a>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="btn btn-outline-primary disabled"
|
<div class="btn btn-outline-primary disabled"
|
||||||
prompt="{{ site.data.locales[lang].post.button.next }}">
|
prompt="{{ site.data.locales[site.lang].post.button.next }}">
|
||||||
<p>-</p>
|
<p>-</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<div class="share-wrapper">
|
<div class="share-wrapper">
|
||||||
<span class="share-label text-muted mr-1">{{ site.data.locales[lang].post.share }}</span>
|
<span class="share-label text-muted mr-1">{{ site.data.locales[site.lang].post.share }}</span>
|
||||||
<span class="share-icons">
|
<span class="share-icons">
|
||||||
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
{% capture title %}{{ page.title }} - {{ site.title }}{% endcapture %}
|
||||||
{% assign title = title | url_encode %}
|
{% assign title = title | url_encode %}
|
||||||
|
@ -19,8 +19,8 @@
|
||||||
|
|
||||||
<i id="copy-link" class="fa-fw fas fa-link small"
|
<i id="copy-link" class="fa-fw fas fa-link small"
|
||||||
data-toggle="tooltip" data-placement="top"
|
data-toggle="tooltip" data-placement="top"
|
||||||
title="{{ site.data.locales[lang].post.button.share_link.title }}"
|
title="{{ site.data.locales[site.lang].post.button.share_link.title }}"
|
||||||
data-title-succeed="{{ site.data.locales[lang].post.button.share_link.succeed }}">
|
data-title-succeed="{{ site.data.locales[site.lang].post.button.share_link.succeed }}">
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -16,13 +16,13 @@
|
||||||
{% endunless %}
|
{% endunless %}
|
||||||
|
|
||||||
{% capture read_prompt %}
|
{% capture read_prompt %}
|
||||||
{{- site.data.locales[lang].post.read_time.prompt -}}
|
{{- site.data.locales[site.lang].post.read_time.prompt -}}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
<!-- return element -->
|
<!-- return element -->
|
||||||
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
<span class="readtime" data-toggle="tooltip" data-placement="bottom"
|
||||||
title="{{ words }} {{ site.data.locales[lang].post.words }}">
|
title="{{ words }} {{ site.data.locales[site.lang].post.words }}">
|
||||||
<em>{{- read_time -}}{{" "}}{{- site.data.locales[lang].post.read_time.unit -}}</em>
|
<em>{{- read_time -}}{{" "}}{{- site.data.locales[site.lang].post.read_time.unit -}}</em>
|
||||||
{%- if include.prompt -%}
|
{%- if include.prompt -%}
|
||||||
{%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
|
{%- assign _prompt_words = read_prompt | number_of_words: 'auto' -%}
|
||||||
{%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
|
{%- unless _prompt_words > 1 -%}{{ " " }}{%- endunless -%}{{ read_prompt }}
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
| append: '<div class="code-header">'
|
| append: '<div class="code-header">'
|
||||||
| append: _label
|
| append: _label
|
||||||
| append: '<button aria-label="copy" data-title-succeed="'
|
| append: '<button aria-label="copy" data-title-succeed="'
|
||||||
| append: site.data.locales[lang].post.button.copy_code.succeed
|
| append: site.data.locales[site.lang].post.button.copy_code.succeed
|
||||||
| append: '"><i class="far fa-clipboard"></i></button></div>'
|
| append: '"><i class="far fa-clipboard"></i></button></div>'
|
||||||
| append: '<div class="highlight"><code>'
|
| append: '<div class="highlight"><code>'
|
||||||
%}
|
%}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
{% if index_list.size > 0 %}
|
{% if index_list.size > 0 %}
|
||||||
<div id="related-posts" class="mb-2 mb-sm-4">
|
<div id="related-posts" class="mb-2 mb-sm-4">
|
||||||
<h3 class="pt-2 mb-4 ml-1"
|
<h3 class="pt-2 mb-4 ml-1"
|
||||||
data-toc-skip>{{ site.data.locales[lang].post.relate_posts }}</h3>
|
data-toc-skip>{{ site.data.locales[site.lang].post.relate_posts }}</h3>
|
||||||
<div class="card-deck mb-4">
|
<div class="card-deck mb-4">
|
||||||
{% for entry in index_list %}
|
{% for entry in index_list %}
|
||||||
{% assign index = entry | plus: 0 %}
|
{% assign index = entry | plus: 0 %}
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
</div>
|
</div>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% capture not_found %}<p class="mt-5">{{ site.data.locales[lang].search.no_results }}</p>{% endcapture %}
|
{% capture not_found %}<p class="mt-5">{{ site.data.locales[site.lang].search.no_results }}</p>{% endcapture %}
|
||||||
|
|
||||||
<script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>
|
<script src="{{ site.data.assets[origin].search.js | relative_url }}"></script>
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
<li class="nav-item{% if page.layout == 'home' %}{{ " active" }}{% endif %}">
|
||||||
<a href="{{ '/' | relative_url }}" class="nav-link">
|
<a href="{{ '/' | relative_url }}" class="nav-link">
|
||||||
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
|
<i class="fa-fw fas fa-home ml-xl-3 mr-xl-3 unloaded"></i>
|
||||||
<span>{{ site.data.locales[lang].tabs.home | upcase }}</span>
|
<span>{{ site.data.locales[site.lang].tabs.home | upcase }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!-- the real tabs -->
|
<!-- the real tabs -->
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
|
<i class="fa-fw {{ tab.icon }} ml-xl-3 mr-xl-3 unloaded"></i>
|
||||||
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
{% capture tab_name %}{{ tab.url | split: '/' }}{% endcapture %}
|
||||||
|
|
||||||
<span>{{ site.data.locales[lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
|
<span>{{ site.data.locales[site.lang].tabs.[tab_name] | default: tab.title | upcase }}</span>
|
||||||
</a>
|
</a>
|
||||||
</li> <!-- .nav-item -->
|
</li> <!-- .nav-item -->
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
<script src="{{ site.data.assets[origin].bootstrap-toc.js | relative_url }}"></script>
|
<script src="{{ site.data.assets[origin].bootstrap-toc.js | relative_url }}"></script>
|
||||||
|
|
||||||
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
|
<div id="toc-wrapper" class="pl-0 pr-4 mb-5">
|
||||||
<div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[lang].panel.toc -}}</div>
|
<div class="panel-heading pl-3 pt-2 mb-2">{{- site.data.locales[site.lang].panel.toc -}}</div>
|
||||||
<nav id="toc" data-toggle="toc"></nav>
|
<nav id="toc" data-toggle="toc"></nav>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
{% if paths.size == 0 or page.layout == 'home' %}
|
{% if paths.size == 0 or page.layout == 'home' %}
|
||||||
<!-- index page -->
|
<!-- index page -->
|
||||||
<span>{{ site.data.locales[lang].tabs.home | capitalize }}</span>
|
<span>{{ site.data.locales[site.lang].tabs.home | capitalize }}</span>
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
|
@ -19,14 +19,14 @@
|
||||||
{% if forloop.first %}
|
{% if forloop.first %}
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ '/' | relative_url }}">
|
<a href="{{ '/' | relative_url }}">
|
||||||
{{ site.data.locales[lang].tabs.home | capitalize }}
|
{{ site.data.locales[site.lang].tabs.home | capitalize }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{% elsif forloop.last %}
|
{% elsif forloop.last %}
|
||||||
|
|
||||||
{% if page.collection == 'tabs' %}
|
{% if page.collection == 'tabs' %}
|
||||||
<span>{{ site.data.locales[lang].tabs[item] | default: page.title }}</span>
|
<span>{{ site.data.locales[site.lang].tabs[item] | default: page.title }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span>{{ page.title }}</span>
|
<span>{{ page.title }}</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
{% elsif page.layout == 'category' or page.layout == 'tag' %}
|
||||||
<span>
|
<span>
|
||||||
<a href="{{ item | relative_url }}">
|
<a href="{{ item | relative_url }}">
|
||||||
{{ site.data.locales[lang].tabs[item] | default: page.title }}
|
{{ site.data.locales[site.lang].tabs[item] | default: page.title }}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -49,12 +49,12 @@
|
||||||
|
|
||||||
<div id="topbar-title">
|
<div id="topbar-title">
|
||||||
{% if page.layout == 'home' %}
|
{% if page.layout == 'home' %}
|
||||||
{{- site.data.locales[lang].title | default: site.title -}}
|
{{- site.data.locales[site.lang].title | default: site.title -}}
|
||||||
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
{% elsif page.collection == 'tabs' or page.layout == 'page' %}
|
||||||
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
{%- capture tab_key -%}{{ page.url | split: '/' }}{%- endcapture -%}
|
||||||
{{- site.data.locales[lang].tabs[tab_key] | default: page.title -}}
|
{{- site.data.locales[site.lang].tabs[tab_key] | default: page.title -}}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{- site.data.locales[lang].layout[page.layout] | default: page.layout | capitalize -}}
|
{{- site.data.locales[site.lang].layout[page.layout] | default: page.layout | capitalize -}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -62,9 +62,9 @@
|
||||||
<span id="search-wrapper" class="align-items-center">
|
<span id="search-wrapper" class="align-items-center">
|
||||||
<i class="fas fa-search fa-fw"></i>
|
<i class="fas fa-search fa-fw"></i>
|
||||||
<input class="form-control" id="search-input" type="search"
|
<input class="form-control" id="search-input" type="search"
|
||||||
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[lang].search.hint | capitalize }}...">
|
aria-label="search" autocomplete="off" placeholder="{{ site.data.locales[site.lang].search.hint | capitalize }}...">
|
||||||
</span>
|
</span>
|
||||||
<span id="search-cancel" >{{ site.data.locales[lang].search.cancel }}</span>
|
<span id="search-cancel" >{{ site.data.locales[site.lang].search.cancel }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
|
|
||||||
{% if trending_tags.size > 0 %}
|
{% if trending_tags.size > 0 %}
|
||||||
<div id="access-tags">
|
<div id="access-tags">
|
||||||
<div class="panel-heading">{{- site.data.locales[lang].panel.trending_tags -}}</div>
|
<div class="panel-heading">{{- site.data.locales[site.lang].panel.trending_tags -}}</div>
|
||||||
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
<div class="d-flex flex-wrap mt-3 mb-1 mr-3">
|
||||||
|
|
||||||
{% for tag_name in trending_tags %}
|
{% for tag_name in trending_tags %}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{% if update_list.size > 0 %}
|
{% if update_list.size > 0 %}
|
||||||
|
|
||||||
<div id="access-lastmod" class="post">
|
<div id="access-lastmod" class="post">
|
||||||
<div class="panel-heading">{{- site.data.locales[lang].panel.lastmod -}}</div>
|
<div class="panel-heading">{{- site.data.locales[site.lang].panel.lastmod -}}</div>
|
||||||
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
<ul class="post-content pl-0 pb-1 ml-1 mt-2">
|
||||||
{% for item in update_list %}
|
{% for item in update_list %}
|
||||||
{% assign index = item | split: "::" | last | plus: 0 %}
|
{% assign index = item | split: "::" | last | plus: 0 %}
|
||||||
|
|
|
@ -3,10 +3,8 @@ layout: page
|
||||||
# The Archives of posts.
|
# The Archives of posts.
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
{% assign df_strftime_m = site.data.locales[site.lang].df.archives.strftime | default: '/ %m' %}
|
||||||
|
{% assign df_dayjs_m = site.data.locales[site.lang].df.archives.dayjs | default: '/ MM' %}
|
||||||
{% assign df_strftime_m = site.data.locales[lang].df.archives.strftime | default: '/ %m' %}
|
|
||||||
{% assign df_dayjs_m = site.data.locales[lang].df.archives.dayjs | default: '/ MM' %}
|
|
||||||
|
|
||||||
<div id="archives" class="pl-xl-3">
|
<div id="archives" class="pl-xl-3">
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@ layout: page
|
||||||
# All the Categories of posts
|
# All the Categories of posts
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
{% assign HEAD_PREFIX = "h_" %}
|
{% assign HEAD_PREFIX = "h_" %}
|
||||||
{% assign LIST_PREFIX = "l_" %}
|
{% assign LIST_PREFIX = "l_" %}
|
||||||
|
|
||||||
|
@ -48,22 +46,22 @@ layout: page
|
||||||
{% if sub_categories_size > 0 %}
|
{% if sub_categories_size > 0 %}
|
||||||
{{ sub_categories_size }}
|
{{ sub_categories_size }}
|
||||||
{% if sub_categories_size > 1 %}
|
{% if sub_categories_size > 1 %}
|
||||||
{{ site.data.locales[lang].categories.category_measure.plural
|
{{ site.data.locales[site.lang].categories.category_measure.plural
|
||||||
| default: site.data.locales[lang].categories.category_measure }}
|
| default: site.data.locales[site.lang].categories.category_measure }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ site.data.locales[lang].categories.category_measure.singular
|
{{ site.data.locales[site.lang].categories.category_measure.singular
|
||||||
| default: site.data.locales[lang].categories.category_measure }}
|
| default: site.data.locales[site.lang].categories.category_measure }}
|
||||||
{% endif %},
|
{% endif %},
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ top_posts_size }}
|
{{ top_posts_size }}
|
||||||
|
|
||||||
{% if top_posts_size > 1 %}
|
{% if top_posts_size > 1 %}
|
||||||
{{ site.data.locales[lang].categories.post_measure.plural
|
{{ site.data.locales[site.lang].categories.post_measure.plural
|
||||||
| default: site.data.locales[lang].categories.post_measure }}
|
| default: site.data.locales[site.lang].categories.post_measure }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ site.data.locales[lang].categories.post_measure.singular
|
{{ site.data.locales[site.lang].categories.post_measure.singular
|
||||||
| default: site.data.locales[lang].categories.post_measure }}
|
| default: site.data.locales[site.lang].categories.post_measure }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
@ -99,11 +97,11 @@ layout: page
|
||||||
{{ posts_size }}
|
{{ posts_size }}
|
||||||
|
|
||||||
{% if posts_size > 1 %}
|
{% if posts_size > 1 %}
|
||||||
{{ site.data.locales[lang].categories.post_measure.plural
|
{{ site.data.locales[site.lang].categories.post_measure.plural
|
||||||
| default: site.data.locales[lang].categories.post_measure }}
|
| default: site.data.locales[site.lang].categories.post_measure }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ site.data.locales[lang].categories.post_measure.singular
|
{{ site.data.locales[site.lang].categories.post_measure.singular
|
||||||
| default: site.data.locales[lang].categories.post_measure }}
|
| default: site.data.locales[site.lang].categories.post_measure }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -3,8 +3,6 @@ layout: page
|
||||||
# The Category layout
|
# The Category layout
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
<div id="page-category">
|
<div id="page-category">
|
||||||
<h1 class="pl-lg-2">
|
<h1 class="pl-lg-2">
|
||||||
<i class="far fa-folder-open fa-fw text-muted"></i>
|
<i class="far fa-folder-open fa-fw text-muted"></i>
|
||||||
|
|
|
@ -5,8 +5,6 @@ layout: compress
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
{% include assets-origin.html %}
|
{% include assets-origin.html %}
|
||||||
|
|
||||||
{% capture prefer_mode %}
|
{% capture prefer_mode %}
|
||||||
|
@ -56,9 +54,9 @@ layout: compress
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toast-body text-center pt-0">
|
<div class="toast-body text-center pt-0">
|
||||||
<p class="pl-2 pr-2 mb-3">{{ site.data.locales[lang].notification.update_found }}</p>
|
<p class="pl-2 pr-2 mb-3">{{ site.data.locales[site.lang].notification.update_found }}</p>
|
||||||
<button type="button" class="btn btn-primary" aria-label="Update">
|
<button type="button" class="btn btn-primary" aria-label="Update">
|
||||||
{{ site.data.locales[lang].notification.update }}
|
{{ site.data.locales[site.lang].notification.update }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,8 +3,6 @@ layout: page
|
||||||
# The Home page layout
|
# The Home page layout
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
{% assign pinned = site.posts | where: "pin", "true" %}
|
{% assign pinned = site.posts | where: "pin", "true" %}
|
||||||
{% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
|
{% assign default = site.posts | where_exp: "item", "item.pin != true and item.hidden != true" %}
|
||||||
|
|
||||||
|
@ -79,7 +77,7 @@ layout: page
|
||||||
{% if post.pin %}
|
{% if post.pin %}
|
||||||
<div class="pin">
|
<div class="pin">
|
||||||
<i class="fas fa-thumbtack fa-fw"></i>
|
<i class="fas fa-thumbtack fa-fw"></i>
|
||||||
<span>{{ site.data.locales[lang].post.pin_prompt }}</span>
|
<span>{{ site.data.locales[site.lang].post.pin_prompt }}</span>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
layout: default
|
layout: default
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
{% include assets-origin.html %}
|
{% include assets-origin.html %}
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -22,7 +20,7 @@ layout: default
|
||||||
|
|
||||||
{% if page.layout == 'page' or page.collection == 'tabs' %}
|
{% if page.layout == 'page' or page.collection == 'tabs' %}
|
||||||
{% assign tab_key = page.title | downcase %}
|
{% assign tab_key = page.title | downcase %}
|
||||||
{% assign title = site.data.locales[lang].tabs[tab_key] | default: page.title %}
|
{% assign title = site.data.locales[site.lang].tabs[tab_key] | default: page.title %}
|
||||||
<h1 class="dynamic-title">
|
<h1 class="dynamic-title">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
|
@ -9,21 +9,19 @@ tail_includes:
|
||||||
- comments
|
- comments
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
<h1 data-toc-skip>{{ page.title }}</h1>
|
<h1 data-toc-skip>{{ page.title }}</h1>
|
||||||
|
|
||||||
<div class="post-meta text-muted">
|
<div class="post-meta text-muted">
|
||||||
<!-- published date -->
|
<!-- published date -->
|
||||||
<span>
|
<span>
|
||||||
{{ site.data.locales[lang].post.posted }}
|
{{ site.data.locales[site.lang].post.posted }}
|
||||||
{% include datetime.html date=page.date tooltip=true %}
|
{% include datetime.html date=page.date tooltip=true %}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- lastmod date -->
|
<!-- lastmod date -->
|
||||||
{% if page.last_modified_at %}
|
{% if page.last_modified_at %}
|
||||||
<span>
|
<span>
|
||||||
{{ site.data.locales[lang].post.updated }}
|
{{ site.data.locales[site.lang].post.updated }}
|
||||||
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
{% include datetime.html date=page.last_modified_at tooltip=true %}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -65,7 +63,7 @@ tail_includes:
|
||||||
{% assign authors = page.authors %}
|
{% assign authors = page.authors %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].post.written_by }}
|
{{ site.data.locales[site.lang].post.written_by }}
|
||||||
|
|
||||||
<em>
|
<em>
|
||||||
{% if authors %}
|
{% if authors %}
|
||||||
|
@ -86,7 +84,7 @@ tail_includes:
|
||||||
<em id="pv" class="pageviews">
|
<em id="pv" class="pageviews">
|
||||||
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
<i class="fas fa-spinner fa-spin fa-fw"></i>
|
||||||
</em>
|
</em>
|
||||||
{{ site.data.locales[lang].post.pageview_measure }}
|
{{ site.data.locales[site.lang].post.pageview_measure }}
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -132,15 +130,15 @@ tail_includes:
|
||||||
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
d-flex justify-content-between align-items-center mt-3 pt-5 pb-2">
|
||||||
<div class="license-wrapper">
|
<div class="license-wrapper">
|
||||||
|
|
||||||
{% if site.data.locales[lang].copyright.license.template %}
|
{% if site.data.locales[site.lang].copyright.license.template %}
|
||||||
|
|
||||||
{% capture _replacement %}
|
{% capture _replacement %}
|
||||||
<a href="{{ site.data.locales[lang].copyright.license.link }}">
|
<a href="{{ site.data.locales[site.lang].copyright.license.link }}">
|
||||||
{{ site.data.locales[lang].copyright.license.name }}
|
{{ site.data.locales[site.lang].copyright.license.name }}
|
||||||
</a>
|
</a>
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
{{ site.data.locales[lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
{{ site.data.locales[site.lang].copyright.license.template | replace: ':LICENSE_NAME', _replacement }}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -3,8 +3,6 @@ layout: page
|
||||||
# The layout for Tag page
|
# The layout for Tag page
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
<div id="page-tag">
|
<div id="page-tag">
|
||||||
<h1 class="pl-lg-2">
|
<h1 class="pl-lg-2">
|
||||||
<i class="fa fa-tag fa-fw text-muted"></i>
|
<i class="fa fa-tag fa-fw text-muted"></i>
|
||||||
|
|
|
@ -9,8 +9,6 @@ redirect_from:
|
||||||
- /posts/
|
- /posts/
|
||||||
---
|
---
|
||||||
|
|
||||||
{% include lang.html %}
|
|
||||||
|
|
||||||
<div class="lead">
|
<div class="lead">
|
||||||
<p>{{site.data.locales[lang].not_found.statment }}</p>
|
<p>{{site.data.locales[site.lang].not_found.statment }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue