From f3829d4cb9acf277fe358c786bb454aba993a903 Mon Sep 17 00:00:00 2001 From: MKStoler1024 <158786854+MKStoler1024@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:58:18 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 7 +++++-- styles.css | 28 ++++++++++------------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/script.js b/script.js index 2b53277..663ea2d 100644 --- a/script.js +++ b/script.js @@ -23,7 +23,7 @@ document.addEventListener("DOMContentLoaded", () => { roomElem.textContent = room; function fetchData() { - fetch('exam_config.json', { cache: "no-store" }) // 不保留缓存 + return fetch('exam_config.json', { cache: "no-store" }) // 不保留缓存 .then(response => response.json()) .then(data => { displayExamInfo(data); @@ -37,7 +37,10 @@ document.addEventListener("DOMContentLoaded", () => { function displayExamInfo(data) { // Display exam name - examNameElem.textContent = data.examName; + const prefix = "考试安排"; + const currentText = examNameElem.textContent; + const newText = `${data.examName}`; + examNameElem.textContent = currentText.replace(/考试安排.*/, newText); // Display message messageElem.textContent = data.message; } diff --git a/styles.css b/styles.css index 4cd1d44..e24b128 100644 --- a/styles.css +++ b/styles.css @@ -4,10 +4,9 @@ body { padding: 0; background: url('/background.jpg') no-repeat center center fixed; background-size: cover; - background-color: #121212; animation: fadeIn 1s; color: #e0e0e0; - overflow: hidden; /* 隐藏滚动条 */ + overflow: hidden; } @keyframes fadeIn { @@ -15,16 +14,6 @@ body { to { opacity: 1; } } -/* 隐藏滚动条但允许滚动 */ -body::-webkit-scrollbar { - display: none; -} - -body { - -ms-overflow-style: none; /* IE 和 Edge */ - scrollbar-width: none; /* Firefox */ -} - #fullscreen-btn { position: absolute; top: 20px; @@ -38,6 +27,7 @@ body { border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); transition: background-color 0.3s ease, transform 0.3s ease; + z-index: 1001; } #settings-btn { @@ -53,6 +43,7 @@ body { border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); transition: background-color 0.3s ease, transform 0.3s ease; + z-index: 1001; } #settings-btn:hover { @@ -69,9 +60,10 @@ body { padding: 20px; max-width: 1400px; /* 增加主体部分宽度 */ margin: auto; - background-color: rgba(31, 31, 31, 0.8); /* 80% 透明度 */ + background-color: #1f1f1f; border-radius: 8px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); + opacity: 0.8; } h1 { @@ -93,7 +85,7 @@ h1 { #message { font-size: 1.5rem; - color: #bb86fc; + color: #e08e0e; margin-bottom: 20px; } @@ -115,7 +107,7 @@ h1 { font-weight: bold; text-align: center; margin-bottom: 20px; - color: #bb86fc; + color: #e08e0e; } #current-subject, #exam-timing, #remaining-time, #status { @@ -142,9 +134,9 @@ th, td { th { background-color: #333; - color: #bb86fc; + color: #ea8925; font-weight: bold; - border-bottom: 2px solid #bb86fc; + border-bottom: 2px solid #ea8925; } .exam-status-进行中 td { @@ -152,7 +144,7 @@ th { } .exam-status-即将开始 td { - color: white !important; /* 白色字体 */ + color: orange !important; /* 橙色字体 */ } .exam-status-已结束 td {