]> acesimba.cloud Git - studybase.git/commitdiff
Initial commit: 搭建完成Web架构首页及基础样式
authorroot <root@localhost.localdomain>
Sun, 17 May 2026 12:28:19 +0000 (20:28 +0800)
committerroot <root@localhost.localdomain>
Sun, 17 May 2026 12:28:19 +0000 (20:28 +0800)
.gitignore [new file with mode: 0644]
app.py [new file with mode: 0644]
static/css/style.css [new file with mode: 0644]
templates/index.html [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..26fe195
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..e1686ae
--- /dev/null
@@ -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 (file)
index 0000000..2c9c298
--- /dev/null
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html lang="zh">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>错题智能整理系统</title>
+    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
+</head>
+<body>
+    <div class="navbar">错题智能整理系统</div>
+
+    <div class="container">
+        <a href="#" class="card card-subject"><span class="icon-num">①</span> 科目面板</a>
+        <a href="#" class="card card-question"><span class="icon-num">②</span> 题目管理</a>
+        <a href="#" class="card card-paper"><span class="icon-num">③</span> 试卷管理</a>
+        <a href="#" class="card card-setting"><span class="icon-num">④</span> 系统设定</a>
+    </div>
+</body>
+</html>