feat(webui): bootstrap session handling and login process
This commit is contained in:
parent
63e2b1b09d
commit
6e069484cb
18 changed files with 447 additions and 1 deletions
29
pkg/webui/html/login.html
Normal file
29
pkg/webui/html/login.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
{{ define "main" }}
|
||||
{{ if .Forbidden }}
|
||||
<article>
|
||||
<p class="error-message">Invalid username or password</p>
|
||||
</article>
|
||||
{{ end }}
|
||||
<form action="/login" method="post">
|
||||
<fieldset>
|
||||
<label>
|
||||
Username
|
||||
<input type="text"
|
||||
placeholder="Username"
|
||||
name="username"
|
||||
value="{{ .Username }}"
|
||||
{{ if .Forbidden }}aria-invalid="true"{{ end }}
|
||||
required>
|
||||
</label>
|
||||
<label>
|
||||
Password
|
||||
<input type="password"
|
||||
placeholder="Password"
|
||||
name="password"
|
||||
{{ if .Forbidden }}aria-invalid="true"{{ end }}
|
||||
required>
|
||||
</label>
|
||||
</fieldset>
|
||||
<button type="submit" value="login">Login</button>
|
||||
</form>
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue