mirror of
https://git.adityakumar.xyz/hugo-theme-even.git
synced 2024-11-12 16:19:45 +00:00
084f8cb2c3
* fix: wrong lang attribute in multilingual mode - baseof.html * fix: rss link in multilingual mode - footer.html * fix: wrong tags, categories, home link in multilingual mode - other files ... This relates to #25
70 lines
2.4 KiB
HTML
70 lines
2.4 KiB
HTML
{{ define "content" -}}
|
|
{{ $lang := .Site.Data.even.default -}}
|
|
<article class="post">
|
|
<!-- post-header -->
|
|
<header class="post-header">
|
|
<h1 class="post-title">{{ .Title }}</h1>
|
|
|
|
<div class="post-meta">
|
|
<span class="post-time"> {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} </span>
|
|
{{ with .Params.categories -}}
|
|
<div class="post-category">
|
|
{{ range . }}
|
|
<a href="{{ "categories" | relLangURL }}/{{ . | urlize }}/"> {{ . }} </a>
|
|
{{ end }}
|
|
</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>
|
|
{{- 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>
|
|
{{- end }}
|
|
</div>
|
|
</header>
|
|
|
|
<!-- TOC -->
|
|
{{ partial "post/toc.html" . }}
|
|
|
|
<!-- Content -->
|
|
<div class="post-content">
|
|
{{ .Content }}
|
|
</div>
|
|
|
|
<!-- Copyright -->
|
|
{{ partial "post/copyright.html" . }}
|
|
|
|
<!-- Reward -->
|
|
{{ partial "post/reward.html" . }}
|
|
|
|
<footer class="post-footer">
|
|
{{ with .Params.tags -}}
|
|
<div class="post-tags">
|
|
{{ range . }}
|
|
<a href="{{ "tags" | relLangURL }}/{{ . | urlize }}/">{{ . }}</a>
|
|
{{ end }}
|
|
</div>
|
|
{{- end }}
|
|
|
|
<!-- Post Pagination -->
|
|
<nav class="post-nav">
|
|
{{ 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">{{ $lang.posts.prev_post }}</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>
|
|
<i class="iconfont icon-right"></i>
|
|
</a>
|
|
{{- end }}
|
|
</nav>
|
|
</footer>
|
|
</article>
|
|
{{- end }}
|