Make Willow title a link to dashboard and style it

Adrian Simmons created

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

Change summary

ws/static/header.html.tmpl |  2 +-
ws/static/styles.css       | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)

Detailed changes

ws/static/header.html.tmpl 🔗

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

ws/static/styles.css 🔗

@@ -183,6 +183,17 @@ header h1 {
 	margin-block: 1.2rem;
 }
 
+header h1 a {
+	text-decoration: none;
+}
+
+/* On the home dashboard pretend 'Willow' is not a link
+   Relies on the dashboard page being the only one with
+   a div.projects */
+body:has(div.projects) header h1 a {
+	cursor: default;
+}
+
 header nav {
 	display: flex;
 	justify-content: flex-end;