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

@ -1,40 +1,32 @@
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WissKI Distillery</title>
{{ CSS }}
</head>
<body>
<header>
<h1>WissKI Distillery</h1>
</header>
<main>
<div class="pure-g">
<div class="pure-u-1">
<p>
For more information, see <a href="{{ .SelfRedirect }}">{{ .SelfRedirect }}</a>.
</p>
</div>
<div class="pure-u-1">
<h2>WissKIs on this Distillery</h2>
</div>
{{range .Instances}}
{{ if .Running }}
<div class="pure-u-1-3">
<h3>{{.Slug}}</h3>
<p>
<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{.URL}}</a><br>
</p>
</div>
{{ end }}
{{ end }}
</main>
{{ template "_base.html" . }}
{{ define "title" }}WissKI Distillery{{ end }}
<footer>
Generated at <code>{{ .Time }}</code>
</footer>
{{ JS }}
</body>
{{ define "header/time" }}
<!-- no header/time -->
{{ end }}
{{ define "header"}}
<!-- no header -->
{{ end }}
{{ define "content" }}
<div class="pure-u-1">
<p>
For more information, see <a href="{{ .SelfRedirect }}">{{ .SelfRedirect }}</a>.
</p>
</div>
<div class="pure-u-1">
<h2>WissKIs on this Distillery</h2>
</div>
{{range .Instances}}
{{ if .Running }}
<div class="pure-u-1-3">
<h3>{{.Slug}}</h3>
<p>
<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">{{.URL}}</a><br>
</p>
</div>
{{ end }}
{{ end }}
{{ end }}