feat(i18n): add switchTheme i18n
This commit is contained in:
@@ -24,10 +24,15 @@ other = "Categories"
|
|||||||
# === Taxonomy ===
|
# === Taxonomy ===
|
||||||
|
|
||||||
# === Pagination ===
|
# === Pagination ===
|
||||||
[More]
|
[more]
|
||||||
other = "More"
|
other = "More"
|
||||||
# === Pagination ===
|
# === Pagination ===
|
||||||
|
|
||||||
|
# === partials/header.html ===
|
||||||
|
[switchTheme]
|
||||||
|
other = "Switch Theme"
|
||||||
|
# === partials/header.html ===
|
||||||
|
|
||||||
# === partials/comments.html ===
|
# === partials/comments.html ===
|
||||||
[valineLang]
|
[valineLang]
|
||||||
other = "en"
|
other = "en"
|
||||||
@@ -75,7 +80,7 @@ other = "Back"
|
|||||||
[home]
|
[home]
|
||||||
other = "Home"
|
other = "Home"
|
||||||
|
|
||||||
[readmore]
|
[readMore]
|
||||||
other = "Read More"
|
other = "Read More"
|
||||||
|
|
||||||
[day]
|
[day]
|
||||||
|
|||||||
@@ -24,10 +24,15 @@ other = "分类"
|
|||||||
# === Taxonomy ===
|
# === Taxonomy ===
|
||||||
|
|
||||||
# === Pagination ===
|
# === Pagination ===
|
||||||
[More]
|
[more]
|
||||||
other = "更多"
|
other = "更多"
|
||||||
# === Pagination ===
|
# === Pagination ===
|
||||||
|
|
||||||
|
# === partials/header.html ===
|
||||||
|
[switchTheme]
|
||||||
|
other = "切换主题"
|
||||||
|
# === partials/header.html ===
|
||||||
|
|
||||||
# === partials/comments.html ===
|
# === partials/comments.html ===
|
||||||
[valineLang]
|
[valineLang]
|
||||||
other = "zh-cn"
|
other = "zh-cn"
|
||||||
@@ -78,7 +83,7 @@ other = "返回"
|
|||||||
[home]
|
[home]
|
||||||
other = "主页"
|
other = "主页"
|
||||||
|
|
||||||
[readmore]
|
[readMore]
|
||||||
other = "阅读全文"
|
other = "阅读全文"
|
||||||
|
|
||||||
[day]
|
[day]
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="post-footer">
|
<div class="post-footer">
|
||||||
<a href="{{ .Permalink }}">{{ T "readmore" }}</a>
|
<a href="{{ .Permalink }}">{{ T "readMore" }}</a>
|
||||||
{{ with .Params.tags }}
|
{{ with .Params.tags }}
|
||||||
<div class="post-tags">
|
<div class="post-tags">
|
||||||
{{ range . }}
|
{{ range . }}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@
|
|||||||
<!-- gitalk Comment System-->
|
<!-- gitalk Comment System-->
|
||||||
{{- if .Site.Params.gitalk.owner -}}
|
{{- if .Site.Params.gitalk.owner -}}
|
||||||
<div id="gitalk-container"></div>
|
<div id="gitalk-container"></div>
|
||||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.gitalk_css }}
|
{{ if .Site.Params.cdn.gitalk_css }}
|
||||||
{{ .Site.Params.cdn.gitalk_css | safeHTML }}
|
{{ .Site.Params.cdn.gitalk_css | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $res := resources.Get "css/lib/gitalk/gitalk.css" | resources.Minify -}}
|
{{- $res := resources.Get "css/lib/gitalk/gitalk.css" | resources.Minify -}}
|
||||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.gitalk_js }}
|
{{ if .Site.Params.cdn.gitalk_js }}
|
||||||
{{ .Site.Params.cdn.gitalk_js | safeHTML }}
|
{{ .Site.Params.cdn.gitalk_js | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $res := resources.Get "js/lib/gitalk/gitalk.min.js" | resources.Minify -}}
|
{{- $res := resources.Get "js/lib/gitalk/gitalk.min.js" | resources.Minify -}}
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
<!-- valine -->
|
<!-- valine -->
|
||||||
{{- if .Site.Params.valine.enable -}}
|
{{- if .Site.Params.valine.enable -}}
|
||||||
<div id="vcomments"></div>
|
<div id="vcomments"></div>
|
||||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.valine_js }}
|
{{ if .Site.Params.cdn.valine_js }}
|
||||||
{{ .Site.Params.cdn.valine_js | safeHTML }}
|
{{ .Site.Params.cdn.valine_js | safeHTML }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- $res := resources.Get "js/lib/valine/Valine.min.js" | resources.Minify -}}
|
{{- $res := resources.Get "js/lib/valine/Valine.min.js" | resources.Minify -}}
|
||||||
|
|||||||
@@ -8,12 +8,13 @@
|
|||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
<a class="menu-item{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) | or (eq $currentPage.RelPermalink .URL) }} active{{ end }}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title="Switch Theme"></i></a>
|
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title={{ T "switchTheme" }}></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<nav class="navbar-mobile">
|
<nav class="navbar-mobile">
|
||||||
<div class="navbar-container">
|
<div class="navbar-container">
|
||||||
<div class="navbar-header">
|
<div class="navbar-header">
|
||||||
<div class="navbar-header-title animated bounceIn">
|
<div class="navbar-header-title animated bounceIn">
|
||||||
<a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a>
|
<a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a>
|
||||||
@@ -27,7 +28,7 @@
|
|||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a>
|
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw" title={{ T "switchTheme" }}></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if gt (len $pages) 5 }}
|
{{ if gt (len $pages) 5 }}
|
||||||
<span class="more-post">
|
<span class="more-post">
|
||||||
<a href="{{ .Permalink }}" class="more-post-link">{{ T "More" }} >></a>
|
<a href="{{ .Permalink }}" class="more-post-link">{{ T "more" }} >></a>
|
||||||
</span>
|
</span>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user