feat: 使用 Flask 重构网站,增加登录注册功能 🐶
- Python Flask 3.1 后端 - 用户注册/登录功能 - SQLite 数据库 - 响应式设计 - 默认管理员: yunxiafei / xu123654
This commit is contained in:
39
templates/welcome.html
Normal file
39
templates/welcome.html
Normal file
@@ -0,0 +1,39 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>欢迎回来 - {{ username }}</title>
|
||||
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="avatar">
|
||||
<span class="sparkle">🎉</span>
|
||||
</div>
|
||||
<h1>欢迎回来,{{ username }}!</h1>
|
||||
<p class="welcome">Welcome Back!</p>
|
||||
<p class="message">
|
||||
您已成功登录<br>
|
||||
这是您的专属空间<br>
|
||||
小白一直陪伴着您 🐶
|
||||
</p>
|
||||
<div class="auth-buttons">
|
||||
<a href="{{ url_for('logout') }}" class="btn btn-danger">退出登录</a>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Powered by <span>Flask</span> & <span>OpenClaw</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
<div class="flash-messages">
|
||||
{% for category, message in messages %}
|
||||
<div class="flash-{{ category }}">{{ message }}</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user