hugo-theme-even/layouts/post/single.html

67 lines
2.1 KiB
HTML
Raw Normal View History

2017-08-27 14:38:42 +00:00
{{ 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>
2017-08-27 14:38:42 +00:00
{{ with .Params.categories -}}
<div class="post-category">
{{ range . }}
<a href="{{ "categories" | relURL }}/{{ . | urlize }}/"> {{ . }} </a>
{{ end }}
2017-08-27 14:38:42 +00:00
</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 }}
2017-08-27 14:38:42 +00:00
</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 . }}
2017-08-30 16:18:22 +00:00
<a href="{{ "tags" | relURL }}/{{ . | urlize }}/">{{ . }}</a>
2017-08-27 14:38:42 +00:00
{{ 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 }}