chore(webui): redesign the login page
This commit is contained in:
parent
f12a54b760
commit
0354ef67be
2 changed files with 40 additions and 24 deletions
|
@ -1,25 +1,31 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<form action="/login" method="post">
|
<div style="display: grid;">
|
||||||
<fieldset>
|
<form action="/login" method="post" style="align-self:center; justify-self: center;">
|
||||||
<div class="field border label{{ if .Forbidden }} invalid{{ end }}">
|
<fieldset style="align-items:center; display:flex; flex-direction:column; gap:8px;">
|
||||||
<input autofocus
|
<legend>Login</legend>
|
||||||
id="username"
|
<div style="align-items:center; display:flex; flex-direction:row; gap:8px;">
|
||||||
name="username"
|
<label for="username">Username</label>
|
||||||
type="text"
|
<input autofocus
|
||||||
value="{{ .Username }}"
|
{{ if .Forbidden }}class="error"{{ end }}
|
||||||
required>
|
id="username"
|
||||||
<label for="username">Username</label>
|
name="username"
|
||||||
|
type="text"
|
||||||
|
value="{{ .Username }}"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
|
<div style="align-items:center; display:flex; flex-direction:row; gap:8px;">
|
||||||
|
<label for="password">Password</label>
|
||||||
|
<input {{ if .Forbidden }}class="error"{{ end }}
|
||||||
|
id="password"
|
||||||
|
name="password"
|
||||||
|
type="password"
|
||||||
|
required>
|
||||||
|
</div>
|
||||||
{{ if .Forbidden }}<span class="error">Invalid username or password</span>{{ end }}
|
{{ if .Forbidden }}<span class="error">Invalid username or password</span>{{ end }}
|
||||||
</div>
|
<div style="align-self:stretch; display:flex; justify-content:flex-end;">
|
||||||
<div class="field border label{{ if .Forbidden }} invalid{{ end}}">
|
<button class="primary" type="submit" value="login">Login</button>
|
||||||
<input id="password"
|
</div>
|
||||||
name="password"
|
</fieldset>
|
||||||
type="password"
|
</form>
|
||||||
required>
|
</div>
|
||||||
<label for="password">Password</label>
|
|
||||||
{{ if .Forbidden }}<span class="error">Invalid username or password</span>{{ end }}
|
|
||||||
</div>
|
|
||||||
<button class="small-round" type="submit" value="login">Login</button>
|
|
||||||
</fieldset>
|
|
||||||
</form>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -137,7 +137,7 @@ header {
|
||||||
main {
|
main {
|
||||||
background-color: var(--bg-1);
|
background-color: var(--bg-1);
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
padding: 8px;
|
padding: 16px;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
scrollbar-gutter: stable both-edges;
|
scrollbar-gutter: stable both-edges;
|
||||||
max-width: 776px;
|
max-width: 776px;
|
||||||
|
@ -230,9 +230,16 @@ ul {
|
||||||
ul li {
|
ul li {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
article, fieldset {
|
article {
|
||||||
border: 1px solid var(--fg-0);
|
border: 1px solid var(--fg-0);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
margin: 8px 0px 8px 0px;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid var(--fg-0);
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 0px 0px 8px 0px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
}
|
}
|
||||||
button {
|
button {
|
||||||
|
@ -255,6 +262,9 @@ button:hover {
|
||||||
border: 1px solid var(--red);
|
border: 1px solid var(--red);
|
||||||
color: var(--red);
|
color: var(--red);
|
||||||
}
|
}
|
||||||
|
.error {
|
||||||
|
color: var(--red);
|
||||||
|
}
|
||||||
.primary {
|
.primary {
|
||||||
background-color: var(--orange);
|
background-color: var(--orange);
|
||||||
color: var(--fg-1);
|
color: var(--fg-1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue