aboutsummaryrefslogtreecommitdiff
path: root/layouts/post
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/post')
-rw-r--r--layouts/post/single.html11
-rw-r--r--layouts/post/summary.html7
2 files changed, 8 insertions, 10 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html
index 58434b6..e157a81 100644
--- a/layouts/post/single.html
+++ b/layouts/post/single.html
@@ -1,5 +1,4 @@
{{ define "content" -}}
- {{ $lang := .Site.Data.even.default -}}
<article class="post">
<!-- post-header -->
<header class="post-header">
@@ -15,12 +14,12 @@
</div>
{{- end }}
{{ if .Site.Params.moreMeta -}}
- <span class="more-meta"> {{ printf $lang.posts.header.wordCount .WordCount }} </span>
- <span class="more-meta"> {{ printf $lang.posts.header.readingTime .ReadingTime }} </span>
+ <span class="more-meta"> {{ T "wordCount" .WordCount }} </span>
+ <span class="more-meta"> {{ T "readingTime" .ReadingTime }} </span>
{{- end }}
{{ if and .Site.Params.busuanzi.enable .Site.Params.busuanzi.pagePV -}}
{{ $valueSpan := printf `<span id="busuanzi_value_page_pv"><img src="%s" alt="spinner.svg"/></span>` ("img/spinner.svg" | relURL) -}}
- <span id="busuanzi_container_page_pv" class="more-meta"> {{ printf $lang.traffic.pagePV $valueSpan | safeHTML }} </span>
+ <span id="busuanzi_container_page_pv" class="more-meta"> {{ printf (T "pagePV") $valueSpan | safeHTML }} </span>
{{- end }}
</div>
</header>
@@ -54,13 +53,13 @@
<a class="prev" href="{{ .URL }}">
<i class="iconfont icon-left"></i>
<span class="prev-text nav-default">{{ .Title }}</span>
- <span class="prev-text nav-mobile">{{ $lang.posts.prev_post }}</span>
+ <span class="prev-text nav-mobile">{{ T "prevPost" }}</span>
</a>
{{- end }}
{{ with .PrevInSection }}
<a class="next" href="{{ .URL }}">
<span class="next-text nav-default">{{ .Title }}</span>
- <span class="prev-text nav-mobile">{{ $lang.posts.next_post }}</span>
+ <span class="prev-text nav-mobile">{{ T "nextPost" }}</span>
<i class="iconfont icon-right"></i>
</a>
{{- end }}
diff --git a/layouts/post/summary.html b/layouts/post/summary.html
index 0695eac..6069ca1 100644
--- a/layouts/post/summary.html
+++ b/layouts/post/summary.html
@@ -1,4 +1,3 @@
-{{ $lang := .Site.Data.even.default -}}
<article class="post">
<header class="post-header">
<h1 class="post-title"><a class="post-link" href="{{ .URL }}">{{ .Title }}</a></h1>
@@ -12,8 +11,8 @@
</div>
{{- end }}
{{ if .Site.Params.moreMeta -}}
- <span class="more-meta"> {{ printf $lang.posts.header.wordCount .WordCount }} </span>
- <span class="more-meta"> {{ printf $lang.posts.header.readingTime .ReadingTime }} </span>
+ <span class="more-meta"> {{ T "wordCount" .WordCount }} </span>
+ <span class="more-meta"> {{ T "readingTime" .ReadingTime }} </span>
{{- end }}
</div>
</header>
@@ -23,7 +22,7 @@
{{ .Summary }}
</div>
<div class="read-more">
- <a href="{{ .URL }}" class="read-more-link">{{ $lang.posts.readmore }}</a>
+ <a href="{{ .URL }}" class="read-more-link">{{ T "readMore" }}</a>
</div>
</div>
</article>