update
This commit is contained in:
parent
325c40c087
commit
5d43da99f0
59
课程表.html
59
课程表.html
@ -16,6 +16,10 @@
|
|||||||
background-color: #eef;
|
background-color: #eef;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
margin: 1rem auto;
|
margin: 1rem auto;
|
||||||
}
|
}
|
||||||
@ -188,10 +192,61 @@
|
|||||||
const date = `${now.getFullYear()}年${now.getMonth() + 1}月${now.getDate()}日`
|
const date = `${now.getFullYear()}年${now.getMonth() + 1}月${now.getDate()}日`
|
||||||
document.getElementById("weekday1").innerText = date
|
document.getElementById("weekday1").innerText = date
|
||||||
document.getElementById("weekday2").innerText = day
|
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)
|
if (tomorrow > 0 && tomorrow < 6)
|
||||||
document.querySelectorAll(`tr td:nth-child(${tomorrow + 1})`).forEach(cell => {
|
document.querySelectorAll(`tr td:nth-child(${tomorrow + 1})`).forEach(cell => {
|
||||||
cell.style.color = "#ff7"
|
cell.style.color = 'blue'
|
||||||
cell.style.background = "#66d"
|
cell.style.textShadow = '0 0 2px skyblue'
|
||||||
cell.style.fontWeight = 900
|
cell.style.fontWeight = 900
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user