From afdda9fa141496eefb441b7b3f0d092ded110d97 Mon Sep 17 00:00:00 2001 From: canglan Date: Mon, 27 Apr 2026 04:42:00 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/admin/dashboard.php | 2 +- frontend/assets/css/admin.css | 131 +---------------- frontend/assets/css/style.css | 257 +--------------------------------- frontend/includes/header.php | 3 +- frontend/index.php | 3 +- 5 files changed, 5 insertions(+), 391 deletions(-) diff --git a/frontend/admin/dashboard.php b/frontend/admin/dashboard.php index 8372391..aa23256 100644 --- a/frontend/admin/dashboard.php +++ b/frontend/admin/dashboard.php @@ -35,7 +35,7 @@ include __DIR__ . '/../includes/header.php';
操行分排行榜
-
+
显示前 % 的学生 diff --git a/frontend/assets/css/admin.css b/frontend/assets/css/admin.css index ab1c9ec..e5618dc 100644 --- a/frontend/assets/css/admin.css +++ b/frontend/assets/css/admin.css @@ -206,143 +206,14 @@ color: #4338ca; } -/* ========== 响应式 — 平板 (≤768px) ========== */ @media (max-width: 768px) { .student-cell { width: calc(100% / 4 - 10px); - min-height: 54px; - font-size: 13px; - } - - .batch-bar { - flex-direction: column; - gap: 8px; - text-align: center; - } - - .filter-bar { - flex-direction: column; - gap: 10px; - padding: 12px; - } - - .filter-group { - min-width: 100%; - } - - .attendance-toolbar { - gap: 8px; - } - - .attendance-toolbar .status-group { - flex-wrap: wrap; - gap: 6px; - } - - .attendance-toolbar .status-btn { - padding: 8px 14px; - font-size: 13px; - min-height: 40px; - } - - .assignment-header { - flex-direction: column; - align-items: flex-start; - } - - .import-area { - padding: 20px; } } -/* ========== 响应式 — 手机 (≤480px) ========== */ @media (max-width: 480px) { .student-cell { - width: calc(100% / 3 - 8px); - min-height: 50px; - font-size: 12px; - padding: 6px 2px; - border-radius: 6px; - } - - .student-cell-name { - font-size: 12px; - } - - .student-cell-no { - font-size: 10px; - } - - .student-grid { - gap: 6px; - margin: 10px 0; - } - - .batch-bar { - padding: 10px 12px; - border-radius: 6px; - } - - .filter-bar { - padding: 10px; - border-radius: 6px; - gap: 8px; - } - - .filter-group input, - .filter-group select { - font-size: 16px; /* 防止 iOS 自动缩放 */ - padding: 10px 8px; - min-height: 40px; - } - - .attendance-toolbar { - flex-direction: column; - align-items: stretch; - gap: 8px; - } - - .attendance-toolbar .form-group { - width: 100%; - } - - .attendance-toolbar .form-group input, - .attendance-toolbar .form-group select { - font-size: 16px; - } - - .attendance-toolbar .status-group { - display: flex; - flex-wrap: wrap; - gap: 6px; - } - - .attendance-toolbar input[type="text"], - .attendance-toolbar input[type="number"] { - font-size: 16px; - width: 100% !important; - min-width: 0 !important; - } - - .status-select { - font-size: 16px; /* 防止 iOS 自动缩放 */ - padding: 8px; - min-height: 40px; - } - - .import-area { - padding: 16px; - } - - .preview-table { - max-height: 200px; - } - - .assignment-card { - margin-bottom: 12px; - } - - .assignment-title { - font-size: 14px; + width: calc(100% / 3 - 10px); } } diff --git a/frontend/assets/css/style.css b/frontend/assets/css/style.css index 9594b15..5fbd1f9 100644 --- a/frontend/assets/css/style.css +++ b/frontend/assets/css/style.css @@ -622,7 +622,7 @@ tr:hover { color: #667eea; } -/* ========== 响应式 — 平板 (≤768px) ========== */ +/* ========== 响应式 ========== */ @media (max-width: 768px) { .container { padding: 0 16px; @@ -644,18 +644,11 @@ tr:hover { .nav { padding: 0 16px; - -webkit-overflow-scrolling: touch; - scrollbar-width: none; - } - .nav::-webkit-scrollbar { - display: none; } .nav-item { padding: 10px 14px; font-size: 13px; - white-space: nowrap; - flex-shrink: 0; } .action-bar { @@ -670,252 +663,4 @@ tr:hover { .search-bar input { flex: 1; } - - .header { - padding: 10px 16px; - flex-wrap: wrap; - gap: 8px; - } - - .header h1 { - font-size: 16px; - } - - .login-container { - margin: 40px auto; - padding: 24px; - } - - .modal-content { - width: 92%; - max-height: 85vh; - } - - .table-wrapper { - -webkit-overflow-scrolling: touch; - } - - .stat-value { - font-size: 28px; - } - - .pagination a, .pagination span { - padding: 8px 10px; - min-height: 36px; - } - - .action-buttons { - width: 100%; - } -} - -/* ========== 响应式 — 手机 (≤480px) ========== */ -@media (max-width: 480px) { - body { - font-size: 13px; - } - - .header { - flex-direction: column; - align-items: flex-start; - padding: 8px 12px; - } - - .header-info { - width: 100%; - justify-content: space-between; - } - - .header h1 { - font-size: 15px; - margin-bottom: 4px; - } - - .user-name { - font-size: 13px; - } - - .btn-logout { - padding: 6px 12px; - font-size: 12px; - } - - .container { - padding: 0 10px; - margin: 12px auto; - } - - .card { - padding: 12px; - border-radius: 8px; - margin-bottom: 12px; - } - - .card-title { - font-size: 15px; - margin-bottom: 12px; - padding-bottom: 8px; - } - - .stats-grid { - grid-template-columns: repeat(2, 1fr); - gap: 8px; - } - - .stat-card { - padding: 12px 8px; - border-radius: 8px; - } - - .stat-value { - font-size: 24px; - margin: 6px 0; - } - - .stat-label { - font-size: 12px; - } - - .score-number { - font-size: 48px; - } - - /* 登录页 */ - .login-container { - margin: 20px 12px; - padding: 20px 16px; - border-radius: 12px; - max-width: 100%; - width: auto; - } - - .login-header h1 { - font-size: 20px; - } - - .login-header p { - font-size: 13px; - } - - .login-form input { - padding: 14px 12px; - font-size: 16px; /* 防止 iOS 自动缩放 */ - } - - .btn-login { - padding: 14px; - font-size: 16px; - } - - /* 导航 */ - .nav { - padding: 0 8px; - } - - .nav-item { - padding: 8px 12px; - font-size: 13px; - } - - /* 表格 */ - th, td { - padding: 6px 8px; - font-size: 12px; - } - - /* 模态框 */ - .modal-content { - width: 100%; - max-width: 100%; - border-radius: 12px 12px 0 0; - max-height: 90vh; - position: fixed; - bottom: 0; - left: 0; - } - - .modal { - align-items: flex-end; - } - - /* 表单 */ - .form-group input, - .form-group select, - .form-group textarea { - font-size: 16px; /* 防止 iOS 自动缩放 */ - padding: 10px 12px; - } - - /* 记录项 */ - .record-item { - flex-wrap: wrap; - gap: 4px; - padding: 10px 0; - } - - .record-reason { - margin: 0 8px; - flex: 1 1 100%; - order: 3; - font-size: 13px; - } - - .record-time { - font-size: 11px; - } - - /* 搜索栏 */ - .search-bar { - flex-direction: column; - gap: 8px; - } - - .search-bar input { - width: 100%; - } - - /* 分页 */ - .pagination { - gap: 4px; - flex-wrap: wrap; - } - - .pagination a, .pagination span { - padding: 6px 10px; - font-size: 12px; - } - - /* 底部 */ - .footer { - padding: 16px 12px; - } - - /* 状态标签 */ - .status-badge { - padding: 3px 8px; - font-size: 11px; - } - - /* Toast */ - .toast { - left: 12px; - right: 12px; - bottom: 12px; - transform: none; - font-size: 13px; - padding: 10px 16px; - border-radius: 8px; - animation: fadeInUpMobile 0.3s ease; - } - - @keyframes fadeInUpMobile { - from { - opacity: 0; - transform: translateY(20px); - } - to { - opacity: 1; - transform: translateY(0); - } - } } \ No newline at end of file diff --git a/frontend/includes/header.php b/frontend/includes/header.php index e773b29..8181285 100644 --- a/frontend/includes/header.php +++ b/frontend/includes/header.php @@ -23,8 +23,7 @@ $page_title = $page_title ?? '首页'; - - + <?php echo SITE_NAME; ?> - <?php echo $page_title; ?> diff --git a/frontend/index.php b/frontend/index.php index a81b40f..403c72f 100644 --- a/frontend/index.php +++ b/frontend/index.php @@ -26,8 +26,7 @@ if (isset($_SESSION['user_id']) && isset($_SESSION['user_type'])) { - - + <?php echo SITE_NAME; ?> - 登录