summaryrefslogtreecommitdiff
path: root/pkg/webui/html/base.html
diff options
context:
space:
mode:
authorJulien Dessaux2025-01-26 00:04:38 +0100
committerJulien Dessaux2025-01-26 00:04:38 +0100
commit4e029fb83a1e70495330eaac94981a97de24682e (patch)
treefb041970dcbf38daf06de5034cf6fd567c586069 /pkg/webui/html/base.html
parentfeat(webui): implement states list (diff)
downloadtfstated-4e029fb83a1e70495330eaac94981a97de24682e.tar.gz
tfstated-4e029fb83a1e70495330eaac94981a97de24682e.tar.bz2
tfstated-4e029fb83a1e70495330eaac94981a97de24682e.zip
feat(webui): bootstrap a proper UI
Diffstat (limited to 'pkg/webui/html/base.html')
-rw-r--r--pkg/webui/html/base.html54
1 files changed, 38 insertions, 16 deletions
diff --git a/pkg/webui/html/base.html b/pkg/webui/html/base.html
index 7821d28..06328e4 100644
--- a/pkg/webui/html/base.html
+++ b/pkg/webui/html/base.html
@@ -1,28 +1,50 @@
+{{ define "nav" }}
+<header>
+ <nav>
+ <a href="/">
+ <h6>TFSTATED</h6>
+ </a>
+ </nav>
+</header>
+{{ if eq .Page.Section "login" }}
+<a href="/login" class="active">
+ <i>login</i>
+ <span>Login</span>
+</a>
+{{ else }}
+<a href="/states"{{ if eq .Page.Section "states" }} class="active"{{ end}}>
+ <i>home_storage</i>
+ <span>States</span>
+</a>
+<hr>
+<a href="/logout">
+ <i>logout</i>
+ <span>Logout</span>
+</a>
+{{ end }}
+{{ end }}
<!DOCTYPE html>
-<html>
+<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/static/favicon.svg">
- <link rel="stylesheet" href="/static/main.css">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css">
- <title>tfstated</title>
+ <link href="/static/main.css" rel="stylesheet">
+ <link href="https://cdn.jsdelivr.net/npm/beercss@3.8.0/dist/cdn/beer.min.css" rel="stylesheet">
+ <title>TFSTATED - {{ .Page.Title }}</title>
</head>
- <body>
- <header class="container">
+ <body class="dark">
+ <nav class="left drawer l">{{ template "nav" . }}</nav>
+ <nav class="left m">{{ template "nav" . }}</nav>
+ <nav class="bottom s">{{ template "nav" . }}</nav>
+ <header>
<nav>
- <ul>
- <li><a href="/"><strong>TFSTATED</strong></a></li>
- </ul>
- <ul>
- <li><a href="/states">States</a></li>
- </ul>
+ <h5 class="max center-align">{{ .Page.Title }}</h5>
</nav>
</header>
- <main class="container">
- {{ template "main" . }}
- </main>
- <footer class="container">
+ {{ template "main" . }}
+ <footer>
</footer>
+ <script type="module" src="https://cdn.jsdelivr.net/npm/beercss@3.8.0/dist/cdn/beer.min.js"></script>
</body>
</html>