mirror of
https://github.com/ExamAware/ExamSchedule.git
synced 2025-04-29 19:16:33 +00:00
feat: 更新考试信息提醒逻辑,优化样式以适应不同屏幕宽度
This commit is contained in:
parent
27a7a760ad
commit
55fecdf88b
@ -67,7 +67,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
let currentExam = null;
|
||||
let nextExam = null;
|
||||
let lastExam = null;
|
||||
let isnotificated = false;
|
||||
|
||||
data.examInfos.forEach(exam => {
|
||||
const start = new Date(exam.start);
|
||||
@ -99,15 +98,15 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
remainingTimeElem.style.fontWeight = "bold";
|
||||
statusElem.textContent = "状态: 即将结束";
|
||||
statusElem.style.color = "red";
|
||||
|
||||
|
||||
// 在剩余15分钟时显示提醒
|
||||
if (isnotificated === false) {
|
||||
if (isnotificated === false && remainingMinutes === 14 && remainingSeconds === 59) {
|
||||
isnotificated = true;
|
||||
const overlay = document.getElementById('reminder-overlay');
|
||||
overlay.classList.add('show');
|
||||
setTimeout(() => {
|
||||
overlay.classList.remove('show');
|
||||
}, 5000);
|
||||
isnotificated = true;
|
||||
}
|
||||
} else {
|
||||
remainingTimeElem.textContent = `剩余时间: ${remainingTimeText}`;
|
||||
|
@ -42,10 +42,9 @@ body::-webkit-scrollbar {
|
||||
|
||||
.container {
|
||||
padding: 24px;
|
||||
max-width: 1400px;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
background-color: #333333;
|
||||
border-radius: 28px;
|
||||
background-color: #1f1f1f;
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
@ -94,9 +93,9 @@ h1 {
|
||||
}
|
||||
|
||||
.clock-section, .info-section, .right-column {
|
||||
background-color: #404040;
|
||||
background-color: #292929;
|
||||
padding: 24px;
|
||||
border-radius: 28px;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.2);
|
||||
}
|
||||
|
||||
@ -120,8 +119,8 @@ table {
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
margin-top: 24px;
|
||||
background-color: #4A4A4A;
|
||||
border-radius: 16px;
|
||||
background-color: #292929;
|
||||
border-radius: 14px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
@ -145,7 +144,7 @@ tr:hover {
|
||||
.exam-status-tag {
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 1.2rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
@ -42,10 +42,9 @@ body::-webkit-scrollbar {
|
||||
|
||||
.container {
|
||||
padding: 24px;
|
||||
max-width: 1400px;
|
||||
max-width: 100%;
|
||||
margin: auto;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 28px;
|
||||
box-shadow: 0 4px 8px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
@ -129,11 +128,11 @@ th, td {
|
||||
padding: 1px;
|
||||
font-size: 1.8rem;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #E8DEF8;
|
||||
border-bottom: 1px solid #ffffff;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #E8DEF8;
|
||||
background-color: #ffffff;
|
||||
color: #1C1B1F;
|
||||
font-weight: 500;
|
||||
}
|
||||
@ -145,7 +144,7 @@ tr:hover {
|
||||
.exam-status-tag {
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 1.2rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user