chore: 更改

This commit is contained in:
MKStoler1024 2025-01-14 23:58:18 +00:00
parent 8a1be41e48
commit f3829d4cb9
2 changed files with 15 additions and 20 deletions

View File

@ -23,7 +23,7 @@ document.addEventListener("DOMContentLoaded", () => {
roomElem.textContent = room; roomElem.textContent = room;
function fetchData() { function fetchData() {
fetch('exam_config.json', { cache: "no-store" }) // 不保留缓存 return fetch('exam_config.json', { cache: "no-store" }) // 不保留缓存
.then(response => response.json()) .then(response => response.json())
.then(data => { .then(data => {
displayExamInfo(data); displayExamInfo(data);
@ -37,7 +37,10 @@ document.addEventListener("DOMContentLoaded", () => {
function displayExamInfo(data) { function displayExamInfo(data) {
// Display exam name // Display exam name
examNameElem.textContent = data.examName; const prefix = "考试安排";
const currentText = examNameElem.textContent;
const newText = `${data.examName}`;
examNameElem.textContent = currentText.replace(/考试安排.*/, newText);
// Display message // Display message
messageElem.textContent = data.message; messageElem.textContent = data.message;
} }

View File

@ -4,10 +4,9 @@ body {
padding: 0; padding: 0;
background: url('/background.jpg') no-repeat center center fixed; background: url('/background.jpg') no-repeat center center fixed;
background-size: cover; background-size: cover;
background-color: #121212;
animation: fadeIn 1s; animation: fadeIn 1s;
color: #e0e0e0; color: #e0e0e0;
overflow: hidden; /* 隐藏滚动条 */ overflow: hidden;
} }
@keyframes fadeIn { @keyframes fadeIn {
@ -15,16 +14,6 @@ body {
to { opacity: 1; } to { opacity: 1; }
} }
/* 隐藏滚动条但允许滚动 */
body::-webkit-scrollbar {
display: none;
}
body {
-ms-overflow-style: none; /* IE 和 Edge */
scrollbar-width: none; /* Firefox */
}
#fullscreen-btn { #fullscreen-btn {
position: absolute; position: absolute;
top: 20px; top: 20px;
@ -38,6 +27,7 @@ body {
border-radius: 5px; border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s ease, transform 0.3s ease; transition: background-color 0.3s ease, transform 0.3s ease;
z-index: 1001;
} }
#settings-btn { #settings-btn {
@ -53,6 +43,7 @@ body {
border-radius: 5px; border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s ease, transform 0.3s ease; transition: background-color 0.3s ease, transform 0.3s ease;
z-index: 1001;
} }
#settings-btn:hover { #settings-btn:hover {
@ -69,9 +60,10 @@ body {
padding: 20px; padding: 20px;
max-width: 1400px; /* 增加主体部分宽度 */ max-width: 1400px; /* 增加主体部分宽度 */
margin: auto; margin: auto;
background-color: rgba(31, 31, 31, 0.8); /* 80% 透明度 */ background-color: #1f1f1f;
border-radius: 8px; border-radius: 8px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
opacity: 0.8;
} }
h1 { h1 {
@ -93,7 +85,7 @@ h1 {
#message { #message {
font-size: 1.5rem; font-size: 1.5rem;
color: #bb86fc; color: #e08e0e;
margin-bottom: 20px; margin-bottom: 20px;
} }
@ -115,7 +107,7 @@ h1 {
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
margin-bottom: 20px; margin-bottom: 20px;
color: #bb86fc; color: #e08e0e;
} }
#current-subject, #exam-timing, #remaining-time, #status { #current-subject, #exam-timing, #remaining-time, #status {
@ -142,9 +134,9 @@ th, td {
th { th {
background-color: #333; background-color: #333;
color: #bb86fc; color: #ea8925;
font-weight: bold; font-weight: bold;
border-bottom: 2px solid #bb86fc; border-bottom: 2px solid #ea8925;
} }
.exam-status-进行中 td { .exam-status-进行中 td {
@ -152,7 +144,7 @@ th {
} }
.exam-status-即将开始 td { .exam-status-即将开始 td {
color: white !important; /* 白色字体 */ color: orange !important; /* 橙色字体 */
} }
.exam-status-已结束 td { .exam-status-已结束 td {