Don't output willow logotype as a link on the Dashboard

Adrian Simmons created

Signed-off-by: Adrian Simmons <adrinux@perlucida.co.uk>

Change summary

ws/static/dashboard.html.tmpl |  2 +-
ws/static/header.html.tmpl    |  2 +-
ws/ws.go                      | 10 ++++++----
3 files changed, 8 insertions(+), 6 deletions(-)

Detailed changes

ws/static/dashboard.html.tmpl 🔗

@@ -1,5 +1,5 @@
 {{- template "head" }}
-{{- template "header" }}
+{{- template "header" .IsDashboard }}
         <main>
             <div class="wrapper two_column">
                 <div class="projects">

ws/static/header.html.tmpl 🔗

@@ -1,7 +1,7 @@
 {{- define "header" }}
         <header>
             <div class="wrapper">
-                <h1><a href="/">Willow</a></h1>
+                <h1>{{ if eq . true }}Willow{{ else }}<a href="/">Willow</a>{{ end }}</h1>
                 <nav>
                     <a href="/new">Track a new project</a>
                     <a href="/logout">Log out</a>

ws/ws.go 🔗

@@ -53,11 +53,13 @@ func (h Handler) RootHandler(w http.ResponseWriter, r *http.Request) {
 	}
 
 	data := struct {
-		Version  string
-		Projects []project.Project
+		Version       string
+		Projects      []project.Project
+		IsDashboard   bool
 	}{
-		Version:  *h.Version,
-		Projects: projectsWithReleases,
+		Version:      *h.Version,
+		Projects:     projectsWithReleases,
+		IsDashboard:  true,
 	}
 
 	tmpl := template.Must(template.ParseFS(fs, "static/dashboard.html.tmpl", "static/head.html.tmpl", "static/header.html.tmpl", "static/footer.html.tmpl"))