diff options
Diffstat (limited to 'layouts/post/single.html')
-rw-r--r-- | layouts/post/single.html | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/layouts/post/single.html b/layouts/post/single.html index 61fbf8c..fcda0dd 100644 --- a/layouts/post/single.html +++ b/layouts/post/single.html @@ -8,27 +8,27 @@ <span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span> {{ with .Params.categories -}} <div class="post-category"> - {{ range . }} + {{ range . -}} <a href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a> - {{ end }} + {{ end -}} </div> {{- end }} - {{ if .Site.Params.moreMeta -}} - <span class="more-meta"> {{ T "wordCount" .WordCount }} </span> - <span class="more-meta"> {{ T "readingTime" .ReadingTime }} </span> + {{- if .Site.Params.moreMeta }} + <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 (T "pagePV") $valueSpan | safeHTML }} </span> + {{ $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 (T "pagePV") $valueSpan | safeHTML }} </span> {{- end }} </div> </header> <!-- TOC --> - {{ partial "post/toc.html" . }} + {{- partial "post/toc.html" . -}} <!-- Outdated Info Warning --> - {{ partial "post/outdated-info-warning.html" . }} + {{- partial "post/outdated-info-warning.html" . -}} <!-- Content --> <div class="post-content"> @@ -36,30 +36,30 @@ </div> <!-- Copyright --> - {{ partial "post/copyright.html" . }} + {{- partial "post/copyright.html" . -}} <!-- Reward --> - {{ partial "post/reward.html" . }} + {{- partial "post/reward.html" . -}} <footer class="post-footer"> {{ with .Params.tags -}} <div class="post-tags"> - {{ range . }} - <a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a> - {{ end }} + {{ range . -}} + <a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a> + {{ end -}} </div> - {{- end }} + {{- end -}} <!-- Post Pagination --> <nav class="post-nav"> - {{ with .NextInSection }} + {{ with .NextInSection -}} <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">{{ T "prevPost" }}</span> </a> {{- end }} - {{ with .PrevInSection }} + {{ with .PrevInSection -}} <a class="next" href="{{ .URL }}"> <span class="next-text nav-default">{{ .Title }}</span> <span class="next-text nav-mobile">{{ T "nextPost" }}</span> |