hugo-sr2/layouts/posts/page.html

24 lines
780 B
HTML
Raw Normal View History

2026-01-10 13:42:14 +00:00
{{ define "main" }}
<h1 class="page__title">{{ .Title }}</h1>
{{ $dateMachine := .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHuman := .Lastmod | time.Format ":date_long" }}
{{ $dateMachineP := .PublishDate | time.Format "2006-01-02T15:04:05-07:00" }}
{{ $dateHumanP := .PublishDate | time.Format ":date_long" }}
{{ if .Params.author }}
<div class="page__author">{{ printf (T "By") .Params.author }}</div>
{{ end }}
<div class="page__date">
{{ T "Published" }} <time datetime="{{ $dateMachineP }}">{{ $dateHumanP }}</time>
<br/>
{{ T "Updated" }} <time datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
<div class="page__tag">
{{ partial "page-tags.html" (dict "taxonomy" "tags" "page" .) }}
</div>
</div>
{{ .Content }}
{{ end }}