Files
file_message_transfer/templates/registration/login.html

36 lines
1.5 KiB
HTML
Raw Normal View History

2025-01-05 10:45:32 +08:00
{% extends 'base.html' %}
{% block content %}
<div class="max-w-md mx-auto py-8">
<h1 class="text-2xl font-bold mb-6">登录</h1>
{% if form.errors %}
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4">
用户名或密码错误,请重试
</div>
{% endif %}
<form method="post" class="bg-white p-6 rounded-lg shadow">
{% csrf_token %}
<div class="mb-4">
<label class="block text-gray-700 text-sm font-bold mb-2" for="username">
用户名
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline"
type="text" name="username" required>
</div>
<div class="mb-6">
<label class="block text-gray-700 text-sm font-bold mb-2" for="password">
密码
</label>
<input class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 mb-3 leading-tight focus:outline-none focus:shadow-outline"
type="password" name="password" required>
</div>
<div class="flex items-center justify-between">
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline"
type="submit">
登录
</button>
</div>
</form>
</div>
{% endblock %}