27 lines
1.0 KiB
HTML
27 lines
1.0 KiB
HTML
<!-- login.html -->
|
|
<form id="loginForm" class="space-y-4">
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700">メールアドレス</label>
|
|
<input type="email" id="email" required
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm">
|
|
</div>
|
|
<div>
|
|
<label class="block text-sm font-medium text-gray-700">パスワード</label>
|
|
<input type="password" id="password" required
|
|
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm">
|
|
</div>
|
|
<button type="submit"
|
|
class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700">
|
|
ログイン
|
|
</button>
|
|
</form>
|
|
|
|
<script>
|
|
document.getElementById('loginForm').addEventListener('submit', async (e) => {
|
|
e.preventDefault();
|
|
const email = document.getElementById('email').value;
|
|
const password = document.getElementById('password').value;
|
|
await login(email, password);
|
|
});
|
|
</script>
|