Spaces:
Running
Running
| {% extends 'base.html' %} | |
| {% block title %}注册 - Destiny Platform{% endblock %} | |
| {% block header %}新用户注册{% endblock %} | |
| {% block content %} | |
| <div class="login-container"> | |
| <div class="divination-card glassmorphism login-card"> | |
| <div class="card-header"> | |
| <h3>📝 创建账户</h3> | |
| </div> | |
| <div class="card-content"> | |
| <form action="{{ url_for('register') }}" method="POST"> | |
| <div class="form-group mb-2"> | |
| <label for="username">用户名</label> | |
| <input type="text" id="username" name="username" class="form-control" required placeholder="请设置用户名"> | |
| </div> | |
| <div class="form-group mb-2"> | |
| <label for="password">密码</label> | |
| <input type="password" id="password" name="password" class="form-control" required placeholder="请设置密码"> | |
| </div> | |
| <div class="form-group mb-2"> | |
| <label for="confirm_password">确认密码</label> | |
| <input type="password" id="confirm_password" name="confirm_password" class="form-control" required placeholder="请再次输入密码"> | |
| </div> | |
| <button type="submit" class="btn-submit w-100">立即注册</button> | |
| </form> | |
| <div class="mt-2 text-center"> | |
| <a href="{{ url_for('login') }}" class="text-secondary small">已有账户?立即登录</a> | |
| </div> | |
| {% with messages = get_flashed_messages() %} | |
| {% if messages %} | |
| <ul class="flash-messages mt-2"> | |
| {% for message in messages %} | |
| <li class="negative">{{ message }}</li> | |
| {% endfor %} | |
| </ul> | |
| {% endif %} | |
| {% endwith %} | |
| </div> | |
| </div> | |
| </div> | |
| <style> | |
| .login-container { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 60vh; | |
| padding: 20px; | |
| } | |
| .login-card { | |
| width: 100%; | |
| max-width: 400px; | |
| } | |
| @media (max-width: 480px) { | |
| .login-container { | |
| padding: 10px; | |
| } | |
| } | |
| .form-group label { | |
| display: block; | |
| margin-bottom: 8px; | |
| color: #888; | |
| font-size: 0.9rem; | |
| } | |
| .form-control { | |
| width: 100%; | |
| padding: 12px; | |
| background: rgba(0,0,0,0.3); | |
| border: 1px solid rgba(255,255,255,0.1); | |
| border-radius: 8px; | |
| color: #fff; | |
| } | |
| .form-control:focus { | |
| border-color: var(--accent-color); | |
| outline: none; | |
| } | |
| .flash-messages { | |
| list-style: none; | |
| padding: 0; | |
| text-align: center; | |
| } | |
| .text-center { text-align: center; } | |
| .small { font-size: 0.85rem; } | |
| .text-secondary { color: #888; text-decoration: none; transition: color 0.3s; } | |
| .text-secondary:hover { color: var(--accent-color); } | |
| </style> | |
| {% endblock %} | |