summaryrefslogtreecommitdiff
path: root/views/nav.html
diff options
context:
space:
mode:
authorMikkel Thestrup <mikkel_thestrup@mithe.dk>2025-12-06 19:55:17 +0100
committerMikkel Thestrup <mikkel_thestrup@mithe.dk>2025-12-06 19:55:17 +0100
commit0015442a40e6fb9c21eff0d0df29d5cd7cf856bc (patch)
tree64195fa9aa6297974fb9890818e285d78479e9d7 /views/nav.html
parent3d9d7590e555cd2c37e18396e72f725d3d71fa05 (diff)
downloadweb-portfolio-0015442a40e6fb9c21eff0d0df29d5cd7cf856bc.tar.gz
web-portfolio-0015442a40e6fb9c21eff0d0df29d5cd7cf856bc.zip
template files
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 }}