+
显示前
% 的学生
diff --git a/frontend/assets/css/admin.css b/frontend/assets/css/admin.css
index 647063b..d4ec2ed 100644
--- a/frontend/assets/css/admin.css
+++ b/frontend/assets/css/admin.css
@@ -128,6 +128,13 @@
height: 18px;
cursor: pointer;
}
+/* 扣分类型按钮组 */
+.deduction-types {
+ display: flex;
+ gap: 8px;
+ flex-wrap: wrap;
+}
+
/* 考勤学生方格网格 */
.student-grid {
display: flex;
@@ -199,14 +206,155 @@
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 - 10px);
+ 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;
+ justify-content: space-between;
+ }
+
+ .attendance-toolbar .status-btn {
+ flex: 1 1 calc(33% - 6px);
+ min-width: 0;
+ text-align: center;
+ padding: 10px 8px;
+ }
+
+ .attendance-toolbar input[type="text"],
+ .attendance-toolbar input[type="number"] {
+ font-size: 16px;
+ width: 100% !important;
+ min-width: 0 !important;
+ }
+
+ .attendance-toolbar .btn {
+ width: 100%;
+ }
+
+ .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;
}
}
diff --git a/frontend/assets/css/style.css b/frontend/assets/css/style.css
index ca77119..24d91b5 100644
--- a/frontend/assets/css/style.css
+++ b/frontend/assets/css/style.css
@@ -622,45 +622,346 @@ tr:hover {
color: #667eea;
}
-/* ========== 响应式 ========== */
+/* ========== 触控友好 ========== */
+.btn,
+.btn-login,
+.btn-logout,
+.status-btn,
+.nav-item {
+ min-height: 44px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+}
+
+.form-group input,
+.form-group select,
+.form-group textarea {
+ min-height: 44px;
+}
+
+/* ========== 响应式 — 平板 (≤768px) ========== */
@media (max-width: 768px) {
.container {
padding: 0 16px;
}
-
+
.stats-grid {
grid-template-columns: repeat(2, 1fr);
gap: 12px;
}
-
+
th, td {
padding: 8px;
font-size: 12px;
}
-
+
.card {
padding: 16px;
}
-
+
.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 {
flex-direction: column;
align-items: stretch;
}
-
+
.search-bar {
width: 100%;
}
-
+
.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%;
+ }
+
+ .action-buttons .btn {
+ flex: 1;
+ min-width: 0;
+ }
+}
+
+/* ========== 响应式 — 手机 (≤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;
+ }
+
+ /* 按钮 */
+ .btn {
+ padding: 10px 14px;
+ font-size: 13px;
+ }
+
+ .btn-sm {
+ padding: 6px 10px;
+ font-size: 12px;
+ min-height: 36px;
+ }
+
+ /* 表单 */
+ .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%;
+ }
+
+ /* 操作栏 */
+ .action-buttons {
+ flex-wrap: wrap;
+ gap: 8px;
+ }
+
+ .action-buttons .btn {
+ flex: 1 1 calc(50% - 8px);
+ min-width: 0;
+ }
+
+ /* 分页 */
+ .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/assets/icons/icon-192.png b/frontend/assets/icons/icon-192.png
new file mode 100644
index 0000000..73680cc
Binary files /dev/null and b/frontend/assets/icons/icon-192.png differ
diff --git a/frontend/assets/icons/icon-512.png b/frontend/assets/icons/icon-512.png
new file mode 100644
index 0000000..c52fbde
Binary files /dev/null and b/frontend/assets/icons/icon-512.png differ
diff --git a/frontend/assets/icons/icon.svg b/frontend/assets/icons/icon.svg
new file mode 100644
index 0000000..12b2e42
--- /dev/null
+++ b/frontend/assets/icons/icon.svg
@@ -0,0 +1,11 @@
+
diff --git a/frontend/includes/header.php b/frontend/includes/header.php
index 8181285..79e5511 100644
--- a/frontend/includes/header.php
+++ b/frontend/includes/header.php
@@ -23,8 +23,10 @@ $page_title = $page_title ?? '首页';
-
+
+
-
+
diff --git a/frontend/index.php b/frontend/index.php
index 700f751..ebf9633 100644
--- a/frontend/index.php
+++ b/frontend/index.php
@@ -26,8 +26,10 @@ if (isset($_SESSION['user_id']) && isset($_SESSION['user_type'])) {
-
+
+
- 登录
+
@@ -133,5 +135,6 @@ if (isset($_SESSION['user_id']) && isset($_SESSION['user_type'])) {
}, 3000);
}
+
\ No newline at end of file