From a01d57ee96272b0c08432a17f09e6906c6570c28 Mon Sep 17 00:00:00 2001 From: XiaoCow666 Date: Thu, 1 Oct 2026 17:21:46 +0800 Subject: [PATCH] Revert "Merge pull request #75 from XiaoCow666/codex/flat-ui-refresh" This reverts commit cff31504b75a091edce49a334e9edf87e2974516, reversing changes made to 5003ed792f5ec0056a7bb5338bc28c0251237617. --- .../plans/2026-10-01-flat-ui-refresh.md | 107 -------- .../2026-10-01-flat-ui-refresh-design.md | 57 ---- static/css/action-center.css | 42 +-- static/css/code-editor.css | 14 +- static/css/code-studio-assistant.css | 245 ------------------ static/css/code_submit.css | 14 +- static/css/codesense-markdown.css | 12 +- static/css/cpp-editor.css | 8 +- static/css/knowledge-evidence.css | 81 +----- static/css/modern-editor.css | 12 +- static/css/thinking.css | 200 +++++++------- static/img/favicon.svg | 2 +- static/js/code_questions.js | 4 +- static/js/thinking.js | 2 +- static/modern.css | 157 +++++------ templates/about.html | 2 +- templates/add_assignment.html | 2 +- templates/admin_dashboard.html | 2 +- templates/admin_profile.html | 4 +- templates/admin_trend_monitor.html | 16 +- templates/all_submissions.html | 2 +- templates/api_docs.html | 2 +- templates/classes/class_comparison.html | 2 +- templates/classes/class_detail.html | 4 +- templates/components/knowledge_evidence.html | 18 -- templates/components/simple_editor.html | 6 +- templates/contact.html | 4 +- templates/cot_demo.html | 12 +- templates/edit_profile.html | 2 +- templates/editor_demo.html | 2 +- templates/email_register.html | 2 +- templates/feedback.html | 2 +- templates/forgot_password.html | 2 +- templates/grades.html | 2 +- templates/help.html | 2 +- templates/layout.html | 4 +- templates/login.html | 238 ++++++++++++----- templates/notifications.html | 4 +- templates/parsons_demo.html | 4 +- templates/profile.html | 2 +- templates/public_profile.html | 8 +- templates/register.html | 22 +- templates/register_teacher.html | 4 +- templates/resend_verification.html | 2 +- templates/reset_password.html | 2 +- templates/sprofile.html | 18 +- templates/staff_details.html | 2 +- templates/student_details.html | 18 +- templates/student_home.html | 16 +- templates/submission_detail.html | 4 +- templates/submission_evaluating.html | 14 +- templates/submission_history.html | 4 +- templates/submit_code.html | 65 +++-- templates/teacher_ai_suggestions.html | 8 +- templates/teacher_home.html | 24 +- templates/thinking/arena.html | 2 +- templates/users.html | 16 +- templates/verify_email.html | 2 +- tests/test_flat_ui_contract.py | 57 ---- tests/test_knowledge_evidence_ui.py | 35 +-- 60 files changed, 570 insertions(+), 1052 deletions(-) delete mode 100644 docs/superpowers/plans/2026-10-01-flat-ui-refresh.md delete mode 100644 docs/superpowers/specs/2026-10-01-flat-ui-refresh-design.md delete mode 100644 static/css/code-studio-assistant.css delete mode 100644 tests/test_flat_ui_contract.py diff --git a/docs/superpowers/plans/2026-10-01-flat-ui-refresh.md b/docs/superpowers/plans/2026-10-01-flat-ui-refresh.md deleted file mode 100644 index bac4e269..00000000 --- a/docs/superpowers/plans/2026-10-01-flat-ui-refresh.md +++ /dev/null @@ -1,107 +0,0 @@ -# CodeSense 纯色界面改版实施计划 - -> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. - -**Goal:** 将 CodeSense 的自有页面改为统一的纯色、轻量、适应窄屏的界面,并修复 AI 编程助手的拥挤排版。 - -**Architecture:** 继续使用 Flask/Jinja、Bootstrap 和现有 JavaScript。通过共享语义色变量及现有模板宏实现可复用组件;页面局部 CSS 只承担布局和具体内容展示。保持原有路由与数据接口不变。 - -**Tech Stack:** Flask、Jinja2、CSS、原生 JavaScript、pytest、浏览器视觉检查。 - -**Spec:** `docs/superpowers/specs/2026-10-01-flat-ui-refresh-design.md` - -## Global Constraints - -- 自有产品 CSS/模板不得保留 `linear-gradient(` 或 `radial-gradient(`;不修改第三方 vendor 文件。 -- 设计色:页面 `#F5F7F8`、表面 `#FFFFFF`、主文字 `#23343D`、次文字 `#64757D`、线条 `#DDE5E6`、操作 `#237B75`、强调浅底 `#EAF4F2`、输入浅底 `#F0F3F3`。 -- 不新增 React 构建或运行时;保持现有服务端渲染及 AI 聊天功能。 -- 重点检查 1440、768、390、320 CSS 像素宽度。 - -## Review Focus - -1. 知识证据为空或检索失败时,紧凑面板仍显示下一步与重试入口。 -2. 长代码、表格、URL 和中文段落在 AI 回复中不撑破侧栏。 -3. 展开证据后来源与引用均可读,键盘可操作。 -4. 流式输出、快捷问题、发送与清空按钮保持可用。 -5. 对比度、焦点样式和减少动画偏好在浅色界面仍清晰。 - ---- - -### Task 1: 共享视觉基础 - -**Files:** -- Modify: `static/modern.css` -- Modify: `templates/layout.html` -- Test: `tests/test_flat_ui_contract.py` - -**Interfaces:** -- Produces CSS variables `--cs-bg`, `--cs-surface`, `--cs-ink`, `--cs-muted`, `--cs-line`, `--cs-accent`, `--cs-accent-soft`, `--cs-input` for subsequent page CSS. - -- [ ] **Step 1: Write a failing static contract test** in `tests/test_flat_ui_contract.py` that reads `static/modern.css` and asserts the exact semantic variable/value pairs below. Check shared button, focus, surface and body rules reference these variables. - -```python -EXPECTED = { - "--cs-bg": "#F5F7F8", "--cs-surface": "#FFFFFF", - "--cs-ink": "#23343D", "--cs-muted": "#64757D", - "--cs-line": "#DDE5E6", "--cs-accent": "#237B75", - "--cs-accent-soft": "#EAF4F2", "--cs-input": "#F0F3F3", -} -``` -- [ ] **Step 2: Run** `python -m pytest tests/test_flat_ui_contract.py -q`; expect failure from missing variables. -- [ ] **Step 3: Implement** the variables in `:root` and replace general navigation, button, card, form and focus colors with semantic variables. Preserve existing layout and semantic error/success states. -- [ ] **Step 4: Run** the contract test and `python -m pytest tests/test_app.py -q`; inspect failures before proceeding. -- [ ] **Step 5: Commit** `static/modern.css`, `templates/layout.html`, and the test. - -### Task 2: AI 助手和知识证据 - -**Files:** -- Modify: `templates/submit_code.html` -- Modify: `templates/components/knowledge_evidence.html` -- Modify: `static/css/knowledge-evidence.css` -- Modify: `static/css/codesense-markdown.css` -- Test: `tests/test_knowledge_evidence_ui.py` -- Test: `tests/test_flat_ui_contract.py` - -**Interfaces:** -- Consumes Task 1 CSS variables. -- Keeps `knowledge_evidence_panel(...)` macro signature and existing chat element IDs used by JavaScript. - -- [ ] **Step 1: Add a failing UI contract test** asserting the compact knowledge panel contains ` * { - min-width: 0; -} - -.code-studio-assistant { - height: clamp(560px, calc(100vh - 190px), 760px); - min-height: 0; - max-height: none; - background: var(--cs-surface); - border: 1px solid var(--cs-line); - border-radius: 14px; - box-shadow: none; -} - -.code-studio-assistant .ai-assistant-header { - min-height: 60px; - padding: 0.9rem 1.25rem; - background: var(--cs-surface); - color: var(--cs-ink); - border-bottom: 1px solid var(--cs-line); -} - -.code-studio-assistant .ai-assistant-header h5 { - font-size: 1rem; -} - -.code-studio-assistant #clear-chat { - color: var(--cs-muted); - background: transparent; - border: 0; - box-shadow: none; -} - -.code-studio-assistant #clear-chat:hover { - color: var(--cs-accent); - background: var(--cs-accent-soft); -} - -.code-studio-assistant .ai-chat-messages { - min-width: 0; - min-height: 0; - padding: 1.25rem; - background: var(--cs-surface); - overscroll-behavior: contain; -} - -.code-studio-assistant .ai-chat-messages > .knowledge-evidence-panel--compact { - margin: 0 0 1.25rem; -} - -.code-studio-assistant .ai-message-wrapper { - min-width: 0; - gap: 0.55rem; - flex-wrap: wrap; - margin-bottom: 1rem; -} - -.code-studio-assistant .ai-message-avatar { - width: 30px; - height: 30px; - font-size: 0.95rem; - background: var(--cs-accent-soft); - color: var(--cs-accent); - box-shadow: none; - margin: 0; -} - -.code-studio-assistant .ai-message-content { - min-width: 0; - max-width: calc(100% - 40px); - padding: 0.7rem 0.85rem; - background: var(--cs-surface); - color: var(--cs-ink); - border: 1px solid var(--cs-line); - border-radius: 10px; - box-shadow: none; - overflow-wrap: anywhere; -} - -.code-studio-assistant .assistant-message .ai-message-content { - flex: 1 1 calc(100% - 40px); - max-width: calc(100% - 40px); - border: 0; - padding: 0.15rem 0; -} - -.code-studio-assistant .user-message .ai-message-content { - max-width: min(82%, 32rem); - background: var(--cs-accent-soft); - color: var(--cs-ink); - border: 0; -} - -.code-studio-assistant .knowledge-evidence-receipt-mount { - flex: 0 0 calc(100% - 40px); - width: calc(100% - 40px); - min-width: 0; - margin-left: 40px; -} - -.code-studio-assistant #code-studio-analysis-evidence { - width: 100%; - margin: 0.75rem 0 0; -} - -.code-studio-assistant .knowledge-evidence-receipt { - min-width: 0; - padding: 0.7rem 0.85rem; - background: var(--cs-bg); - border-radius: 9px; - color: var(--cs-muted); - font-size: 0.78rem; - overflow-wrap: anywhere; -} - -.code-studio-assistant .knowledge-evidence-receipt__title { - margin: 0 0 0.35rem; - color: var(--cs-ink); - font-size: 0.82rem; - font-weight: 600; -} - -.code-studio-assistant .knowledge-evidence-receipt__status p { - margin: 0.25rem 0 0; -} - -.code-studio-assistant .knowledge-evidence-receipt__details { - display: grid; - gap: 0.35rem; - margin-top: 0.5rem; -} - -.code-studio-assistant .knowledge-evidence-receipt__detail summary { - cursor: pointer; - overflow-wrap: anywhere; -} - -.code-studio-assistant .knowledge-evidence-receipt__body { - padding: 0.4rem 0 0.6rem 1rem; -} - -.code-studio-assistant .ai-chat-input-area { - padding: 0.85rem 1.25rem; - border-top: 1px solid var(--cs-line); -} - -.code-studio-assistant .ai-chat-input-wrapper { - gap: 0.6rem; -} - -.code-studio-assistant .ai-chat-textarea { - min-width: 0; - border: 1px solid var(--cs-line); - border-radius: 9px; - background: var(--cs-input); - font-size: 0.88rem; -} - -.code-studio-assistant .ai-send-button { - width: 48px; - height: 48px; - border-radius: 9px; - background: var(--cs-accent); - box-shadow: none; -} - -.code-studio-assistant .ai-send-button:hover:not(:disabled) { - background: #1c625d; - transform: none; - box-shadow: none; -} - -.code-studio-assistant .ai-welcome-message { - padding: 2rem 0.5rem; -} - -.code-studio-assistant .ai-welcome-icon { - font-size: 2rem; -} - -.code-studio-assistant .ai-quick-prompts { - grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); -} - -.code-studio-assistant .ai-quick-prompt-btn { - border: 1px solid var(--cs-line); - border-radius: 8px; - color: var(--cs-accent); - box-shadow: none; -} - -.code-studio-assistant .ai-quick-prompt-btn:hover { - color: var(--cs-ink); - background: var(--cs-accent-soft); - border-color: var(--cs-accent); - transform: none; - box-shadow: none; -} - -.code-studio-assistant .ai-message-content pre, -.code-studio-assistant .ai-message-content table { - max-width: 100%; - overflow-x: auto; -} - -@media (max-width: 991px) { - .code-studio-assistant { - height: min(720px, 82vh); - min-height: 520px; - } -} - -@media (max-width: 480px) { - .code-studio-assistant .ai-chat-messages { - padding: 1rem; - } - - .code-studio-assistant .ai-chat-input-area { - padding: 0.75rem 1rem; - } - - .code-studio-assistant .ai-message-content, - .code-studio-assistant .assistant-message .ai-message-content { - max-width: calc(100% - 36px); - } - - .code-studio-assistant .knowledge-evidence-receipt-mount { - flex-basis: calc(100% - 36px); - width: calc(100% - 36px); - margin-left: 36px; - } -} - -@media (prefers-reduced-motion: reduce) { - .code-studio-assistant .ai-message-wrapper, - .code-studio-assistant .ai-send-button { - animation: none; - transition: none; - } -} diff --git a/static/css/code_submit.css b/static/css/code_submit.css index 72a83b23..0938407c 100644 --- a/static/css/code_submit.css +++ b/static/css/code_submit.css @@ -63,7 +63,7 @@ width: 18px; height: 18px; border: 2px solid #f3f3f3; - border-top: 2px solid #397F79; + border-top: 2px solid #3498db; border-radius: 50%; animation: spin 1s linear infinite; margin-right: 5px; @@ -116,7 +116,7 @@ #ask-question-btn { padding: 6px 15px; - background-color: #237B75; + background-color: #007bff; color: white; border: none; border-radius: 4px; @@ -130,7 +130,7 @@ } #ask-question-btn:hover { - background-color: #1C625D; + background-color: #0069d9; } /* 指导内容样式 */ @@ -340,9 +340,9 @@ pre:hover .copy-button { } .waiting-message { - color: #237B75; + color: #0d6efd; padding: 0.5rem; - border-left: 3px solid #237B75; + border-left: 3px solid #0d6efd; background-color: rgba(13, 110, 253, 0.1); margin: 0.5rem 0; } @@ -425,7 +425,7 @@ pre:hover .copy-button { .simple-mode textarea.editor-textarea:focus { color: #212529; background-color: #fff; - border-color: #A9D0CA; + border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); } @@ -453,7 +453,7 @@ pre:hover .copy-button { #ai-assistance .card-title i { margin-right: 0.5rem; - color: #237B75; + color: #0d6efd; } #get-ai-advice { diff --git a/static/css/codesense-markdown.css b/static/css/codesense-markdown.css index 65366bd6..e5e29ab3 100644 --- a/static/css/codesense-markdown.css +++ b/static/css/codesense-markdown.css @@ -14,9 +14,9 @@ --cs-md-border-strong: #d7dee9; --cs-md-surface: #ffffff; --cs-md-surface-soft: #f8fafc; - --cs-md-surface-blue: #EAF4F2; - --cs-md-accent: #237B75; - --cs-md-accent-soft: #EAF4F2; + --cs-md-surface-blue: #f3f7ff; + --cs-md-accent: #2563eb; + --cs-md-accent-soft: #dbeafe; --cs-md-success: #059669; --cs-md-warning: #d97706; --cs-md-danger: #dc2626; @@ -93,7 +93,7 @@ } .cs-markdown h2 { - background: var(--cs-accent-soft); + background: linear-gradient(90deg, var(--cs-md-surface-blue), rgba(243, 247, 255, 0)); border-left: 3px solid var(--cs-md-accent); border-radius: 0 6px 6px 0; font-size: 1.2rem; @@ -168,8 +168,8 @@ .cs-markdown blockquote.cs-md-callout-note, .cs-markdown blockquote.cs-md-callout-info { - background: #F5F7F8; - border-left-color: #2E8E86; + background: #eff6ff; + border-left-color: #3b82f6; } .cs-markdown blockquote.cs-md-callout-tip, diff --git a/static/css/cpp-editor.css b/static/css/cpp-editor.css index 7e9a063a..7bef8303 100644 --- a/static/css/cpp-editor.css +++ b/static/css/cpp-editor.css @@ -28,7 +28,7 @@ .editor-language { font-weight: 600; - color: #2E8E86; + color: #3b82f6; display: flex; align-items: center; } @@ -63,8 +63,8 @@ } .editor-btn.active { - background-color: #EAF4F2; - color: #237B75; + background-color: #dbeafe; + color: #2563eb; } /* 编辑器容器 */ @@ -118,7 +118,7 @@ height: 40px; border: 3px solid #e5e7eb; border-radius: 50%; - border-top-color: #2E8E86; + border-top-color: #3b82f6; animation: spin 1s linear infinite; } diff --git a/static/css/knowledge-evidence.css b/static/css/knowledge-evidence.css index 39f9f31d..fd6f8d3e 100644 --- a/static/css/knowledge-evidence.css +++ b/static/css/knowledge-evidence.css @@ -1,8 +1,8 @@ :root { - --knowledge-ink: var(--cs-ink); - --knowledge-blue: var(--cs-accent); - --knowledge-paper: var(--cs-surface); - --knowledge-teal: var(--cs-accent); + --knowledge-ink: #14213D; + --knowledge-blue: #2F80ED; + --knowledge-paper: #F7FAFC; + --knowledge-teal: #0F766E; --knowledge-amber: #B45309; } @@ -11,68 +11,15 @@ padding: 1.35rem 1.5rem; color: var(--knowledge-ink); background: var(--knowledge-paper); - border: 1px solid var(--cs-line); + border: 1px solid rgba(20, 33, 61, 0.16); + border-left: 4px solid var(--knowledge-blue); border-radius: 0.7rem; - box-shadow: none; + box-shadow: 0 8px 24px rgba(20, 33, 61, 0.07); } .knowledge-evidence-panel--compact { - margin: 1rem 1.25rem 0; - padding: 0; - background: var(--cs-accent-soft); - border: 0; -} - -.knowledge-evidence-panel__compact-summary { - display: grid; - gap: 0.25rem; - padding: 0.85rem 1rem; - cursor: pointer; - list-style: none; -} - -.knowledge-evidence-panel__compact-summary::-webkit-details-marker { - display: none; -} - -.knowledge-evidence-panel__compact-heading { - color: var(--cs-ink); - font-size: 0.92rem; - font-weight: 650; -} - -.knowledge-evidence-panel__compact-topics { - color: var(--cs-muted); - font-size: 0.8rem; - overflow-wrap: anywhere; -} - -.knowledge-evidence-panel__compact-action { - color: var(--cs-accent); - font-size: 0.78rem; - font-weight: 650; -} - -.knowledge-evidence-panel__compact-disclosure[open] .knowledge-evidence-panel__compact-action [aria-hidden] { - display: inline-block; - transform: rotate(180deg); -} - -.knowledge-evidence-panel__compact-content { - padding: 0 1rem 1rem; -} - -.knowledge-evidence-panel__compact-content .knowledge-evidence-panel__status { - margin-top: 0; - padding: 0.7rem 0.8rem; -} - -.knowledge-evidence-panel__compact-content .knowledge-evidence-panel__details { - margin-top: 0.6rem; -} - -.knowledge-evidence-panel__compact-content .knowledge-evidence-detail { - border-color: var(--cs-line); + margin: 1rem 0; + padding: 1rem 1.1rem; } .knowledge-evidence-panel__header { @@ -167,7 +114,6 @@ } .knowledge-evidence-detail summary:focus-visible, -.knowledge-evidence-panel__compact-summary:focus-visible, .knowledge-evidence-panel a:focus-visible, .knowledge-evidence-panel button:focus-visible { outline: 3px solid rgba(47, 128, 237, 0.45); @@ -236,7 +182,7 @@ .knowledge-evidence-retry:hover { color: #fff; - background: #1C625D; + background: #1d64c8; } .knowledge-evidence-receipt__retry { @@ -253,7 +199,7 @@ } .knowledge-evidence-receipt__retry:hover { - background: #1C625D; + background: #1d64c8; } .knowledge-evidence-receipt__retry:disabled { @@ -305,11 +251,6 @@ border-radius: 0.55rem; } - .knowledge-evidence-panel--compact { - margin: 0.85rem 1rem 0; - padding: 0; - } - .knowledge-evidence-panel__header { display: block; } diff --git a/static/css/modern-editor.css b/static/css/modern-editor.css index fb2204f9..6eebd593 100644 --- a/static/css/modern-editor.css +++ b/static/css/modern-editor.css @@ -52,7 +52,7 @@ .modern-editor-language i { margin-right: 0.5rem; font-size: 1rem; - color: #237B75; + color: #6366f1; } .dark-theme .modern-editor-language { @@ -83,13 +83,13 @@ .modern-editor-tool:hover { background-color: #f3f4f6; - color: #237B75; + color: #6366f1; border-color: #d1d5db; } .modern-editor-tool:focus { outline: none; - box-shadow: 0 0 0 2px rgba(35, 123, 117, 0.3); + box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3); } .dark-theme .modern-editor-tool { @@ -99,7 +99,7 @@ .dark-theme .modern-editor-tool:hover { background-color: #3e3e3e; - color: #237B75; + color: #6366f1; } /* 编辑器容器 */ @@ -221,9 +221,9 @@ /* 提高textarea的可访问性样式 */ .modern-editor textarea.form-control:focus-visible { - outline: 2px solid #237B75; + outline: 2px solid #6366f1; outline-offset: 2px; - border-color: #237B75; + border-color: #6366f1; } /* 高对比度模式支持 */ diff --git a/static/css/thinking.css b/static/css/thinking.css index 7c59c9a0..e11e2348 100644 --- a/static/css/thinking.css +++ b/static/css/thinking.css @@ -43,7 +43,7 @@ gap: 8px; } -.arena-title i { color: #237B75; } +.arena-title i { color: #2563eb; } .arena-timer { font-family: 'JetBrains Mono', monospace; @@ -62,9 +62,9 @@ min-width: 0; margin-bottom: 16px; padding: 14px 18px; - border: 1px solid #DDE5E6; + border: 1px solid #dbe4f0; border-radius: 10px; - background: var(--cs-surface); + background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%); color: #334155; } @@ -83,7 +83,7 @@ .session-lifecycle-kicker { font-size: 13px; font-weight: 700; - color: #23343D; + color: #1e3a8a; } .session-lifecycle-badge { @@ -109,8 +109,8 @@ } .session-lifecycle[data-session-status="completed"] .session-lifecycle-badge { - background: #EAF4F2; - color: #1C625D; + background: #dbeafe; + color: #1d4ed8; } .session-lifecycle-meta, @@ -152,7 +152,7 @@ width: 0; height: 100%; border-radius: inherit; - background: #237B75; + background: #2563eb; transition: width 180ms ease; } @@ -217,9 +217,9 @@ } .step-circle.active { - background: #237B75; + background: #2563eb; color: #fff; - border-color: #237B75; + border-color: #2563eb; } .step-circle.completed { @@ -244,7 +244,7 @@ white-space: nowrap; } -.step-label.active { color: #237B75; font-weight: 600; } +.step-label.active { color: #2563eb; font-weight: 600; } .step-label.completed { color: #10b981; } /* --- Main Content --- */ @@ -419,7 +419,7 @@ gap: 6px; } -.panel-header h3 i { color: #237B75; font-size: 14px; } +.panel-header h3 i { color: #2563eb; font-size: 14px; } .stage2-header-meta { display: flex; @@ -435,8 +435,8 @@ .stage2-answer-progress { padding: 3px 8px; border-radius: 999px; - background: #F5F7F8; - color: #1C625D; + background: #eff6ff; + color: #1d4ed8; font-weight: 600; white-space: nowrap; } @@ -445,10 +445,10 @@ display: inline-flex; align-items: center; gap: 4px; - border: 1px solid #EAF4F2; + border: 1px solid #dbeafe; border-radius: 999px; - background: #F5F7F8; - color: #237B75; + background: #eff6ff; + color: #2563eb; padding: 4px 8px; font-size: 11px; line-height: 1; @@ -458,12 +458,12 @@ } .panel-collapse-toggle:hover { - background: #EAF4F2; - border-color: #A9D0CA; + background: #dbeafe; + border-color: #93c5fd; } .panel-collapse-toggle:focus-visible { - outline: 2px solid #78ADA6; + outline: 2px solid #60a5fa; outline-offset: 2px; } @@ -531,8 +531,8 @@ .description-textarea:focus { outline: none; - border-color: #237B75; - box-shadow: 0 0 0 3px rgba(35, 123, 117, 0.1); + border-color: #2563eb; + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); } .description-textarea::placeholder { color: #9ca3af; } @@ -587,7 +587,7 @@ } .block-solution { - border-color: #237B75; + border-color: #2563eb; border-style: dashed; } @@ -611,7 +611,7 @@ .code-block { background: #fff; border: 1px solid #e5e7eb; - border-left: 3px solid #237B75; + border-left: 3px solid #2563eb; border-radius: 4px; padding: 8px 12px; margin-bottom: 4px; @@ -625,7 +625,7 @@ } .code-block:hover { - border-color: #237B75; + border-color: #2563eb; box-shadow: 0 2px 4px rgba(0,0,0,0.08); } @@ -679,9 +679,9 @@ } .indent-btn:hover { - background: #237B75; + background: #2563eb; color: #fff; - border-color: #237B75; + border-color: #2563eb; } /* --- Stage 3: Chat --- */ @@ -721,7 +721,7 @@ background: #f3f4f6; } -.chat-avatar.teacher { background: #F5F7F8; } +.chat-avatar.teacher { background: #eff6ff; } .chat-avatar.student { background: #f0fdf4; } .chat-avatar.bad-student { background: #fef3c7; } @@ -749,7 +749,7 @@ } .chat-bubble.user-msg { - background: #237B75; + background: #2563eb; color: #fff; border-bottom-right-radius: 2px; } @@ -816,7 +816,7 @@ font-family: inherit; } -.chat-input:focus { border-color: #237B75; } +.chat-input:focus { border-color: #2563eb; } .chat-input::placeholder { color: #9ca3af; } /* --- Stage 3: Public Forum --- */ @@ -855,10 +855,10 @@ .forum-goal-card { flex: 0 0 auto; padding: 14px 16px; - border: 1px solid #EAF4F2; + border: 1px solid #dbeafe; border-radius: 14px; - background: var(--cs-surface); - box-shadow: 0 4px 14px rgba(35, 123, 117, 0.06); + background: linear-gradient(135deg, #f8fbff 0%, #ffffff 72%); + box-shadow: 0 4px 14px rgba(37, 99, 235, 0.06); } .forum-goal-summary { @@ -880,8 +880,8 @@ right: 0; padding: 3px 7px; border-radius: 999px; - background: #F5F7F8; - color: #237B75; + background: #eff6ff; + color: #2563eb; font-size: 10px; font-weight: 700; } @@ -892,7 +892,7 @@ .forum-goal-summary:focus-visible, .stage3-guide-summary:focus-visible { - outline: 2px solid #237B75; + outline: 2px solid #2563eb; outline-offset: 3px; border-radius: 6px; } @@ -913,7 +913,7 @@ } .forum-goal-kicker { - color: #237B75; + color: #2563eb; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; @@ -925,7 +925,7 @@ .forum-goal-head h4 { margin: 4px 0 0; - color: #23343D; + color: #172554; font-size: 15px; line-height: 1.35; } @@ -934,8 +934,8 @@ flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; - background: #EAF4F2; - color: #1C625D; + background: #dbeafe; + color: #1d4ed8; font-size: 11px; font-weight: 700; white-space: nowrap; @@ -964,7 +964,7 @@ .forum-goal-progress-bar { height: 100%; border-radius: inherit; - background: var(--cs-accent); + background: linear-gradient(90deg, #2563eb, #22c55e); transition: width 0.35s ease; } @@ -978,7 +978,7 @@ } .forum-goal-progress-meta span:first-child { - color: #1C625D; + color: #1d4ed8; font-weight: 800; } @@ -986,8 +986,8 @@ margin-top: 10px; padding: 8px 10px; border-radius: 9px; - background: #F5F7F8; - color: #23343D; + background: #eff6ff; + color: #1e3a8a; font-size: 12px; line-height: 1.5; } @@ -1024,14 +1024,14 @@ } .forum-goal-step.is-active { - border-color: #A9D0CA; - background: #F5F7F8; - color: #1C625D; + border-color: #93c5fd; + background: #f8fbff; + color: #1e40af; } .forum-goal-step.is-active::before { content: '→'; - color: #237B75; + color: #2563eb; } .forum-goal-step.is-done { @@ -1068,7 +1068,7 @@ align-items: flex-start; gap: 4px; padding: 12px 14px; - border: 1px solid #DDE5E6; + border: 1px solid #dbe4f0; border-radius: 10px; background: #f8fafc; color: #1e293b; @@ -1078,20 +1078,20 @@ } .forum-target-btn:hover { - border-color: #A9D0CA; - background: #F5F7F8; + border-color: #93c5fd; + background: #eff6ff; } .forum-target-btn:focus-visible { - outline: 2px solid #237B75; + outline: 2px solid #2563eb; outline-offset: 2px; } .forum-target-btn.is-selected, .forum-target-btn[aria-pressed="true"] { - border-color: #237B75; - background: #EAF4F2; - box-shadow: 0 0 0 1px #237B75; + border-color: #2563eb; + background: #dbeafe; + box-shadow: 0 0 0 1px #2563eb; } .forum-target-label { @@ -1170,11 +1170,11 @@ } .forum-avatar.role-user { - background: #F5F7F8; + background: #eff6ff; } .forum-avatar.role-teacher_agent { - background: #EAF4F2; + background: #eef2ff; } .forum-avatar.role-student_agent { @@ -1192,8 +1192,8 @@ } .forum-event.is-user .forum-card { - background: #F5F7F8; - border-color: #CDE5E1; + background: #eff6ff; + border-color: #bfdbfe; } .forum-meta { @@ -1233,8 +1233,8 @@ } .forum-kind.kind-user_message { - background: #EAF4F2; - color: #1C625D; + background: #dbeafe; + color: #1d4ed8; } .forum-kind.kind-agent_message { @@ -1265,7 +1265,7 @@ .forum-reply-action { border: none; background: transparent; - color: #237B75; + color: #2563eb; font-size: 12px; font-weight: 600; cursor: pointer; @@ -1273,7 +1273,7 @@ } .forum-reply-action:hover { - color: #1C625D; + color: #1d4ed8; text-decoration: underline; } @@ -1325,7 +1325,7 @@ } .stage3-guide-summary > span:first-child i { - color: #237B75; + color: #2563eb; } .stage3-guide-summary-hint { @@ -1416,7 +1416,7 @@ .code-fix-input:focus { outline: none; - border-color: #237B75; + border-color: #2563eb; } /* --- Buttons --- */ @@ -1436,12 +1436,12 @@ } .arena-btn-primary { - background: #237B75; + background: #2563eb; color: #fff; } .arena-btn-primary:hover { - background: #1C625D; + background: #1d4ed8; } .arena-btn-primary:disabled { @@ -1472,7 +1472,7 @@ height: 34px; padding: 0; border-radius: 50%; - background: #237B75; + background: #2563eb; color: #fff; border: none; cursor: pointer; @@ -1483,18 +1483,18 @@ flex-shrink: 0; } -.arena-btn-send:hover { background: #1C625D; } +.arena-btn-send:hover { background: #1d4ed8; } .arena-btn-send:disabled { opacity: 0.4; cursor: not-allowed; } /* --- Hint --- */ .hint-bubble { - background: #F5F7F8; - border: 1px solid #CDE5E1; + background: #eff6ff; + border: 1px solid #bfdbfe; border-radius: 6px; padding: 10px 14px; margin: 8px 0; font-size: 13px; - color: #1C625D; + color: #1e40af; line-height: 1.5; display: flex; align-items: flex-start; @@ -1502,7 +1502,7 @@ } .hint-bubble i { - color: #237B75; + color: #2563eb; flex-shrink: 0; margin-top: 2px; } @@ -1515,7 +1515,7 @@ margin-bottom: 0; } .hint-bubble code { - background: rgba(35, 123, 117, 0.1); + background: rgba(37, 99, 235, 0.1); padding: 2px 4px; border-radius: 4px; font-family: var(--arena-mono, monospace); @@ -1736,7 +1736,7 @@ .algorithm-summary-panel { background: #f8fafc; border: 1px solid #e2e8f0; - border-left: 4px solid #237B75; + border-left: 4px solid #2563eb; border-radius: 6px; margin-bottom: 12px; overflow: hidden; @@ -1748,7 +1748,7 @@ border-bottom: 1px solid #e2e8f0; font-size: 13px; font-weight: 600; - color: #23343D; + color: #1e3a8a; display: flex; align-items: center; justify-content: space-between; @@ -1845,10 +1845,10 @@ gap: 12px; margin: 2px 0 10px; padding: 10px 12px; - border: 1px solid #EAF4F2; + border: 1px solid #dbeafe; border-radius: 8px; - background: var(--cs-accent-soft); - color: #23343D; + background: linear-gradient(90deg, #eff6ff, #f8fbff); + color: #1e3a8a; } .stage1-answer-toolbar > div { @@ -1874,18 +1874,18 @@ flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; - background: #EAF4F2; - color: #1C625D !important; + background: #dbeafe; + color: #1d4ed8 !important; font-size: 11px !important; white-space: nowrap; } .stage1-collapsible-panel { margin-bottom: 12px; - border: 1px solid #CDE5E1; - border-left: 4px solid #2E8E86; + border: 1px solid #bfdbfe; + border-left: 4px solid #3b82f6; border-radius: 8px; - background: #F5F7F8; + background: #eff6ff; overflow: hidden; } @@ -1898,7 +1898,7 @@ padding: 10px 12px; border: 0; background: transparent; - color: #23343D; + color: #1e3a8a; font: inherit; font-size: 13px; font-weight: 600; @@ -1912,7 +1912,7 @@ .stage1-collapse-header:focus-visible, .algorithm-summary-header:focus-visible { - outline: 2px solid #78ADA6; + outline: 2px solid #60a5fa; outline-offset: -2px; } @@ -1923,7 +1923,7 @@ .stage1-collapse-header i:first-child, .stage1-collapse-header > span > i { margin-right: 5px; - color: #237B75; + color: #2563eb; } .stage1-collapse-header small { @@ -1934,7 +1934,7 @@ .stage1-collapsible-body { padding: 0 14px 12px; - color: #1C625D; + color: #1e40af; font-size: 13px; line-height: 1.65; } @@ -2000,7 +2000,7 @@ padding: 10px 12px; border: 0; background: transparent; - color: #6AB5A9; + color: #38bdf8; cursor: pointer; font-family: inherit; font-size: 13px; @@ -2008,7 +2008,7 @@ text-align: left; } .dev-debug-toggle:focus-visible { - outline: 2px solid #6AB5A9; + outline: 2px solid #38bdf8; outline-offset: -2px; } .dev-debug-title { @@ -2064,10 +2064,10 @@ transform: scale(0.97); } .dev-debug-btn-primary { - background: #237B75; + background: #2563eb; } .dev-debug-btn-primary:hover { - background: #2E8E86; + background: #3b82f6; } .dev-debug-btn-success { background: #16a34a; @@ -2125,7 +2125,7 @@ margin-top: 4px; } .dev-debug-trace-key { - color: #A9D0CA; + color: #7dd3fc; font-weight: 600; } .dev-debug-trace-value { @@ -2221,9 +2221,9 @@ } .quiz-choice-option.selected { - border-color: #2E8E86; - background: #F5F7F8; - box-shadow: 0 0 0 1px #2E8E86; + border-color: #3b82f6; + background: #eff6ff; + box-shadow: 0 0 0 1px #3b82f6; } .quiz-choice-option input[type="radio"] { @@ -2272,8 +2272,8 @@ } .quiz-fill-input:focus { - border-color: #2E8E86; - box-shadow: 0 0 0 2px rgba(46, 142, 134, 0.15); + border-color: #3b82f6; + box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15); } .quiz-step-feedback { @@ -2472,10 +2472,10 @@ } .mobile-tab-btn.active { - color: #237B75; - border-bottom-color: #237B75; + color: #2563eb; + border-bottom-color: #2563eb; font-weight: 600; - background: rgba(35, 123, 117, 0.03); + background: rgba(37, 99, 235, 0.03); } /* 主布局转换为单栏 */ diff --git a/static/img/favicon.svg b/static/img/favicon.svg index 47508c87..a08773ff 100644 --- a/static/img/favicon.svg +++ b/static/img/favicon.svg @@ -1,5 +1,5 @@ CodeSense - + diff --git a/static/js/code_questions.js b/static/js/code_questions.js index 910e8a85..ed4d9b46 100644 --- a/static/js/code_questions.js +++ b/static/js/code_questions.js @@ -735,7 +735,7 @@ function addQuestionStyles() { .answer-header i { margin-right: 8px; - color: #237B75; + color: #0d6efd; } .ai-answer.error .answer-header i { @@ -762,7 +762,7 @@ function addQuestionStyles() { height: 8px; width: 8px; margin: 0 2px; - background-color: #237B75; + background-color: #0d6efd; border-radius: 50%; opacity: 0.6; animation: typing 1s infinite; diff --git a/static/js/thinking.js b/static/js/thinking.js index 44bfd761..227a3cff 100644 --- a/static/js/thinking.js +++ b/static/js/thinking.js @@ -507,7 +507,7 @@ qLabel.style.display = 'flex'; qLabel.style.alignItems = 'flex-start'; qLabel.style.gap = '6px'; - qLabel.innerHTML = `${i + 1} ${escapeHtml(q)}`; + qLabel.innerHTML = `${i + 1} ${escapeHtml(q)}`; const qTextarea = document.createElement('textarea'); qTextarea.className = 'description-textarea qa-answer-textarea'; diff --git a/static/modern.css b/static/modern.css index ed3d5ec9..11aac06f 100644 --- a/static/modern.css +++ b/static/modern.css @@ -1,34 +1,25 @@ /* modern.css - CodeSense 酷森思现代化样式 */ :root { - --cs-bg: #F5F7F8; - --cs-surface: #FFFFFF; - --cs-ink: #23343D; - --cs-muted: #64757D; - --cs-line: #DDE5E6; - --cs-accent: #237B75; - --cs-accent-soft: #EAF4F2; - --cs-input: #F0F3F3; - --bs-primary: var(--cs-accent); - --bs-primary-rgb: 35, 123, 117; /* 主色调 */ - --primary-color: var(--cs-accent); - --primary-hover: #1C625D; + --primary-color: #2563eb; + /* 深蓝色 */ + --primary-hover: #1d4ed8; --secondary-color: #f59e0b; /* 金色点缀 */ /* 中性色 */ - --dark: var(--cs-ink); - --dark-light: #40545D; - --medium: var(--cs-muted); - --light: var(--cs-bg); - --white: var(--cs-surface); + --dark: #1f2937; + --dark-light: #374151; + --medium: #9ca3af; + --light: #f3f4f6; + --white: #ffffff; /* 功能色 */ --success: #10b981; --warning: #f59e0b; --danger: #ef4444; - --info: #2E8E86; + --info: #3b82f6; /* 字体 */ --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; @@ -52,33 +43,6 @@ --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } -/* Bootstrap's compiled utilities keep their original blue without these bridges. */ -.bg-primary, -.badge.bg-primary { - background-color: var(--cs-accent) !important; -} - -.text-primary, -.link-primary { - color: var(--cs-accent) !important; -} - -.border-primary { - border-color: var(--cs-accent) !important; -} - -.btn-outline-primary { - color: var(--cs-accent); - border-color: var(--cs-accent); -} - -.btn-outline-primary:hover, -.btn-outline-primary:focus-visible { - color: var(--cs-surface); - background-color: var(--cs-accent); - border-color: var(--cs-accent); -} - /* 重置样式 */ * { margin: 0; @@ -88,8 +52,8 @@ body { font-family: var(--font-sans); - background-color: var(--cs-bg); - color: var(--cs-ink); + background-color: var(--light); + color: var(--dark); line-height: 1.5; } @@ -113,8 +77,7 @@ a:hover { /* 导航栏 */ .navbar { - background-color: var(--cs-surface); - border-bottom: 1px solid var(--cs-line); + background-color: var(--white); box-shadow: var(--shadow-sm); padding: var(--spacing-md) 0; position: sticky; @@ -143,7 +106,6 @@ a:hover { } .navbar-brand-logo { - filter: hue-rotate(-45deg) saturate(.75); width: auto; height: 34px; margin-right: 0 !important; @@ -174,7 +136,7 @@ a:hover { .navbar-link:hover, .navbar-link.active { color: var(--primary-color); - background-color: var(--cs-accent-soft); + background-color: rgba(37, 99, 235, 0.05); } .navbar-user { @@ -237,7 +199,7 @@ a:hover { } :where(a, button, input, select, textarea):focus-visible { - outline: 3px solid var(--cs-accent); + outline: 3px solid rgba(37, 99, 235, 0.55); outline-offset: 3px; } @@ -269,8 +231,7 @@ a:hover { /* 卡片 */ .card { - background-color: var(--cs-surface); - border: 1px solid var(--cs-line); + background-color: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: var(--spacing-lg); @@ -299,7 +260,7 @@ a:hover { .card-badge { display: inline-block; padding: 4px 8px; - background-color: var(--cs-accent-soft); + background-color: rgba(37, 99, 235, 0.1); color: var(--primary-color); border-radius: var(--radius-sm); font-size: 0.875rem; @@ -338,7 +299,7 @@ a:hover { } .btn-primary { - background-color: var(--cs-accent); + background-color: var(--primary-color); color: var(--white); } @@ -347,12 +308,12 @@ a:hover { } .btn-secondary { - background-color: var(--cs-accent-soft); + background-color: rgba(37, 99, 235, 0.1); color: var(--primary-color); } .btn-secondary:hover { - background-color: #DCEDE9; + background-color: rgba(37, 99, 235, 0.15); } .btn-success { @@ -399,7 +360,7 @@ a:hover { .form-control:focus { outline: none; border-color: var(--primary-color); - box-shadow: 0 0 0 3px rgba(35, 123, 117, 0.15); + box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); } .form-error { @@ -491,7 +452,7 @@ a:hover { } .badge-primary { - background-color: rgba(35, 123, 117, 0.1); + background-color: rgba(37, 99, 235, 0.1); color: var(--primary-color); } @@ -544,7 +505,7 @@ a:hover { } .alert-info { - background-color: rgba(46, 142, 134, 0.1); + background-color: rgba(59, 130, 246, 0.1); color: var(--info); border-left: 3px solid var(--info); } @@ -738,7 +699,7 @@ a:hover { ========================================================================== */ .maturity-hero { - background: var(--cs-ink); + background: linear-gradient(135deg, #1e293b 0%, #334155 100%); color: white; padding: 3rem 2rem; border-radius: 1rem; @@ -755,7 +716,7 @@ a:hover { right: -10%; width: 300px; height: 300px; - background: transparent; + background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%); border-radius: 50%; } @@ -770,7 +731,9 @@ a:hover { font-weight: 800; margin: 0; line-height: 1; - color: var(--cs-surface); + background: linear-gradient(to bottom, #fff, #94a3b8); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; } .maturity-label { @@ -923,9 +886,9 @@ a:hover { max-width: 720px; margin: 4rem auto; padding: 3rem 2rem; - border: 1px solid #EAF4F2; + border: 1px solid #dbeafe; border-radius: 1.25rem; - background: var(--cs-surface); + background: linear-gradient(145deg, #eff6ff, #ffffff 62%); box-shadow: var(--shadow-md); text-align: center; } @@ -1018,9 +981,9 @@ a:hover { .review-queue-filter:hover, .review-queue-filter.is-active { - color: #1C625D; - border-color: #A9D0CA; - background: #F5F7F8; + color: #1d4ed8; + border-color: #93c5fd; + background: #eff6ff; } .review-queue-table-wrap { @@ -1086,12 +1049,12 @@ a:hover { .ai-feedback-signal legend { float: none; width: auto; - color: #23343D; + color: #4c1d95; font-weight: 600; } .review-dashboard-card { - border-left: 4px solid #237B75; + border-left: 4px solid #2563eb; } @media (max-width: 640px) { @@ -1120,9 +1083,9 @@ a:hover { .learning-graph-panel { margin: 0 0 2rem; padding: 1.5rem; - border: 1px solid #DDE5E6; + border: 1px solid #dbe7f5; border-radius: var(--radius-lg); - background: var(--cs-surface); + background: linear-gradient(135deg, #f8fbff 0%, #ffffff 66%); box-shadow: 0 8px 24px rgba(30, 64, 175, 0.06); } @@ -1142,7 +1105,7 @@ a:hover { .learning-graph-panel__eyebrow { margin: 0 0 0.25rem; - color: #237B75; + color: #2563eb; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; @@ -1150,7 +1113,7 @@ a:hover { .learning-graph-panel__title { margin: 0; - color: #23343D; + color: #172554; font-size: 1.35rem; font-weight: 750; } @@ -1164,7 +1127,7 @@ a:hover { } .teacher-learning-actions { - border: 1px solid #DDE5E6; + border: 1px solid #dbe7f5; border-radius: var(--radius-lg); background: #ffffff; box-shadow: var(--shadow-sm); @@ -1183,7 +1146,7 @@ a:hover { padding: 1rem; border: 1px solid #e2e8f0; border-radius: 0.75rem; - background: #F5F7F8; + background: #f8fbff; } .teacher-learning-action-card h3, @@ -1226,8 +1189,8 @@ a:hover { padding: 1.25rem; border: 1px solid #dbe5f2; border-radius: 1rem; - background: var(--cs-surface); - box-shadow: 0 0.5rem 1.5rem rgba(35, 123, 117, 0.06); + background: linear-gradient(135deg, #f8fbff 0%, #ffffff 78%); + box-shadow: 0 0.5rem 1.5rem rgba(37, 99, 235, 0.06); } .student-learning-memory-panel__header { @@ -1268,7 +1231,7 @@ a:hover { gap: 0.35rem; border-radius: 999px; padding: 0.35rem 0.65rem; - color: #1C625D; + color: #1f4f8f; background: #eaf2ff; font-size: 0.8rem; white-space: nowrap; @@ -1392,10 +1355,10 @@ a:hover { .learning-graph-panel__privacy { flex: 0 0 auto; padding: 0.35rem 0.65rem; - border: 1px solid #CDE5E1; + border: 1px solid #bfdbfe; border-radius: 999px; - color: #1C625D; - background: #F5F7F8; + color: #1d4ed8; + background: #eff6ff; font-size: 0.75rem; white-space: nowrap; } @@ -1415,7 +1378,7 @@ a:hover { } .learning-graph-panel__summary strong { - color: #1C625D; + color: #1e40af; font-size: 1rem; } @@ -1473,7 +1436,7 @@ a:hover { height: 100%; min-width: 0; border-radius: inherit; - background: var(--cs-accent); + background: linear-gradient(90deg, #60a5fa, #2563eb); } .learning-graph-next { @@ -1498,23 +1461,23 @@ a:hover { justify-content: space-between; gap: 1rem; padding: 0.7rem 0.8rem; - border: 1px solid #EAF4F2; + border: 1px solid #dbeafe; border-radius: 0.65rem; - color: #23343D; - background: #F5F7F8; + color: #1e3a8a; + background: #eff6ff; text-decoration: none; } .learning-graph-recommendation:hover, .learning-graph-recommendation:focus-visible { - color: #23343D; - border-color: #A9D0CA; - background: #EAF4F2; + color: #1e3a8a; + border-color: #93c5fd; + background: #dbeafe; } .learning-graph-recommendation.is-static:hover { - color: #23343D; - background: #F5F7F8; + color: #1e3a8a; + background: #eff6ff; } .learning-graph-recommendation strong, @@ -1544,7 +1507,7 @@ a:hover { } .learning-graph-coverage-value { - color: #1C625D; + color: #1d4ed8; font-size: 1.7rem; font-weight: 750; line-height: 1; @@ -1584,7 +1547,7 @@ a:hover { align-items: flex-start; gap: 0.75rem; padding: 1rem; - border: 1px dashed #CDE5E1; + border: 1px dashed #bfdbfe; border-radius: 0.75rem; color: #475569; background: rgba(239, 246, 255, 0.65); @@ -1593,12 +1556,12 @@ a:hover { .learning-graph-empty > i { margin-top: 0.15rem; - color: #237B75; + color: #2563eb; font-size: 1.25rem; } .learning-graph-empty strong { - color: #23343D; + color: #1e3a8a; } .learning-graph-panel__note { diff --git a/templates/about.html b/templates/about.html index cfafab59..5a57eb35 100644 --- a/templates/about.html +++ b/templates/about.html @@ -11,7 +11,7 @@ } .hero-section { - background: var(--cs-accent); + background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%); color: white; padding: 4rem 2rem; border-radius: 1rem; diff --git a/templates/add_assignment.html b/templates/add_assignment.html index a4e0877c..dbdee9c1 100644 --- a/templates/add_assignment.html +++ b/templates/add_assignment.html @@ -34,7 +34,7 @@ .form-control:focus { border-color: var(--primary-color); - box-shadow: 0 0 0 3px rgba(35, 123, 117, 0.15); + box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15); outline: none; } diff --git a/templates/admin_dashboard.html b/templates/admin_dashboard.html index 4daafd4c..0bc78824 100644 --- a/templates/admin_dashboard.html +++ b/templates/admin_dashboard.html @@ -301,7 +301,7 @@
过去30天活跃度
// 调试信息输出函数(仅控制台显示,不影响页面) function log(message, type = 'info') { const styles = { - info: 'color: #237B75; background: #f0f8ff;', + info: 'color: #0066cc; background: #f0f8ff;', error: 'color: #cc0000; background: #fff0f0;', warning: 'color: #cc6600; background: #fff8f0;', success: 'color: #006600; background: #f0fff0;' diff --git a/templates/admin_profile.html b/templates/admin_profile.html index 90c71b4c..704549d0 100644 --- a/templates/admin_profile.html +++ b/templates/admin_profile.html @@ -21,7 +21,7 @@ left: 0; right: 0; bottom: 0; - background: rgba(35, 52, 61, 0.24); + background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.4) 100%); z-index: 1; } @@ -175,7 +175,7 @@ .badge-role { background-color: #e7f0ff; - color: #1C625D; + color: #0056b3; padding: 0.4rem 0.8rem; border-radius: 20px; font-weight: 500; diff --git a/templates/admin_trend_monitor.html b/templates/admin_trend_monitor.html index 04d4bb8f..409f8e85 100644 --- a/templates/admin_trend_monitor.html +++ b/templates/admin_trend_monitor.html @@ -5,7 +5,7 @@ {% block extra_css %} {% endblock %} @@ -344,10 +344,10 @@

