vugo/layouts/_default/single.html

52 lines
1.4 KiB
HTML
Raw Normal View History

2022-08-18 14:17:23 +02:00
{{ define "main" }}
{{ if eq .Type $.Site.Params.contentTypeName }}
<div class="post-meta">
{{ if .Params.Date }}
<span>
<span class="post-date">
{{ .Date.Format "2006-01-02" }}
{{ if $.Site.Params.showLastUpdated }}
[{{or $.Site.Params.updatedDatePrefix "Updated"}}: {{ .Lastmod.Format "2006-01-02" }}]
{{ end }}
</span>
{{ end }}
{{ with .Params.Author }}
<span> - </span>
<span class="post-author">{{ . }}</span>
{{ end }}
{{ if and (.Param "readingTime") (eq (.Param "readingTime") true) }}
<span class="post-reading-time">- {{ .ReadingTime }} min read ({{ .WordCount }} words)</span>
{{ end }}
</span>
{{ if .Params.tags }}
<span class="post-tags">
{{ range .Params.tags }}
#<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</div>
{{ end }}
{{ if (.Params.Toc | default .Site.Params.Toc) }}
<div class="table-of-contents">
<h2>
{{ (.Params.TocTitle | default .Site.Params.TocTitle) | default "Table of Contents" }}
</h2>
{{ .TableOfContents }}
</div>
{{ end }}
<div class="post-content">
{{ .Content }}
</div>
{{ if eq .Type $.Site.Params.contentTypeName }}
{{ partial "posts_pagination.html" . }}
{{ end }}
</div>
{{ end }}