diff --git a/课程表.html b/课程表.html
index 299fa96..6914d1e 100644
--- a/课程表.html
+++ b/课程表.html
@@ -16,6 +16,10 @@
background-color: #eef;
}
+ td {
+ font-weight: 900;
+ }
+
table {
margin: 1rem auto;
}
@@ -188,10 +192,61 @@
const date = `${now.getFullYear()}年${now.getMonth() + 1}月${now.getDate()}日`
document.getElementById("weekday1").innerText = date
document.getElementById("weekday2").innerText = day
+ for (const td of document.querySelectorAll('td')) {
+ switch (td.innerText) {
+ case '数学':
+ td.style.backgroundColor = 'rgba(127, 255, 127, 0.4)'
+ break
+ case '研学':
+ td.style.backgroundColor = 'rgba(127, 255, 127, 0.4)'
+ break
+ case '语文':
+ td.style.backgroundColor = 'rgba(255, 127, 127, 0.4)'
+ break
+ case '班会':
+ td.style.backgroundColor = 'rgba(255, 127, 127, 0.4)'
+ break
+ case '英语':
+ td.style.backgroundColor = 'rgba(255, 255, 127, 0.4)'
+ break
+ case '叮当':
+ td.style.backgroundColor = 'rgba(255, 255, 127, 0.4)'
+ break
+ case '体育':
+ td.style.backgroundColor = 'rgba(127, 127, 255, 0.4)'
+ break
+ case '科学':
+ td.style.backgroundColor = 'rgba(255, 192, 127, 0.4)'
+ break
+ case '劳动':
+ td.style.backgroundColor = 'rgba(255, 192, 127, 0.4)'
+ break
+ case '美术':
+ td.style.backgroundColor = 'rgba(255, 192, 255, 0.4)'
+ break
+ case '德法':
+ td.style.backgroundColor = 'rgba(192, 127, 127, 0.4)'
+ break
+ case '音乐':
+ td.style.backgroundColor = 'rgba(127, 255, 255, 0.4)'
+ break
+ case '信息':
+ td.style.backgroundColor = 'gold'
+ break
+ case '综实':
+ td.style.backgroundColor = 'lightgreen'
+ break
+ case '🍚🥢':
+ td.style.backgroundColor = '#eef'
+ break
+ default:
+ break
+ }
+ }
if (tomorrow > 0 && tomorrow < 6)
document.querySelectorAll(`tr td:nth-child(${tomorrow + 1})`).forEach(cell => {
- cell.style.color = "#ff7"
- cell.style.background = "#66d"
+ cell.style.color = 'blue'
+ cell.style.textShadow = '0 0 2px skyblue'
cell.style.fontWeight = 900
})