summaryrefslogtreecommitdiff
path: root/views/nav.html
diff options
context:
space:
mode:
Diffstat (limited to 'views/nav.html')
-rw-r--r--views/nav.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/views/nav.html b/views/nav.html
new file mode 100644
index 0000000..27ab4c6
--- /dev/null
+++ b/views/nav.html
@@ -0,0 +1,18 @@
+{{ define "nav.html" }}
+<div id="nav">
+ <ul>
+ {{ range .Sections }}
+ {{ $sec := . }}
+ <li>
+ <a href="/{{ $.Page }}/{{ $sec }}"
+ hx-get="/api/{{ $.Page }}/{{ $sec }}"
+ hx-target="#main"
+ hx-swap="innerHTML"
+ hx-push-url="/{{ $.Page }}/{{ $sec }}">
+ {{ $sec }}/
+ </a>
+ </li>
+ {{ end }}
+ </ul>
+</div>
+{{ end }}