恭喜您!目前没有显著瓶颈

skillsData.student.efficiency, skillsData.student.readability ], - backgroundColor: 'rgba(46, 142, 134, 0.4)', - borderColor: 'rgba(46, 142, 134, 1)', + backgroundColor: 'rgba(59, 130, 246, 0.4)', + borderColor: 'rgba(59, 130, 246, 1)', borderWidth: 2, - pointBackgroundColor: 'rgba(46, 142, 134, 1)', + pointBackgroundColor: 'rgba(59, 130, 246, 1)', }, ...(skillsData.class_average ? [{ label: '全班平均', @@ -377,13 +377,13 @@

恭喜您!目前没有显著瓶颈

datasets: [{ label: '综合能力值', data: metaHistory, - borderColor: '#2E8E86', - backgroundColor: 'rgba(46, 142, 134, 0.1)', + borderColor: '#3b82f6', + backgroundColor: 'rgba(59, 130, 246, 0.1)', fill: true, tension: 0.4, pointRadius: 6, pointBackgroundColor: '#fff', - pointBorderColor: '#2E8E86', + pointBorderColor: '#3b82f6', pointBorderWidth: 3 }] }; diff --git a/templates/staff_details.html b/templates/staff_details.html index 287bc539..2cf4da97 100644 --- a/templates/staff_details.html +++ b/templates/staff_details.html @@ -5,7 +5,7 @@ {% block extra_css %} - {% endblock %} {% block content %} @@ -769,7 +767,7 @@

{{ assignment.title }}

{{ assignment.difficulty }} -
+
截止日期: @@ -789,7 +787,7 @@

{{ assignment.title }}

-
@@ -889,7 +887,7 @@

{{ assignment.title }}

-
+
AI编程助手 @@ -899,11 +897,11 @@
-
- {% if knowledge_evidence is defined %} - {{ knowledge_evidence_panel(knowledge_evidence, audience='student', panel_id='code-studio-knowledge-evidence', compact=true, retry_url=url_for('api.get_assignment_knowledge_evidence', assignment_id=assignment.id)) }} - {% endif %} + {% if knowledge_evidence is defined %} + {{ knowledge_evidence_panel(knowledge_evidence, audience='student', panel_id='code-studio-knowledge-evidence', compact=true, retry_url=url_for('api.get_assignment_knowledge_evidence', assignment_id=assignment.id)) }} + {% endif %} +
🤖
@@ -926,10 +924,11 @@
你好!我是AI编程助手
-
+
+