summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/web/handlers.go4
-rw-r--r--ui/html/base.tmpl.html2
-rw-r--r--ui/html/partials/nav.tmpl.html5
3 files changed, 8 insertions, 3 deletions
diff --git a/cmd/web/handlers.go b/cmd/web/handlers.go
index 8df8928..4b76103 100644
--- a/cmd/web/handlers.go
+++ b/cmd/web/handlers.go
@@ -27,7 +27,7 @@ func (app *application) listOrganisation(w http.ResponseWriter, r *http.Request)
files := []string{
"./ui/html/base.tmpl.html",
"./ui/html/pages/organisations/list.tmpl.html",
- // "./ui/html/partials/nav.tmpl.html",
+ "./ui/html/partials/nav.tmpl.html",
}
ts, err := template.ParseFiles(files...)
@@ -51,7 +51,7 @@ func (app *application) home(w http.ResponseWriter, r *http.Request) {
files := []string{
"./ui/html/base.tmpl.html",
"./ui/html/pages/home.tmpl.html",
- // "./ui/html/partials/nav.tmpl.html",
+ "./ui/html/partials/nav.tmpl.html",
}
ts, err := template.ParseFiles(files...)
diff --git a/ui/html/base.tmpl.html b/ui/html/base.tmpl.html
index cb98c32..91bdbc2 100644
--- a/ui/html/base.tmpl.html
+++ b/ui/html/base.tmpl.html
@@ -11,7 +11,7 @@
</head>
<body>
<header>
- <h1><a href="/">DED</a></h1>
+ {{ template "nav" . }}
</header>
<main>
{{ template "main" }}
diff --git a/ui/html/partials/nav.tmpl.html b/ui/html/partials/nav.tmpl.html
new file mode 100644
index 0000000..9636855
--- /dev/null
+++ b/ui/html/partials/nav.tmpl.html
@@ -0,0 +1,5 @@
+{{ define "nav" }}
+<nav>
+ <a href="/">Home</a>
+</nav>
+{{ end }}