templates: Share fragments

This commit is contained in:
Tom Wiesing 2022-10-20 11:26:35 +02:00
parent dd7be3f520
commit d64e6f8ec3
No known key found for this signature in database
12 changed files with 111 additions and 93 deletions

View file

@ -0,0 +1,33 @@
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ block "block" . }}Distillery Control Page{{ end }}</title>
{{ block "styles" . }}styles{{ end }}
</head>
<body>
<header>
<h1 id="top">{{ template "title" . }}</h1>
{{ block "header/time" . }}
{{ if .Time }}
<small>Generated at <code class="date">{{ .Time.Format "2006-01-02T15:04:05Z07:00" }}</code></small>
{{ end }}
{{ end }}
{{ block "header" . }}header{{ end }}
</header>
<main>
<div class="pure-g">
{{ block "content" . }}content{{ end }}
</div>
</main>
{{ if .Time }}
<footer>
Generated at <code>{{ .Time }}</code>
</footer>
{{ end }}
{{ block "scripts" . }}scripts{{ end }}
</body>