Refactor html templates

This commit entirely refactors the use of html templates. Instead of
inheriting from a shared template, we insert the results into a base
template.
This commit is contained in:
Tom Wiesing 2023-01-20 14:42:37 +01:00
parent 6ede99d7c6
commit d235ee4e5c
No known key found for this signature in database
59 changed files with 869 additions and 777 deletions

View file

@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8">
<title>{{ .Runtime.Flags.Title }}</title>
{{ .Runtime.Flags.Assets.Styles }}
</head>
<body>
<nav class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list" role="menubar">
{{ range .Runtime.Menu }}
<li class="pure-menu-item{{ if .Active }} pure-menu-selected{{ end }}">
<a href="{{ .Path }}" class="pure-menu-link">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</nav>
<nav class="breadcrumbs" role="navigation" aria-label="Breadcrumbs">
{{ range .Runtime.Flags.Crumbs }}
<a class="{{ if .Active }}active{{ end }}" href="{{ .Path }}">{{ .Title }}</a>
{{ end }}
</nav>
<header>
<h1 id="top">{{ .Runtime.Flags.Title }}</h1>
{{ if .Runtime.Flags.Actions }}
<div class="pure-button-group" role="group" aria-label="Actions">
{{ range .Runtime.Flags.Actions }}
<a href="{{ .Path }}" class="pure-button{{ if eq .Priority -1 }} pure-button-small{{end}}">{{ .Title }}</a>
{{ end }}
</div>
{{ end }}
</header>
<main>
<div class="pure-g">
{{ .Main }}
</div>
</main>
<footer>
{{ .Footer }}
</footer>
{{ .Runtime.Flags.Assets.Scripts }}
</body>
</html>