Vertical login form and improve error appearance.

This commit is contained in:
Jamie Holdstock 2021-06-12 14:09:00 +08:00 committed by Jamie Holdstock
parent 2b7903f7d5
commit ab5ee2857f
2 changed files with 10 additions and 5 deletions

View File

@ -58,6 +58,10 @@ body {
color: #8997A5; color: #8997A5;
} }
.orange {
color: #ed6d47;
}
footer { footer {
flex-shrink: 0; flex-shrink: 0;
font-size: 0.8rem; font-size: 0.8rem;

View File

@ -2,14 +2,15 @@
<div class="py-4 container"> <div class="py-4 container">
<h1>Login</h1> <h1>Login</h1>
<form action="/admin" method="post"> <form class="py-3" action="/admin" method="post">
<input type="password" name="password" required placeholder="Enter password"> <input type="password" name="password" required placeholder="Enter password">
<button class="ml-3 btn btn-primary" type="submit">Login</button>
<p class="my-1 orange" style="visibility:{{ if .IncorrectPassword }}visible{{ else }}hidden{{ end }};">Incorrect password</p>
<button class="btn btn-primary" type="submit">Login</button>
</form> </form>
{{ if .IncorrectPassword }}
<p>Incorrect password</p>
{{ end }}
</div> </div>
{{ template "footer" . }} {{ template "footer" . }}