Files
alterminal/templates/login.html
T

28 lines
1.8 KiB
HTML

<!DOCTYPE html>
<html lang="zh-Hant">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="referrer" content="no-referrer">
<title>登入 - alterminal</title>
<link rel="stylesheet" href="/static/css/main.css">
</head>
<body class="flex min-h-screen items-center justify-center bg-neutral-100 font-sans text-neutral-900 antialiased dark:bg-neutral-900 dark:text-neutral-100">
<main class="m-4 w-full max-w-88 rounded-xl bg-white p-8 shadow-lg dark:bg-neutral-800 dark:shadow-black/40">
<h1 class="mb-1 text-xl font-semibold">登入 alterminal</h1>
<p class="mb-6 text-sm text-neutral-500 dark:text-neutral-400">單一登入服務</p>
{{if .Error}}<p class="mb-2 rounded-lg bg-red-500/10 px-3 py-2.5 text-sm text-red-600 dark:text-red-400" role="alert">{{.Error}}</p>{{end}}
<form method="post" action="/login">
<input type="hidden" name="csrf_token" value="{{.CSRF}}">
<label for="username" class="mb-1 mt-4 block text-sm">帳號</label>
<input type="text" id="username" name="username" value="{{.Username}}" autocomplete="username" autofocus required
class="w-full rounded-lg border border-neutral-300 bg-transparent px-3 py-2.5 text-base focus:border-transparent focus:outline-2 focus:outline-offset-1 focus:outline-brand dark:border-neutral-600">
<label for="password" class="mb-1 mt-4 block text-sm">密碼</label>
<input type="password" id="password" name="password" autocomplete="current-password" required
class="w-full rounded-lg border border-neutral-300 bg-transparent px-3 py-2.5 text-base focus:border-transparent focus:outline-2 focus:outline-offset-1 focus:outline-brand dark:border-neutral-600">
<button type="submit" class="mt-6 w-full rounded-lg bg-brand py-2.5 text-base font-semibold text-white hover:bg-brand-strong">登入</button>
</form>
</main>
</body>
</html>