aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/post
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/post')
-rw-r--r--layouts/partials/post/copyright.html11
-rw-r--r--layouts/partials/post/reward.html7
-rw-r--r--layouts/partials/post/toc.html2
3 files changed, 9 insertions, 11 deletions
diff --git a/layouts/partials/post/copyright.html b/layouts/partials/post/copyright.html
index 8a8a350..71494d0 100644
--- a/layouts/partials/post/copyright.html
+++ b/layouts/partials/post/copyright.html
@@ -1,24 +1,23 @@
{{ if or .Params.contentCopyright (and .Site.Params.contentCopyright (ne .Params.contentCopyright false)) }}
-{{ $lang := .Site.Data.even.default -}}
<div class="post-copyright">
<p class="copyright-item">
- <span class="item-title">{{ $lang.copyright.author }}</span>
+ <span class="item-title">{{ T "author" }}</span>
<span class="item-content">{{ if .Params.author }}{{ .Params.author | safeHTML }}{{ else }}{{ .Site.Author.name | safeHTML }}{{ end }}</span>
</p>
<p class="copyright-item">
- <span class="item-title">{{ $lang.copyright.lastMod }}</span>
+ <span class="item-title">{{ T "lastMod" }}</span>
<span class="item-content">{{ .Lastmod.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }}</span>
</p>
{{ if $.Site.Params.linkToMarkDown -}}
{{ with $.OutputFormats.Get "markdown" -}}
<p class="copyright-item">
- <span class="item-title">{{ $lang.copyright.markdown }}</span>
- <span class="item-content"><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ $lang.posts.seeMarkDown }}</a></span>
+ <span class="item-title">{{ T "markdown" }}</span>
+ <span class="item-content"><a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">{{ T "seeMarkDown" }}</a></span>
</p>
{{- end }}
{{- end }}
<p class="copyright-item">
- <span class="item-title">{{ $lang.copyright.license }}</span>
+ <span class="item-title">{{ T "license" }}</span>
<span class="item-content">
{{- if .Params.contentCopyright -}}
{{ .Params.contentCopyright | safeHTML }}
diff --git a/layouts/partials/post/reward.html b/layouts/partials/post/reward.html
index 35933ea..3242854 100644
--- a/layouts/partials/post/reward.html
+++ b/layouts/partials/post/reward.html
@@ -1,20 +1,19 @@
{{ if or .Params.reward (and .Site.Params.reward.enable (ne .Params.reward false)) }}
<div class="post-reward">
- {{- $lang := .Site.Data.even.default }}
<input type="checkbox" name="reward" id="reward" hidden />
- <label class="reward-button" for="reward">{{ $lang.posts.reward }}</label>
+ <label class="reward-button" for="reward">{{ T "reward" }}</label>
<div class="qr-code">
{{ $qrCode := .Site.Params.reward }}
{{ with $qrCode.wechat }}
<label class="qr-code-image" for="reward">
<img class="image" src="{{ . }}">
- <span>{{ $lang.posts.rewardWechat }}</span>
+ <span>{{ T "rewardWechat" }}</span>
</label>
{{- end }}
{{ with $qrCode.alipay }}
<label class="qr-code-image" for="reward">
<img class="image" src="{{ . }}">
- <span>{{ $lang.posts.rewardAlipay }}</span>
+ <span>{{ T "rewardAlipay" }}</span>
</label>
{{- end }}
</div>
diff --git a/layouts/partials/post/toc.html b/layouts/partials/post/toc.html
index e5985c9..4fed1c7 100644
--- a/layouts/partials/post/toc.html
+++ b/layouts/partials/post/toc.html
@@ -1,6 +1,6 @@
{{ if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) }}
<div class="post-toc" id="post-toc">
- <h2 class="post-toc-title">{{ .Site.Data.even.default.posts.toc }}</h2>
+ <h2 class="post-toc-title">{{ T "toc" }}</h2>
{{ $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default false }}
<div class="post-toc-content{{ if not (or .Params.autoCollapseToc (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false))) }} always-active{{ end }}">
{{.TableOfContents}}