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:
parent
6ede99d7c6
commit
d235ee4e5c
59 changed files with 869 additions and 777 deletions
51
internal/dis/component/server/templating/src/base.html
Normal file
51
internal/dis/component/server/templating/src/base.html
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue