ref: master
layouts/_partials/post-header.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
{{- $nums := partialCached "dispatch-numbers.html" . "dispatch-numbers" -}}
{{- $no := index $nums .TranslationKey | default 0 -}}
{{- $time := .Date.Format "15:04" -}}
<nav class="post-nav">
<div class="post-nav__group">
<a class="post-nav__back" href="{{ .Site.Home.RelPermalink }}">
<span aria-hidden="true">←</span> {{ .Site.Params.shortTitle }}
</a>
<span class="post-nav__sep" aria-hidden="true">//</span>
<span class="post-nav__no">{{ i18n "postLabel" }} #{{ printf "%03d" $no }}</span>
</div>
<div class="post-nav__group">
<span class="post-nav__stats">
{{- partial "time.html" . -}}
{{- if ne $time "00:00" }} · {{ $time }} {{ .Site.Params.timeZoneLabel }}{{ end -}}
· {{ .WordCount }} {{ i18n "words" }}
· {{ .ReadingTime }} {{ i18n "minutes" }}
</span>
{{ partial "theme-toggle.html" . }}
</div>
</nav>
<div class="divisor"></div>
<header class="post-header">
<h1 class="post-title">{{ .Title }}</h1>
{{ with .Params.blurb }}
<p class="post-blurb">{{ . }}</p>
{{ end }}
{{ with .GetTerms "tags" }}
<div class="filed-under">
{{ i18n "filedUnder" }}
{{ range $i, $term := . }}{{ if $i }}, {{ end }}<a href="{{ $term.RelPermalink }}">#{{ $term.LinkTitle }}</a>{{ end }}
</div>
{{ end }}
</header>
<div class="divisor"></div>
|