zhao/课程表.html
2022-09-04 19:36:05 +08:00

201 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>课程表 | 赵家小站</title>
<link rel="stylesheet" href="/style/zhao.css">
<style>
header {
text-align: right;
}
th {
background-color: #eef;
}
table {
margin: 1rem auto;
}
.date {
font-size: 2em;
}
</style>
</head>
<body>
<header>
<a class="button" href="/">返回首页</a>
</header>
<section class="课程表">
<img src="images/ryan.png" height="80px">
<span class="date">今天是<span id="weekday1"></span></span>
<table>
<thead>
<tr>
<th>三(8)</th>
<th>周一</th>
<th>周二</th>
<th>周三</th>
<th>周四</th>
<th>周五</th>
</tr>
</thead>
<tbody>
<tr>
<td>第1节</td>
<td>数学</td>
<td>语文</td>
<td>研学</td>
<td>数学</td>
<td>语文</td>
</tr>
<tr>
<td>第2节</td>
<td>语文</td>
<td>数学</td>
<td>语文</td>
<td>语文</td>
<td>数学</td>
</tr>
<tr>
<td>第3节</td>
<td>语文</td>
<td>体育</td>
<td>科学</td>
<td>音乐</td>
<td>美术</td>
</tr>
<tr>
<td>第4节</td>
<td>音乐</td>
<td>综实</td>
<td>科学</td>
<td>语文</td>
<td>劳动</td>
</tr>
<tr>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
</tr>
<tr>
<td>第5节</td>
<td>英语</td>
<td>英语</td>
<td>德法</td>
<td>体育</td>
<td>叮当</td>
</tr>
<tr>
<td>第6节</td>
<td>班会</td>
<td>信息</td>
<td>美术</td>
<td>德法</td>
<td>体育</td>
</tr>
</tbody>
</table>
</section>
<section class="课程表">
<header>
<span class="date">明天是周<span id="weekday2"></span></span>
<img src="images/little_cat.png" height="80px">
</header>
<table>
<thead>
<tr>
<th>五(14)</th>
<th>周一</th>
<th>周二</th>
<th>周三</th>
<th>周四</th>
<th>周五</th>
</tr>
</thead>
<tbody>
<tr>
<td>第1节</td>
<td>语文</td>
<td>语文</td>
<td>研学</td>
<td>数学</td>
<td>语文</td>
</tr>
<tr>
<td>第2节</td>
<td>数学</td>
<td>数学</td>
<td>语文</td>
<td>美术</td>
<td>数学</td>
</tr>
<tr>
<td>第3节</td>
<td>体育</td>
<td>英语</td>
<td>科学</td>
<td>语文</td>
<td>德法</td>
</tr>
<tr>
<td>第4节</td>
<td>英语</td>
<td>体育</td>
<td>科学</td>
<td>语文</td>
<td>数学</td>
</tr>
<tr>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
<td>🍚🥢</td>
</tr>
<tr>
<td>第5节</td>
<td>德法</td>
<td>美术</td>
<td>综实</td>
<td>体育</td>
<td>信息</td>
</tr>
<tr>
<td>第6节</td>
<td>班会</td>
<td>音乐</td>
<td>英语</td>
<td>劳动</td>
<td>音乐</td>
</tr>
</tbody>
</table>
</section>
<script>
const now = new Date()
const tomorrow = now.getDay() + 1
const day = "日一二三四五六"[tomorrow]
const date = `${now.getFullYear()}${now.getMonth() + 1}${now.getDate()}`
document.getElementById("weekday1").innerText = date
document.getElementById("weekday2").innerText = day
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.fontWeight = 900
})
</script>
</body>
</html>