Add user sessions and login

This isn't quite perfect, but gets much of the hard work done.
This commit is contained in:
Eli Ribble 2025-11-05 17:15:33 +00:00
parent e311464b51
commit 486c148bf7
No known key found for this signature in database
28 changed files with 1701 additions and 30 deletions

9
templates/dashboard.html Normal file
View file

@ -0,0 +1,9 @@
{{template "base.html" .}}
{{define "title"}}Dash{{end}}
{{define "style"}}
{{end}}
{{define "content"}}
<h1>Hey {{ .Username }}</h1>
<p>At this point, pretend I'm showing you the result of some ArcGIS data.</p>
{{end}}

View file

@ -33,22 +33,23 @@
<p class="text-muted">Please enter your credentials</p>
</div>
<form>
<form method="POST" action="/signin">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" class="form-control" id="username" required>
<input type="text" class="form-control" name="username" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" class="form-control" id="password" required>
<input type="password" class="form-control" name="password" required>
</div>
<div class="mb-3 form-check">
<input type="checkbox" class="form-check-input" id="remember">
<label class="form-check-label" for="remember">Remember me</label>
{{ if .InvalidCredentials }}
<div class="alert alert-danger" role="alert">
The credentials you provided weren't recognized.
</div>
{{ end }}
<div class="d-grid gap-2">
<button type="submit" class="btn btn-primary">Login</button>
</div>