summaryrefslogtreecommitdiffstats
path: root/htdocs/base.html
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/base.html')
-rw-r--r--htdocs/base.html46
1 files changed, 46 insertions, 0 deletions
diff --git a/htdocs/base.html b/htdocs/base.html
new file mode 100644
index 0000000..f96c9c7
--- /dev/null
+++ b/htdocs/base.html
@@ -0,0 +1,46 @@
+<!doctype html>
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ <!-- Child templates can choose to overwrite the default title -->
+ {{ define "title" }}<title>samanthony.xyz</title>{{ end }}
+ {{ template "title" }}
+
+ <link rel="stylesheet" href="/css/style.css">
+ <!-- Child templates can apply their own styles -->
+ {{ define "style" }}{{ end }}
+ {{ template "style" }}
+ <!-- Code syntax highlighting -->
+ <link rel="stylesheet" href="/css/syntax.css">
+ </head>
+ <body>
+ <nav>
+ {{ $this_section := .Nav.ThisSection }}
+ {{ range .Nav.Links }}
+ {{ if eq .Href $this_section }}
+ <a class="this-section" href="{{ .Href }}">
+ /<span class="label">{{ .Label }}</span>
+ </a>
+ {{else }}
+ <a href="{{ .Href }}">
+ |<span class="label">{{ .Label }}</span>
+ </a>
+ {{ end }}
+ {{ end }}
+ <hr>
+ </nav>
+ <main>
+ {{ template "body_content" }}
+ </main>
+ <footer>
+ <hr>
+ <p>Copyright 2022 Sam Anthony</p>
+ <p>
+ samanthony.xyz is free software, licensed under the
+ <a href="https://www.gnu.org/licenses/gpl.txt">
+ GNU GPL.
+ </a>
+ </p>
+ </body>
+</html>