{{define "body"}}
<div class="wrapper">
	<form method="POST">
		<h1>Log in</h1>

		{{with .FormErrors.generic}}
		<label class="error">{{.}}</label>
		{{end}}

		{{with .FormErrors.username}}
		<label class="error">{{.}}</label>
		{{end}}

		<div {{if .FormErrors.username}}class="input-error"{{else}}class="input-box"{{end}}>
		<input type="text" id="username" name="username" placeholder="Username" required>
		</div>
		<br />

		{{with .FormErrors.password}}
		<label class="error">{{.}}</label>
		{{end}}

		<div  {{if .FormErrors.password}}class="input-error"{{else}}class="input-box"{{end}}>
		<input type="password" id="password" name="password" placeholder="Password" required>
		</div>
		<br />

		<div class="login-btn-wrapper">
		<input type="submit" value="Log in" class="btn">
		</div>
		<br />
		<a href="/forgotten">Have you forgotten your password?</a>

		<div class="register-link">
			<p>Don't have an account? <a href="/register">Register</a></p>
		</div>
	</form>
</div>
{{end}}
