login.html
·
30 lines
·
1.4 KB
| 1 | {{define "content"}} |
| 2 | <div class="container" style="max-width:23rem;padding-top:2rem;"> |
| 3 | <div class="card"> |
| 4 | <div class="card-header"> |
| 5 | <h1 class="text-base font-semibold" style="margin:0;">{{t .Lang "auth.login.title"}}</h1> |
| 6 | </div> |
| 7 | <form method="post" action="/login" class="card-body flex flex-col gap-3"> |
| 8 | <input type="hidden" name="_csrf" value="{{.CSRFToken}}"> |
| 9 | {{if .Next}}<input type="hidden" name="next" value="{{.Next}}">{{end}} |
| 10 | <div> |
| 11 | <label class="label" for="login">{{t .Lang "auth.username_or_email"}}</label> |
| 12 | <input id="login" name="login" type="text" class="input" value="{{.FormLogin}}" required autofocus autocomplete="username"> |
| 13 | </div> |
| 14 | <div> |
| 15 | <label class="label" for="password">{{t .Lang "auth.password"}}</label> |
| 16 | <input id="password" name="password" type="password" class="input" required autocomplete="current-password"> |
| 17 | </div> |
| 18 | <button type="submit" class="btn btn-primary w-full mt-1"> |
| 19 | <span>{{t .Lang "auth.submit_login"}}</span> |
| 20 | </button> |
| 21 | </form> |
| 22 | {{if .RegistrationEnabled}} |
| 23 | <div class="card-footer text-xs text-muted flex items-center justify-between"> |
| 24 | <span>{{t .Lang "auth.no_account"}}</span> |
| 25 | <a href="/register" class="font-medium" style="color:hsl(var(--foreground));">{{t .Lang "nav.register"}} →</a> |
| 26 | </div> |
| 27 | {{end}} |
| 28 | </div> |
| 29 | </div> |
| 30 | {{end}} |