2018-11-08 07:10:37 +01:00
|
|
|
{{define "head"}}<title>Log in — {{.SiteName}}</title>
|
2018-11-10 04:10:46 +01:00
|
|
|
<meta name="description" content="Log in to {{.SiteName}}.">
|
|
|
|
<meta itemprop="description" content="Log in to {{.SiteName}}.">
|
2018-11-08 07:10:37 +01:00
|
|
|
<style>input{margin-bottom:0.5em;}</style>
|
|
|
|
{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="tight content-container">
|
|
|
|
<h1>Log in to {{.SiteName}}</h1>
|
|
|
|
|
|
|
|
{{if .Flashes}}<ul class="errors">
|
|
|
|
{{range .Flashes}}<li class="urgent">{{.}}</li>{{end}}
|
|
|
|
</ul>{{end}}
|
|
|
|
|
|
|
|
<form action="/auth/login" method="post" style="text-align: center;margin-top:1em;" onsubmit="disableSubmit()">
|
2019-09-03 23:56:27 +02:00
|
|
|
<input type="text" name="alias" placeholder="Username" value="{{.LoginUsername}}" {{if not .LoginUsername}}autofocus{{end}} /><br />
|
|
|
|
<input type="password" name="pass" placeholder="Password" {{if .LoginUsername}}autofocus{{end}} /><br />
|
2018-11-08 07:10:37 +01:00
|
|
|
{{if .To}}<input type="hidden" name="to" value="{{.To}}" />{{end}}
|
|
|
|
<input type="submit" id="btn-login" value="Login" />
|
|
|
|
</form>
|
|
|
|
|
2018-11-10 04:10:46 +01:00
|
|
|
{{if and (not .SingleUser) .OpenRegistration}}<p style="text-align:center;font-size:0.9em;margin:3em auto;max-width:26em;">{{if .Message}}{{.Message}}{{else}}<em>No account yet?</em> <a href="/">Sign up</a> to start a blog.{{end}}</p>{{end}}
|
2018-11-08 07:10:37 +01:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
function disableSubmit() {
|
|
|
|
var $btn = document.getElementById("btn-login");
|
|
|
|
$btn.value = "Logging in...";
|
|
|
|
$btn.disabled = true;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
{{end}}
|