blog/themes/mytheme/layouts/_default/single.html

57 lines
1.7 KiB
HTML

{{- define "main" }}
<article class="post-single">
<header class="post-header">
<h1 class="post-title">
{{ .Title }}
</h1>
{{- if .Description }}
<div class="post-description">
{{ .Description }}
</div>
{{- end }}
<div class="post-meta">
{{- if not .Date.IsZero -}}
<span title='{{ .Date }}'>
{{.Date | time.Format (default "January 2, 2006" site.Params.DateFormat) }}
</span>
{{- end }}
</div>
</header>
<div class="post-divider"></div>
{{- if .Content }}
<div class="post-content">
{{- if not (.Param "disableAnchoredHeadings") }}
{{- partial "anchored_headings.html" .Content -}}
{{- else }}{{ .Content }}{{ end }}
</div>
{{- end }}
<footer class="post-footer">
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
<ul class="post-tags">
{{- range ($.GetTerms $tags) }}
<li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
{{- end }}
</ul>
<nav class="pag-back">
<a href="#back" onclick="window.history.back()">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" focusable="false" style="pointer-events: none; display: block; width: 100%; height: 100%;" fill="currentColor" stroke="white" stroke-width="1"><polygon points="11.65,3.50 3.80,11.35 11.65,19.20 12.36,18.50 5.71,11.85 20.15,11.85 20.15,10.85 5.71,10.85 12.36,4.20"></polygon></svg>
</a>
</nav>
<br/>
{{- if (and (and site.Params.ShowShareButtons (ne .Params.disableShare true)) false) }}
{{- partial "share_icons.html" . -}}
{{- end }}
</footer>
{{- if (.Param "comments") }}
{{- partial "comments.html" . }}
{{- end }}
</article>
{{- end }}{{/* end main */}}