From 1a4e7bfb95cae75138bb172631d847bb650cac84 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 17 May 2026 20:28:19 +0800 Subject: [PATCH 1/1] =?utf8?q?Initial=20commit:=20=E6=90=AD=E5=BB=BA?= =?utf8?q?=E5=AE=8C=E6=88=90Web=E6=9E=B6=E6=9E=84=E9=A6=96=E9=A1=B5?= =?utf8?q?=E5=8F=8A=E5=9F=BA=E7=A1=80=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .gitignore | 8 +++++ app.py | 11 ++++++ static/css/style.css | 79 ++++++++++++++++++++++++++++++++++++++++++++ templates/index.html | 19 +++++++++++ 4 files changed, 117 insertions(+) create mode 100644 .gitignore create mode 100644 app.py create mode 100644 static/css/style.css create mode 100644 templates/index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..26fe195 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +__pycache__/ +*.py[cod] +*$py.class +.venv/ +venv/ +ENV/ +*.db +.DS_Store diff --git a/app.py b/app.py new file mode 100644 index 0000000..bf73064 --- /dev/null +++ b/app.py @@ -0,0 +1,11 @@ +from flask import Flask, render_template + +app = Flask(__name__) + +@app.route('/') +def index(): + return render_template('index.html') + +if __name__ == '__main__': + # host='0.0.0.0' 允许公网访问,port=5000 指定端口 + app.run(host='0.0.0.0', port=5000) \ No newline at end of file diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..e1686ae --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,79 @@ +/* 全局样式 */ +body { + margin: 0; + padding: 0; + background-color: #f0f2f5; + font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif; +} + +/* 顶部导航栏 */ +.navbar { + height: 60px; + background: linear-gradient(135deg, #4088d8 0%, #2a69b5 100%); + display: flex; + justify-content: center; + align-items: center; + color: white; + font-size: 24px; + font-weight: bold; + box-shadow: 0 2px 10px rgba(0,0,0,0.1); +} + +/* 主体区域 - 设置为不换行,确保在一行显示 */ +.container { + display: flex; + flex-direction: row; /* 横向排列 */ + justify-content: center; + align-items: center; + gap: 20px; /* 适当缩小间距以适应屏幕宽度 */ + padding: 60px 20px; + margin: 0 auto; + overflow-x: auto; /* 如果屏幕太窄,允许横向滚动 */ +} + +/* 卡片按钮基础样式 */ +.card { + width: 260px; /* 略微调窄一点点确保一行能放下 */ + height: 80px; + background-color: white; + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + font-size: 18px; + font-weight: 600; + cursor: pointer; + transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); + text-decoration: none; + box-shadow: 0 4px 6px rgba(0,0,0,0.05); + border: 1px solid rgba(0,0,0,0.05); +} + +.card:hover { + transform: translateY(-5px); + box-shadow: 0 8px 15px rgba(0,0,0,0.1); +} + +/* 丰富的配色方案 */ +/* ① 科目面板 - 蓝色系 */ +.card-subject { color: #0066cc; border-left: 6px solid #0066cc; } +.card-subject:hover { background-color: #f0f7ff; color: #004499; } + +/* ② 题目管理 - 绿色系 */ +.card-question { color: #009944; border-left: 6px solid #009944; } +.card-question:hover { background-color: #f0fff4; color: #007733; } + +/* ③ 试卷管理 - 橙色系 */ +.card-paper { color: #e67e22; border-left: 6px solid #e67e22; } +.card-paper:hover { background-color: #fffaf5; color: #d35400; } + +/* ④ 系统设定 - 紫色/灰色系 */ +.card-setting { color: #8e44ad; border-left: 6px solid #8e44ad; } +.card-setting:hover { background-color: #f9f5fb; color: #732d91; } + +.icon-num { + margin-right: 12px; + font-size: 22px; + font-style: italic; + opacity: 0.8; +} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..2c9c298 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,19 @@ + + + + + + 错题智能整理系统 + + + + + +
+ ① 科目面板 + ② 题目管理 + ③ 试卷管理 + ④ 系统设定 +
+ + -- 2.43.0