aboutsummaryrefslogtreecommitdiff
path: root/ui/html
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-11-24 13:53:18 -0500
committerSamuel Johnson <[email protected]>2025-11-24 13:53:18 -0500
commit368a462bc744d8e9084eacfaddeb9afcaf7f7133 (patch)
treec6e8f665d6cb9713b9226b10c4a341e60b8e91c2 /ui/html
parent4d4419f51557bef6b64dca8635ed61616d262a9b (diff)
Add session management
Diffstat (limited to 'ui/html')
-rw-r--r--ui/html/base.tmpl.html10
-rw-r--r--ui/html/login.tmpl.html19
-rw-r--r--ui/html/pages/index.tmpl.html21
3 files changed, 42 insertions, 8 deletions
diff --git a/ui/html/base.tmpl.html b/ui/html/base.tmpl.html
index dda949b..014868e 100644
--- a/ui/html/base.tmpl.html
+++ b/ui/html/base.tmpl.html
@@ -3,7 +3,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:site_name" content="paterissa" />
<meta property="og:type" content="object" />
<meta property="og:title" content="Paterissa - thehinterlander's blog" />
@@ -16,11 +16,11 @@
<img src="/static/get?file=images/bg.png" id="bg-image">
<div class="pane">
<header>
- <h1>Paterissa</h1>
+ <h1><a href="https://paterissa.net">Paterissa</a></h1>
<nav>
- <a href="https://git.paterissa.net">Git</a>
- <a href="https://starless.paterissa.net">Starless</a>
- <a href="https://charts.paterissa.net">Parliament Builder</a>
+ <a href="https://git.paterissa.net" class="nav_tag">Git</a>
+ <a href="https://starless.paterissa.net" class="nav_tag">Starless</a>
+ <a href="https://charts.paterissa.net" class="nav_tag">Parliament Builder</a>
</nav>
</header>
<hr>
diff --git a/ui/html/login.tmpl.html b/ui/html/login.tmpl.html
new file mode 100644
index 0000000..6377dc0
--- /dev/null
+++ b/ui/html/login.tmpl.html
@@ -0,0 +1,19 @@
+{{define "title"}}Login{{end}}
+
+{{define "main"}}
+ <div class="topline">
+ <h2>Log In</h2>
+ </div>
+ <div class="card">
+ <form class="login_form center" action="/login" method="POST">
+ <label for="user">Username:</label>
+ <input type="text" id="user" name="user">
+ <label for="pass_one">Password:</label>
+ <input type="text" id="pass_one" name="pass_one">
+ <label for="pass_two">Password:</label>
+ <input type="text" id="pass_two" name="pass_two">
+ <br>
+ <input type="submit" value="Submit">
+ </form>
+ </div>
+{{end}}
diff --git a/ui/html/pages/index.tmpl.html b/ui/html/pages/index.tmpl.html
index 78c2bb2..011f964 100644
--- a/ui/html/pages/index.tmpl.html
+++ b/ui/html/pages/index.tmpl.html
@@ -1,10 +1,25 @@
{{define "title"}}Blog{{end}}
{{define "main"}}
- <div class="topline">
- <h2>Blog</h2>
- <p>Home of {{.Name}}</p>
+ <div class="flex-between">
+ <div class="topline">
+ <h2>Blog</h2>
+ <p>Home of {{.Name}}</p>
+ </div>
+ <div class="spacer"></div>
+ {{if .IsAuth}}
+ <a href="/logout" class="nav_tag right">Logout</a>
+ {{else}}
+ <a href="/login" class="nav_tag right">Login</a>
+ {{end}}
</div>
+ {{if .IsAuth}}
+ <div class="card">
+ <div class="header">
+ <h4><b>New</b></h4>
+ </div>
+ </div>
+ {{end}}
{{range .Rows}}
<div class="card">
<div class="header">