Improvments to the micro templates.

This commit is contained in:
Fredrik Jonsson 2019-04-17 14:26:13 +02:00
commit 006879a0a8

View file

@ -8,9 +8,14 @@
{{ define "main" -}}
<main class="main layout__main">
<h1 class="title hidden">{{ .Title }}</h1>
<article class="{{ with .Section }}section-{{ . | urlize }} {{ end }}single-view">
{{ if $.Param "submitted" | default false }}<a href="{{ .RelPermalink }}">{{ partial "submitted.html" . -}}</a>{{ end }}
<header>
<h1 class="hidden">{{ .Title }}</h1>
<p>
{{ with $.Param "author" }}<span class="author">{{ . }}</span> – {{ end -}}
<time class="modified-date" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Lastmod.Format ($.Param "dateformat" | default "2 January, 2006") }}</time>
</p>
</header>
<div class="content">
{{ .Content }}
</div>