hugo-theme-tiles/layouts/_default/single.html

36 lines
1.0 KiB
HTML

{{ define "main" }}
<article class="post">
<div class="post-header">
<h1 class="post-title">{{ .Title }} {{ if .Draft }}(Draft){{ end }}</h1>
<div class="post-meta">
{{ if .Params.Date }}
<span class="post-date"><i class="fa fa-chevron-right"></i>&nbsp;Posted on {{ .Date.Format "2006-01-02" }}</span>
{{ end }}
{{ with .Params.Author }}
<span class="post-author"><i class="fa fa-chevron-right"></i>&nbsp;{{ . }}</span>
{{ end }}
</div>
<div class="post-tags">
{{ if .Params.tags }}
<span class="post-tags">
<i class="fa fa-chevron-right"></i>&nbsp;
{{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">#{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</div>
{{ with .Params.Cover }}
<img src="{{ . | absURL }}" class="post-cover" />
{{ end }}
</div>
<div class="post-content">{{ .Content | safeHTML }}</div>
<p class="meta">Posted on <span class="postdate">{{ .Date.Format "02. January 2006" }}</span></p>
</article>
{{ end }}