templates: Add a proper menu and navigation

This commit is contained in:
Tom Wiesing 2023-01-11 14:24:13 +01:00
parent 0bb7f99fa3
commit a00195be16
No known key found for this signature in database
76 changed files with 336 additions and 233 deletions

View file

@ -28,7 +28,7 @@ var (
//go:embed "legal.html"
var legalTemplateString string
var legalTemplate = static.AssetsLegal.MustParseShared("legal.html", legalTemplateString)
var legalTemplate = static.AssetsDefault.MustParseShared("legal.html", legalTemplateString)
func (legal *Legal) Routes() component.Routes {
return component.Routes{
@ -59,7 +59,9 @@ type legalContext struct {
}
func (legal *Legal) context(r *http.Request) (lc legalContext, err error) {
legal.Dependencies.Custom.Update(&lc, r)
legal.Dependencies.Custom.Update(&lc, r, []component.MenuItem{
{Title: "Legal", Path: "/legal/"},
})
lc.LegalNotices = cli.LegalNotices

View file

@ -1,10 +1,6 @@
{{ template "_base.html" . }}
{{ define "title" }}Legal{{ end }}
{{ define "header"}}
<!-- no header -->
{{ end }}
{{ define "content" }}
<div class="pure-u-1">
<h2 id="cookies">Cookie Usage</h2>