auth/web/templates/index.html

49 lines
1.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Auth Demo</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"
/>
</head>
<body>
<main class="container">
<h1>Sign in</h1>
<p>Authenticate with the demo credentials below to view the dashboard.</p>
<article>
<header>Demo account</header>
<p><strong>Email:</strong> user@example.com<br /><strong>Password:</strong> password123</p>
</article>
{{if .Error}}
<article class="secondary">
<strong>Unable to sign in:</strong> {{.Error}}
</article>
{{end}}
<form method="post" action="/login">
<input type="hidden" name="_csrf" value="{{.CSRFToken}}" />
<label for="email">Email</label>
<input
type="email"
id="email"
name="email"
placeholder="Enter your email"
required
autofocus
value="{{.Email}}"
/>
<label for="password">Password</label>
<input
type="password"
id="password"
name="password"
placeholder="Password"
required
/>
<button type="submit">Login</button>
</form>
</main>
</body>
</html>