From 001e496d16ef35f0a7fe5096d8d9d5fa3b9d81d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A5=80=E6=A2=A6?= <3501646051@qq.com>
Date: Tue, 23 Dec 2025 21:12:24 +0800
Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20=E7=A7=BB=E9=99=A4?=
=?UTF-8?q?=E6=9C=AA=E4=BD=BF=E7=94=A8=E7=9A=84CSS=E5=92=8CHTML=E6=96=87?=
=?UTF-8?q?=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
清理前端项目中未使用的CSS样式文件和HTML模板文件,包括notification.css、main.css、style.css和auth/index.html
---
frontend/public/css/main.css | 215 -----
frontend/public/css/notification.css | 47 -
frontend/public/css/style.css | 1197 --------------------------
frontend/public/js/main.js | 213 -----
frontend/views/auth/index.html | 130 ---
scripts/start.bat | 1 -
6 files changed, 1803 deletions(-)
delete mode 100644 frontend/public/css/main.css
delete mode 100644 frontend/public/css/notification.css
delete mode 100644 frontend/public/css/style.css
delete mode 100644 frontend/public/js/main.js
delete mode 100644 frontend/views/auth/index.html
diff --git a/frontend/public/css/main.css b/frontend/public/css/main.css
deleted file mode 100644
index bd0656e..0000000
--- a/frontend/public/css/main.css
+++ /dev/null
@@ -1,215 +0,0 @@
-/* 首页通用交互样式 */
-
-/* 滚动时导航栏样式 */
-.navbar-scrolled {
- background-color: rgba(255, 255, 255, 0.95) !important;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- backdrop-filter: blur(10px);
-}
-
-.navbar-scrolled .navbar-brand,
-.navbar-scrolled .nav-link {
- color: #333 !important;
-}
-
-.navbar-scrolled .navbar-toggler-icon {
- background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
-}
-
-/* 滚动动画效果 */
-.feature-card, .hero-content {
- opacity: 0;
- transform: translateY(20px);
- transition: opacity 0.6s ease, transform 0.6s ease;
-}
-
-.feature-card.animate-in,
-.hero-content.animate-in {
- opacity: 1;
- transform: translateY(0);
-}
-
-/* 返回顶部按钮 */
-#backToTop {
- position: fixed;
- bottom: 30px;
- right: 30px;
- width: 50px;
- height: 50px;
- background-color: #4e73df;
- color: white;
- border: none;
- border-radius: 50%;
- cursor: pointer;
- opacity: 0;
- visibility: hidden;
- transition: all 0.3s ease;
- z-index: 1000;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 1.2rem;
- box-shadow: 0 4px 15px rgba(78, 115, 223, 0.3);
-}
-
-#backToTop:hover {
- background-color: #2e59d9;
- transform: translateY(-3px);
- box-shadow: 0 6px 20px rgba(78, 115, 223, 0.4);
-}
-
-#backToTop.show {
- opacity: 1;
- visibility: visible;
-}
-
-/* 通知样式 */
-.notification {
- position: fixed;
- top: 20px;
- right: 20px;
- padding: 15px 20px;
- border-radius: 8px;
- background-color: white;
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
- z-index: 9999;
- opacity: 0;
- transform: translateX(100%);
- transition: opacity 0.3s ease, transform 0.3s ease;
- max-width: 350px;
- display: flex;
- align-items: center;
-}
-
-.notification.show {
- opacity: 1;
- transform: translateX(0);
-}
-
-.notification-content {
- display: flex;
- align-items: center;
- gap: 10px;
-}
-
-.notification i {
- font-size: 1.2rem;
-}
-
-.notification-success {
- border-left: 4px solid #1cc88a;
-}
-
-.notification-success i {
- color: #1cc88a;
-}
-
-.notification-error {
- border-left: 4px solid #e74a3b;
-}
-
-.notification-error i {
- color: #e74a3b;
-}
-
-.notification-info {
- border-left: 4px solid #36b9cc;
-}
-
-.notification-info i {
- color: #36b9cc;
-}
-
-/* 移动端菜单优化 */
-@media (max-width: 991.98px) {
- .navbar-collapse {
- background-color: white;
- padding: 20px;
- border-radius: 8px;
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
- margin-top: 10px;
- }
-
- .navbar-nav .nav-link {
- padding: 10px 15px;
- border-radius: 4px;
- margin-bottom: 5px;
- }
-
- .navbar-nav .nav-link:hover {
- background-color: #f8f9fc;
- }
-}
-
-/* 平滑滚动优化 */
-html {
- scroll-behavior: smooth;
-}
-
-/* 当前页面高亮 */
-.nav-link.active {
- color: #4e73df !important;
- font-weight: 600;
-}
-
-.nav-link.active::after {
- content: '';
- position: absolute;
- bottom: -2px;
- left: 0;
- width: 100%;
- height: 2px;
- background-color: #4e73df;
- border-radius: 2px;
-}
-
-/* 按钮悬停效果增强 */
-.btn {
- transition: all 0.3s ease;
-}
-
-.btn:hover {
- transform: translateY(-2px);
- box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
-}
-
-/* 卡片悬停效果 */
-.feature-card {
- transition: all 0.3s ease;
-}
-
-.feature-card:hover {
- transform: translateY(-5px);
- box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
-}
-
-/* 加载动画 */
-.loading-spinner {
- display: inline-block;
- width: 20px;
- height: 20px;
- border: 3px solid rgba(255, 255, 255, 0.3);
- border-radius: 50%;
- border-top-color: white;
- animation: spin 1s ease-in-out infinite;
-}
-
-@keyframes spin {
- to { transform: rotate(360deg); }
-}
-
-/* 响应式调整 */
-@media (max-width: 768px) {
- #backToTop {
- bottom: 20px;
- right: 20px;
- width: 45px;
- height: 45px;
- }
-
- .notification {
- left: 20px;
- right: 20px;
- max-width: none;
- }
-}
\ No newline at end of file
diff --git a/frontend/public/css/notification.css b/frontend/public/css/notification.css
deleted file mode 100644
index 1a8c34f..0000000
--- a/frontend/public/css/notification.css
+++ /dev/null
@@ -1,47 +0,0 @@
-/* 通知消息样式 */
-.notification {
- position: fixed;
- top: 20px;
- right: 20px;
- padding: 15px 25px;
- background: white;
- border-radius: 8px;
- box-shadow: 0 4px 12px rgba(0,0,0,0.15);
- display: flex;
- align-items: center;
- z-index: 1000;
- transform: translateX(120%);
- transition: transform 0.3s ease;
- border-left: 4px solid #4e73df;
- max-width: 350px;
-}
-
-.notification.show {
- transform: translateX(0);
-}
-
-.notification.success {
- border-left-color: #2ecc71;
-}
-
-.notification.error {
- border-left-color: #e74c3c;
-}
-
-.notification i {
- margin-right: 10px;
- font-size: 1.2em;
-}
-
-.notification.success i {
- color: #2ecc71;
-}
-
-.notification.error i {
- color: #e74c3c;
-}
-
-.notification-content {
- font-size: 14px;
- color: #333;
-}
\ No newline at end of file
diff --git a/frontend/public/css/style.css b/frontend/public/css/style.css
deleted file mode 100644
index 812154b..0000000
--- a/frontend/public/css/style.css
+++ /dev/null
@@ -1,1197 +0,0 @@
-/* 重置和基础样式 */
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
-}
-
-body {
- font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
- background: #f8f9fa;
- min-height: 100vh;
- color: #333;
-}
-
-/* 通用容器 */
-.container {
- max-width: 1000px;
- margin: 30px auto;
- padding: 20px;
- background: white;
- border-radius: 10px;
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
-}
-
-/* 认证页面容器 */
-.auth-container {
- max-width: 500px;
- margin: 50px auto;
- padding: 40px;
- background: white;
- border-radius: 15px;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-}
-
-.auth-card {
- padding: 0;
-}
-
-/* 卡片样式 */
-.card {
- background: white;
- border-radius: 15px;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
- padding: 30px;
- margin-bottom: 20px;
- transition: transform 0.3s ease, box-shadow 0.3s ease;
-}
-
-.card:hover {
- transform: translateY(-5px);
- box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
-}
-
-/* 按钮样式 */
-.btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- padding: 12px 24px;
- border: none;
- border-radius: 8px;
- font-size: 16px;
- font-weight: 500;
- cursor: pointer;
- transition: all 0.3s ease;
- text-decoration: none;
- gap: 8px;
-}
-
-.btn-primary {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
-}
-
-.btn-primary:hover {
- background: linear-gradient(135deg, #5a6fd8 0%, #6b4090 100%);
- transform: translateY(-2px);
- box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
-}
-
-.btn-secondary {
- background: #f8f9fa;
- color: #495057;
- border: 1px solid #dee2e6;
-}
-
-.btn-secondary:hover {
- background: #e9ecef;
- border-color: #adb5bd;
-}
-
-.btn-danger {
- background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
- color: white;
-}
-
-.btn-danger:hover {
- background: linear-gradient(135deg, #e685f0 0%, #e4475c 100%);
-}
-
-.btn-success {
- background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
- color: white;
-}
-
-.btn-success:hover {
- background: linear-gradient(135deg, #3a9bf4 0%, #00d9e4 100%);
-}
-
-/* 表格样式 */
-.table-container {
- background: white;
- border-radius: 10px;
- overflow: hidden;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- margin-bottom: 30px;
-}
-
-table {
- width: 100%;
- border-collapse: collapse;
-}
-
-thead {
- background: #f8f9fa;
-}
-
-th {
- padding: 15px 20px;
- text-align: left;
- font-weight: 600;
- color: #495057;
- border-bottom: 2px solid #dee2e6;
-}
-
-td {
- padding: 15px 20px;
- border-bottom: 1px solid #dee2e6;
-}
-
-tr:hover {
- background: #f8f9fa;
-}
-
-/* 表单样式 */
-
-
-/* 导航栏样式 */
-.navbar {
- background: white;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
- padding: 15px 30px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-radius: 0 0 15px 15px;
- margin-bottom: 30px;
-}
-
-.navbar-brand {
- display: flex;
- align-items: center;
- gap: 10px;
- font-size: 20px;
- font-weight: 600;
- color: #667eea;
- text-decoration: none;
-}
-
-.navbar-menu {
- display: flex;
- gap: 20px;
- align-items: center;
-}
-
-.navbar-user {
- display: flex;
- align-items: center;
- gap: 10px;
-}
-
-.user-avatar {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- color: white;
- display: flex;
- align-items: center;
- justify-content: center;
- font-weight: 600;
-}
-
-/* 响应式设计 */
-@media (max-width: 768px) {
- .container {
- padding: 0 15px;
- }
-
- .card {
- padding: 20px;
- }
-
- .btn {
- padding: 8px 16px;
- font-size: 14px;
- }
-
- .table-responsive {
- overflow-x: auto;
- }
-}
-
-/* 统计卡片样式 */
-.stats-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 20px;
- margin-bottom: 30px;
-}
-
-.stat-card {
- background: white;
- border-radius: 10px;
- padding: 25px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- transition: transform 0.3s ease, box-shadow 0.3s ease;
- display: flex;
- align-items: center;
-}
-
-.stat-card:hover {
- transform: translateY(-5px);
- box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
-}
-
-.stat-icon {
- width: 60px;
- height: 60px;
- border-radius: 10px;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 20px;
- font-size: 24px;
- color: white;
-}
-
-.stat-icon.users,
-.stat-icon.gpa {
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
-}
-
-.stat-icon.students,
-.stat-icon.courses {
- background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
-}
-
-.stat-icon.teachers,
-.stat-icon.credits {
- background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
-}
-
-.stat-icon.courses,
-.stat-icon.ranking {
- background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
-}
-
-.stat-content {
- flex: 1;
-}
-
-.stat-value {
- font-size: 32px;
- font-weight: 700;
- color: #2d3748;
- margin-bottom: 5px;
-}
-
-.stat-label {
- font-size: 14px;
- color: #718096;
- margin-bottom: 10px;
-}
-
-.stat-change {
- font-size: 12px;
- display: flex;
- align-items: center;
-}
-
-.stat-change.positive {
- color: #38a169;
-}
-
-.stat-change i {
- margin-right: 5px;
-}
-
-/* 功能卡片样式 */
-.function-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
- gap: 25px;
- margin-bottom: 40px;
-}
-
-.function-card {
- background: white;
- border-radius: 12px;
- padding: 30px;
- box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
- transition: all 0.3s ease;
- cursor: pointer;
- text-align: center;
- border: 2px solid transparent;
-}
-
-.function-card:hover {
- transform: translateY(-8px);
- box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
- border-color: #4a90e2;
-}
-
-.function-icon {
- width: 80px;
- height: 80px;
- border-radius: 50%;
- background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 0 auto 20px;
- font-size: 32px;
- color: white;
-}
-
-.function-title {
- font-size: 20px;
- font-weight: 600;
- color: #2d3748;
- margin-bottom: 15px;
-}
-
-.function-description {
- font-size: 14px;
- color: #718096;
- line-height: 1.6;
- margin-bottom: 20px;
-}
-
-/* 系统状态样式 */
-.system-status {
- background: white;
- border-radius: 12px;
- padding: 30px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
- margin-bottom: 40px;
-}
-
-.section-title {
- font-size: 20px;
- font-weight: 600;
- color: #2d3748;
- margin-bottom: 25px;
- display: flex;
- align-items: center;
-}
-
-.section-title i {
- margin-right: 10px;
- color: #4a90e2;
-}
-
-.status-list {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 20px;
-}
-
-.status-item {
- display: flex;
- align-items: center;
- padding: 15px;
- background: #f7fafc;
- border-radius: 8px;
- transition: background-color 0.3s ease;
-}
-
-.status-item:hover {
- background: #edf2f7;
-}
-
-.status-indicator {
- width: 12px;
- height: 12px;
- border-radius: 50%;
- margin-right: 15px;
-}
-
-.status-indicator.online {
- background-color: #38a169;
-}
-
-.status-indicator.warning {
- background-color: #d69e2e;
-}
-
-.status-indicator.offline {
- background-color: #e53e3e;
-}
-
-.status-label {
- font-size: 14px;
- font-weight: 600;
- color: #2d3748;
- margin-bottom: 5px;
-}
-
-.status-value {
- font-size: 12px;
- color: #718096;
-}
-
-/* 最近活动样式 */
-.recent-activities {
- background: white;
- border-radius: 12px;
- padding: 30px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
-}
-
-.activity-list {
- list-style: none;
- padding: 0;
-}
-
-.activity-item {
- display: flex;
- align-items: center;
- padding: 15px 0;
- border-bottom: 1px solid #e2e8f0;
-}
-
-.activity-item:last-child {
- border-bottom: none;
-}
-
-.activity-icon {
- width: 40px;
- height: 40px;
- border-radius: 50%;
- background: #f7fafc;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 15px;
- color: #4a90e2;
-}
-
-.activity-content {
- flex: 1;
-}
-
-.activity-title {
- font-size: 14px;
- font-weight: 600;
- color: #2d3748;
- margin-bottom: 5px;
-}
-
-.activity-time {
- font-size: 12px;
- color: #718096;
-}
-
-/* 面包屑导航 */
-.breadcrumb {
- display: flex;
- align-items: center;
- font-size: 14px;
- color: #718096;
- margin-top: 5px;
-}
-
-.breadcrumb a {
- color: #4a90e2;
- text-decoration: none;
- transition: color 0.3s ease;
-}
-
-.breadcrumb a:hover {
- color: #357abd;
- text-decoration: underline;
-}
-
-.breadcrumb i {
- margin: 0 10px;
- font-size: 12px;
-}
-
-/* 当前时间显示 */
-.current-time {
- font-size: 14px;
- color: #718096;
- background: #f7fafc;
- padding: 8px 15px;
- border-radius: 20px;
-}
-
-/* 页面标题 */
-.page-title {
- font-size: 24px;
- font-weight: 700;
- color: #2d3748;
- margin-bottom: 5px;
-}
-
-/* 内容头部 */
-.content-header {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- margin-bottom: 30px;
-}
-
-/* ==================== 主页样式 ==================== */
-/* 英雄区域 */
-.hero-section {
- min-height: 80vh;
- display: flex;
- align-items: center;
- justify-content: center;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- position: relative;
- overflow: hidden;
-}
-
-.hero-section::before {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: url('../images/hero-bg.jpg') center/cover no-repeat;
- opacity: 0.1;
-}
-
-.hero-content {
- max-width: 800px;
- text-align: center;
- position: relative;
- z-index: 1;
- padding: 40px;
- background: rgba(255, 255, 255, 0.95);
- border-radius: 20px;
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
- margin: 20px;
-}
-
-.hero-title {
- font-size: 48px;
- font-weight: 800;
- margin-bottom: 20px;
- color: #2c3e50;
- text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
-}
-
-.hero-subtitle {
- font-size: 20px;
- margin-bottom: 30px;
- color: #7f8c8d;
- opacity: 0.9;
- line-height: 1.6;
-}
-
-/* 功能区域 */
-.features-section {
- padding: 80px 20px;
- background-color: #f8f9fa;
- border-radius: 20px;
- margin: 40px 20px;
-}
-
-.section-title {
- text-align: center;
- font-size: 36px;
- color: #2c3e50;
- margin-bottom: 50px;
-}
-
-.features-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
- gap: 30px;
- max-width: 1200px;
- margin: 0 auto;
-}
-
-.feature-card {
- background: white;
- border-radius: 15px;
- padding: 40px 30px;
- text-align: center;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
- transition: transform 0.3s ease, box-shadow 0.3s ease;
-}
-
-.feature-card:hover {
- transform: translateY(-10px);
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
-}
-
-.feature-icon {
- width: 80px;
- height: 80px;
- border-radius: 50%;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- display: flex;
- align-items: center;
- justify-content: center;
- margin: 0 auto 25px;
- font-size: 32px;
- color: white;
-}
-
-.feature-title {
- font-size: 24px;
- color: #2c3e50;
- margin-bottom: 15px;
-}
-
-.feature-description {
- color: #7f8c8d;
- line-height: 1.6;
-}
-
-/* 行动号召区域 */
-.cta-section {
- text-align: center;
- padding: 80px 20px;
-}
-
-.cta-title {
- font-size: 36px;
- color: #2c3e50;
- margin-bottom: 30px;
-}
-
-.cta-buttons {
- display: flex;
- justify-content: center;
- gap: 20px;
- flex-wrap: wrap;
-}
-
-/* 页脚 */
-.footer {
- background-color: #2c3e50;
- color: white;
- padding: 60px 20px;
- text-align: center;
- border-radius: 20px 20px 0 0;
- margin-top: 80px;
-}
-
-.footer-content {
- max-width: 1200px;
- margin: 0 auto;
-}
-
-.footer-links {
- display: flex;
- justify-content: center;
- gap: 30px;
- margin: 30px 0;
- flex-wrap: wrap;
-}
-
-.footer-links a {
- color: #bdc3c7;
- text-decoration: none;
- transition: color 0.3s ease;
-}
-
-.footer-links a:hover {
- color: white;
-}
-
-.copyright {
- margin-top: 30px;
- color: #999;
- font-size: 0.9rem;
-}
-
-/* 主页响应式设计 */
-@media (max-width: 768px) {
- .hero-title {
- font-size: 32px;
- }
-
- .hero-subtitle {
- font-size: 16px;
- }
-
- .section-title {
- font-size: 28px;
- }
-
- .cta-buttons {
- flex-direction: column;
- }
-
- .cta-buttons .btn {
- width: 100%;
- }
-}
-
-/* ==================== 仪表板通用样式 ==================== */
-/* 仪表板布局 */
-.dashboard-container {
- display: flex;
- min-height: calc(100vh - 100px);
-}
-
-/* 侧边栏 */
-.sidebar {
- width: 250px;
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
- position: sticky;
- top: 0;
- height: 100vh;
- overflow-y: auto;
-}
-
-.sidebar.admin-sidebar {
- background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
-}
-
-.sidebar.teacher-sidebar {
- background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
-}
-
-.sidebar-header {
- padding: 30px 20px;
- border-bottom: 1px solid rgba(255, 255, 255, 0.1);
- margin-bottom: 20px;
-}
-
-.user-info {
- display: flex;
- align-items: center;
- gap: 15px;
-}
-
-.user-avatar {
- width: 50px;
- height: 50px;
- border-radius: 50%;
- background: rgba(255, 255, 255, 0.2);
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 20px;
- color: white;
- font-weight: 600;
-}
-
-.user-details h3 {
- color: white;
- font-size: 16px;
- margin-bottom: 5px;
-}
-
-.user-details p {
- color: rgba(255, 255, 255, 0.7);
- font-size: 12px;
-}
-
-.sidebar-menu {
- list-style: none;
- padding: 0 20px;
-}
-
-.sidebar-menu li {
- margin-bottom: 10px;
-}
-
-.sidebar-menu a {
- display: flex;
- align-items: center;
- gap: 15px;
- padding: 15px;
- color: rgba(255, 255, 255, 0.8);
- text-decoration: none;
- border-radius: 8px;
- transition: all 0.3s ease;
-}
-
-.sidebar-menu a:hover {
- background: rgba(255, 255, 255, 0.1);
- color: white;
-}
-
-.sidebar-menu a.active {
- background: rgba(255, 255, 255, 0.2);
- color: white;
-}
-
-.sidebar-menu i {
- width: 20px;
- text-align: center;
-}
-
-/* 主内容区 */
-.main-content {
- flex: 1;
- padding: 30px;
- background: #f8f9fa;
- overflow-y: auto;
-}
-
-.content-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 30px;
-}
-
-.content-header h1 {
- font-size: 28px;
- color: #2c3e50;
- margin: 0;
-}
-
-.breadcrumb {
- color: #7f8c8d;
- font-size: 14px;
- margin-top: 5px;
-}
-
-
-
-/* 成绩表格 */
-.grades-table {
- background: white;
- border-radius: 15px;
- overflow: hidden;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-}
-
-.table-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 20px 25px;
- border-bottom: 1px solid #eee;
-}
-
-.table-title {
- font-size: 1.3rem;
- color: #333;
- margin: 0;
-}
-
-.table-actions {
- display: flex;
- gap: 10px;
-}
-
-.table-container {
- overflow-x: auto;
-}
-
-.grades-table table {
- width: 100%;
- border-collapse: collapse;
-}
-
-.grades-table th {
- background: #f8f9ff;
- padding: 15px 20px;
- text-align: left;
- font-weight: 600;
- color: #333;
- border-bottom: 1px solid #eee;
-}
-
-.grades-table td {
- padding: 15px 20px;
- border-bottom: 1px solid #eee;
-}
-
-.grades-table tr:hover {
- background: #f8f9ff;
-}
-
-/* 成绩徽章 */
-.grade-badge {
- display: inline-block;
- padding: 5px 15px;
- border-radius: 20px;
- font-size: 12px;
- font-weight: 600;
- color: white;
-}
-
-.grade-badge.A {
- background: #2ecc71;
-}
-
-.grade-badge.B {
- background: #3498db;
-}
-
-.grade-badge.C {
- background: #f39c12;
-}
-
-.grade-badge.D {
- background: #e74c3c;
-}
-
-/* 查看按钮 */
-.view-btn {
- background: #f8f9fa;
- color: #495057;
- border: 1px solid #dee2e6;
- padding: 8px 16px;
- border-radius: 5px;
- font-size: 14px;
- cursor: pointer;
- transition: all 0.3s ease;
-}
-
-.view-btn:hover {
- background: #e9ecef;
- border-color: #adb5bd;
-}
-
-/* 仪表板响应式设计 */
-@media (max-width: 992px) {
- .dashboard-container {
- flex-direction: column;
- }
-
- .sidebar {
- width: 100%;
- height: auto;
- position: static;
- }
-
- .sidebar-menu {
- display: flex;
- overflow-x: auto;
- padding: 10px 20px;
- }
-
- .sidebar-menu li {
- margin-bottom: 0;
- margin-right: 10px;
- }
-
- .sidebar-menu a {
- white-space: nowrap;
- }
-}
-
-@media (max-width: 768px) {
- .main-content {
- padding: 20px;
- }
-
- .content-header {
- flex-direction: column;
- align-items: flex-start;
- gap: 15px;
- }
-
- .stats-grid {
- grid-template-columns: 1fr;
- }
-
- .table-actions {
- flex-direction: column;
- }
-
- .function-grid {
- grid-template-columns: 1fr;
- }
-
- .status-list {
- grid-template-columns: 1fr;
- }
-}
-
-/* ==================== 管理页面通用样式 ==================== */
-/* 页面容器 */
-.page-container {
- padding: 20px;
-}
-
-/* 页面头部 */
-.page-header {
- margin-bottom: 30px;
-}
-
-.page-header h1 {
- font-size: 28px;
- color: #2c3e50;
- margin-bottom: 10px;
-}
-
-.page-header p {
- color: #7f8c8d;
- font-size: 16px;
- margin: 0;
-}
-
-/* 过滤区域 */
-.filter-section {
- background: white;
- border-radius: 10px;
- padding: 20px;
- margin-bottom: 30px;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
-}
-
-.filter-title {
- font-size: 18px;
- font-weight: 600;
- color: #2c3e50;
- margin-bottom: 20px;
- display: flex;
- align-items: center;
- gap: 10px;
-}
-
-.filter-form {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
- gap: 15px;
-}
-
-.filter-row {
- display: flex;
- gap: 15px;
- flex-wrap: wrap;
-}
-
-.filter-group {
- display: flex;
- flex-direction: column;
- min-width: 200px;
-}
-
-.filter-group label {
- font-size: 14px;
- color: #666;
- margin-bottom: 5px;
-}
-
-/* 表单样式 */
-.entry-form {
- background: white;
- border-radius: 12px;
- padding: 30px;
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
-}
-
-.form-row {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
- gap: 20px;
- margin-bottom: 20px;
-}
-
-.form-group {
- margin-bottom: 20px;
-}
-
-.form-group label {
- display: block;
- font-size: 14px;
- color: #666;
- margin-bottom: 8px;
-}
-
-.form-control {
- width: 100%;
- padding: 12px 15px;
- border: 1px solid #ddd;
- border-radius: 8px;
- font-size: 14px;
- transition: border-color 0.3s ease;
-}
-
-.form-control:focus {
- outline: none;
- border-color: #667eea;
- box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
-}
-
-
-
-/* 操作按钮 */
-.action-buttons {
- display: flex;
- gap: 10px;
-}
-
-.btn-add {
- background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
- color: white;
- border: none;
- padding: 10px 20px;
- border-radius: 8px;
- font-size: 14px;
- cursor: pointer;
- transition: all 0.3s ease;
-}
-
-.btn-add:hover {
- transform: translateY(-2px);
- box-shadow: 0 5px 15px rgba(67, 233, 123, 0.3);
-}
-
-/* 管理页面响应式设计 */
-@media (max-width: 768px) {
- .filter-form {
- grid-template-columns: 1fr;
- }
-
- .filter-row {
- flex-direction: column;
- }
-
- .filter-group {
- min-width: 100%;
- }
-
- .form-row {
- grid-template-columns: 1fr;
- }
-
- .action-buttons {
- flex-direction: column;
- }
-}/ * 1laqZXO͓\!} * /
- . n o t i f i c a t i o n {
- p o s i t i o n : f i x e d ;
- t o p : 2 0 p x ;
- r i g h t : 2 0 p x ;
- p a d d i n g : 1 5 p x 2 5 p x ;
- b a c k g r o u n d : w h i t e ;
- b o r d e r - r a d i u s : 8 p x ;
- b o x - s h a d o w : 0 4 p x 1 2 p x r g b a ( 0 , 0 , 0 , 0 . 1 5 ) ;
- d i s p l a y : f l e x ;
- a l i g n - i t e m s : c e n t e r ;
- z - i n d e x : 1 0 0 0 ;
- t r a n s f o r m : t r a n s l a t e X ( 1 2 0 % ) ;
- t r a n s i t i o n : t r a n s f o r m 0 . 3 s e a s e ;
- b o r d e r - l e f t : 4 p x s o l i d # 4 e 7 3 d f ;
- m a x - w i d t h : 3 5 0 p x ;
- }
-
- . n o t i f i c a t i o n . s h o w {
- t r a n s f o r m : t r a n s l a t e X ( 0 ) ;
- }
-
- . n o t i f i c a t i o n . s u c c e s s {
- b o r d e r - l e f t - c o l o r : # 2 e c c 7 1 ;
- }
-
- . n o t i f i c a t i o n . e r r o r {
- b o r d e r - l e f t - c o l o r : # e 7 4 c 3 c ;
- }
-
- . n o t i f i c a t i o n i {
- m a r g i n - r i g h t : 1 0 p x ;
- f o n t - s i z e : 1 . 2 e m ;
- }
-
- . n o t i f i c a t i o n . s u c c e s s i {
- c o l o r : # 2 e c c 7 1 ;
- }
-
- . n o t i f i c a t i o n . e r r o r i {
- c o l o r : # e 7 4 c 3 c ;
- }
-
- . n o t i f i c a t i o n - c o n t e n t {
- f o n t - s i z e : 1 4 p x ;
- c o l o r : # 3 3 3 ;
- }
-
\ No newline at end of file
diff --git a/frontend/public/js/main.js b/frontend/public/js/main.js
deleted file mode 100644
index 0ed4800..0000000
--- a/frontend/public/js/main.js
+++ /dev/null
@@ -1,213 +0,0 @@
-// 首页通用JavaScript功能
-// 主要处理导航栏交互、页面滚动效果等通用功能
-
-class MainPage {
- constructor() {
- this.init();
- }
-
- init() {
- // 初始化所有功? this.initNavbar();
- this.initScrollEffects();
- this.initSmoothScroll();
- this.initBackToTop();
- this.initMobileMenu();
- this.initAuthButtons();
- }
-
- // 初始化导航栏交互
- initNavbar() {
- const navbar = document.querySelector('.navbar');
- if (!navbar) return;
-
- // 滚动时改变导航栏样式
- window.addEventListener('scroll', () => {
- if (window.scrollY > 50) {
- navbar.classList.add('navbar-scrolled');
- } else {
- navbar.classList.remove('navbar-scrolled');
- }
- });
-
- // 初始化当前页面高? this.highlightCurrentPage();
- }
-
- // 高亮当前页面导航链接
- highlightCurrentPage() {
- const currentPath = window.location.pathname;
- const navLinks = document.querySelectorAll('.nav-link');
-
- navLinks.forEach(link => {
- const href = link.getAttribute('href');
- if (href && currentPath.includes(href.replace('.html', ''))) {
- link.classList.add('active');
- }
- });
- }
-
- // 初始化滚动效? initScrollEffects() {
- // 滚动时显?隐藏元素
- const observerOptions = {
- root: null,
- rootMargin: '0px',
- threshold: 0.1
- };
-
- const observer = new IntersectionObserver((entries) => {
- entries.forEach(entry => {
- if (entry.isIntersecting) {
- entry.target.classList.add('animate-in');
- }
- });
- }, observerOptions);
-
- // 观察需要动画的元素
- document.querySelectorAll('.feature-card, .hero-content').forEach(el => {
- observer.observe(el);
- });
- }
-
- // 初始化平滑滚? initSmoothScroll() {
- document.querySelectorAll('a[href^="#"]').forEach(anchor => {
- anchor.addEventListener('click', (e) => {
- e.preventDefault();
- const targetId = anchor.getAttribute('href');
- if (targetId === '#') return;
-
- const targetElement = document.querySelector(targetId);
- if (targetElement) {
- targetElement.scrollIntoView({
- behavior: 'smooth',
- block: 'start'
- });
- }
- });
- });
- }
-
- // 初始化返回顶部按? initBackToTop() {
- const backToTopBtn = document.createElement('button');
- backToTopBtn.id = 'backToTop';
- backToTopBtn.innerHTML = '';
- backToTopBtn.title = '返回顶部';
- document.body.appendChild(backToTopBtn);
-
- // 滚动时显?隐藏按钮
- window.addEventListener('scroll', () => {
- if (window.scrollY > 300) {
- backToTopBtn.classList.add('show');
- } else {
- backToTopBtn.classList.remove('show');
- }
- });
-
- // 点击返回顶部
- backToTopBtn.addEventListener('click', () => {
- window.scrollTo({
- top: 0,
- behavior: 'smooth'
- });
- });
- }
-
- // 初始化移动端菜单
- initMobileMenu() {
- const navbarToggler = document.querySelector('.navbar-toggler');
- const navbarCollapse = document.querySelector('.navbar-collapse');
-
- if (!navbarToggler || !navbarCollapse) return;
-
- navbarToggler.addEventListener('click', () => {
- navbarCollapse.classList.toggle('show');
- });
-
- // 点击菜单项后自动关闭移动菜单
- document.querySelectorAll('.navbar-nav .nav-link').forEach(link => {
- link.addEventListener('click', () => {
- if (navbarCollapse.classList.contains('show')) {
- navbarCollapse.classList.remove('show');
- }
- });
- });
- }
-
- // 初始化认证按钮状? initAuthButtons() {
- // 检查用户是否已登录
- this.checkLoginStatus().then(user => {
- const loginBtn = document.getElementById('loginBtn');
- const registerBtn = document.getElementById('registerBtn');
- const heroLoginBtn = document.getElementById('heroLoginBtn');
-
- if (user) {
- // 用户已登录,显示仪表板按? // 根据用户角色设置正确的仪表板路径
- let dashboardUrl = '/dashboard';
- if (user.role === 'student') {
- dashboardUrl = '/student/dashboard';
- } else if (user.role === 'teacher') {
- dashboardUrl = '/teacher/dashboard';
- } else if (user.role === 'admin') {
- dashboardUrl = '/admin/dashboard';
- }
-
- if (loginBtn) {
- loginBtn.textContent = '进入仪表?;
- loginBtn.href = dashboardUrl;
- }
- if (heroLoginBtn) {
- heroLoginBtn.textContent = '进入仪表?;
- heroLoginBtn.href = dashboardUrl;
- }
- if (registerBtn) {
- registerBtn.style.display = 'none';
- }
- }
- });
- }
-
- // 检查登录状? async checkLoginStatus() {
- try {
- const apiBase = window.location.protocol === 'file:' ? 'http://localhost:3000/api' : '/api';
- const response = await fetch(`${apiBase}/auth/me`);
- const data = await response.json();
- return data.success && data.user;
- } catch (error) {
- console.log('用户未登?);
- return false;
- }
- }
-
- // 显示通知
- showNotification(message, type = 'info') {
- // 创建通知元素
- const notification = document.createElement('div');
- notification.className = `notification notification-${type}`;
- notification.innerHTML = `
-
-
- ${message}
-
- `;
-
- // 添加到页? document.body.appendChild(notification);
-
- // 显示通知
- setTimeout(() => {
- notification.classList.add('show');
- }, 10);
-
- // 自动隐藏
- setTimeout(() => {
- notification.classList.remove('show');
- setTimeout(() => {
- if (notification.parentNode) {
- notification.parentNode.removeChild(notification);
- }
- }, 300);
- }, 3000);
- }
-}
-
-// 页面加载完成后初始化
-document.addEventListener('DOMContentLoaded', () => {
- new MainPage();
-});
diff --git a/frontend/views/auth/index.html b/frontend/views/auth/index.html
deleted file mode 100644
index 24624c4..0000000
--- a/frontend/views/auth/index.html
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
- 学生成绩管理系统
-
-
-
-
-
-
-
-
-
-
-
-
-
XX学校学生成绩管理系统
-
- 高效、安全、智能的成绩管理平台,为学校师生提供全方位的成绩管理服务? 实现成绩录入、查询、统计和分析的一体化解决方案?
-
-
-
-
-
-
- 系统功能特色
-
-
-
-
-
-
学生成绩查询
-
- 学生可随时查看个人成绩,包括各科成绩、平均分、排名等信息? 支持成绩趋势分析和历史记录查看?
-
-
-
-
-
-
-
教师成绩管理
-
- 教师可便捷录入、修改、查询学生成绩,支持批量操作和成绩统计分析,
- 提供多种数据导出格式?
-
-
-
-
-
-
-
管理员权限控?/h3>
-
- 管理员可管理用户账户、学生信息,查看系统统计报表? 设置权限和系统参数,确保数据安全?
-
-
-
-
-
-
-
智能统计分析
-
- 提供丰富的图表统计功能,包括成绩分布、趋势分析、对比图表等? 帮助学校进行教学评估和决策支持?
-
-
-
-
-
-
- 立即体验智能成绩管理
-
- 加入XX学校成绩管理系统,体验高效、便捷的成绩管理服务?
-
-
-
-
-
-
-
-
-
-
diff --git a/scripts/start.bat b/scripts/start.bat
index 405f275..ea6efe7 100644
--- a/scripts/start.bat
+++ b/scripts/start.bat
@@ -1,5 +1,4 @@
@echo off
-:: 使用简单的语法避免编码引起的解析错误
cd /d %~dp0
cd ..\backend