Update templates/index.html
Browse files- templates/index.html +73 -38
templates/index.html
CHANGED
|
@@ -169,6 +169,7 @@
|
|
| 169 |
width: 75%;
|
| 170 |
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
|
| 171 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
|
|
|
| 172 |
}
|
| 173 |
.time-slot .course:hover {
|
| 174 |
transform: scale(1.05);
|
|
@@ -178,7 +179,7 @@
|
|
| 178 |
.schedule-container {
|
| 179 |
display: grid;
|
| 180 |
grid-template-columns: 70px repeat(7, 1fr);
|
| 181 |
-
gap:
|
| 182 |
margin: 10px 20px;
|
| 183 |
background-color: #fff;
|
| 184 |
border-radius: 10px;
|
|
@@ -188,7 +189,7 @@
|
|
| 188 |
|
| 189 |
/* 移动端适配 */
|
| 190 |
@media (max-width: 768px) {
|
| 191 |
-
|
| 192 |
font-size: 14px;
|
| 193 |
padding: 5px;
|
| 194 |
}
|
|
@@ -196,52 +197,86 @@
|
|
| 196 |
font-size: 20px;
|
| 197 |
margin: 15px 0;
|
| 198 |
}
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
.time-header {
|
| 211 |
-
grid-template-columns:
|
| 212 |
-
font-size:
|
| 213 |
-
padding:
|
|
|
|
|
|
|
| 214 |
}
|
| 215 |
.schedule-container {
|
| 216 |
-
grid-template-columns:
|
| 217 |
-
margin:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
}
|
| 219 |
.day {
|
| 220 |
padding: 3px;
|
| 221 |
border: 1px solid #ccc;
|
| 222 |
border-radius: 5px;
|
| 223 |
}
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
|
|
|
| 244 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
</style>
|
| 246 |
</head>
|
| 247 |
|
|
|
|
| 169 |
width: 75%;
|
| 170 |
box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
|
| 171 |
transition: transform 0.3s ease, background-color 0.3s ease;
|
| 172 |
+
height: 50%;
|
| 173 |
}
|
| 174 |
.time-slot .course:hover {
|
| 175 |
transform: scale(1.05);
|
|
|
|
| 179 |
.schedule-container {
|
| 180 |
display: grid;
|
| 181 |
grid-template-columns: 70px repeat(7, 1fr);
|
| 182 |
+
gap: 1px;
|
| 183 |
margin: 10px 20px;
|
| 184 |
background-color: #fff;
|
| 185 |
border-radius: 10px;
|
|
|
|
| 189 |
|
| 190 |
/* 移动端适配 */
|
| 191 |
@media (max-width: 768px) {
|
| 192 |
+
body {
|
| 193 |
font-size: 14px;
|
| 194 |
padding: 5px;
|
| 195 |
}
|
|
|
|
| 197 |
font-size: 20px;
|
| 198 |
margin: 15px 0;
|
| 199 |
}
|
| 200 |
+
.controls {
|
| 201 |
+
display: flex;
|
| 202 |
+
flex-direction: row; /* 保持在一行内 */
|
| 203 |
+
flex-wrap: nowrap; /* 禁止换行 */
|
| 204 |
+
justify-content: space-around; /* 均匀分布各个控件 */
|
| 205 |
+
align-items: center; /* 纵向居中 */
|
| 206 |
+
padding: 10px 5px; /* 增加一些内边距,使其不显得太拥挤 */
|
| 207 |
+
margin: 5px;
|
| 208 |
+
gap: 5px; /* 控制组件之间的间距 */
|
| 209 |
+
}
|
| 210 |
+
.controls select,
|
| 211 |
+
.controls button {
|
| 212 |
+
padding: 6px; /* 适当减少内边距以适应小屏幕 */
|
| 213 |
+
font-size: 12px; /* 调整字体大小适应小屏幕 */
|
| 214 |
+
margin: 2px;
|
| 215 |
+
min-width: 80px; /* 设置最小宽度,确保控件在小屏幕上仍可点击 */
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
.time-header {
|
| 219 |
+
grid-template-columns: 25px repeat(7, 1fr);
|
| 220 |
+
font-size: 12px; /* 调整字体大小以适合移动端 */
|
| 221 |
+
padding: 12px 5px; /* 增加上下的内边距使其看起来更高 */
|
| 222 |
+
width: 95%;
|
| 223 |
+
margin: 10px 5px;
|
| 224 |
}
|
| 225 |
.schedule-container {
|
| 226 |
+
grid-template-columns: 22px repeat(7, minmax(0, 1fr));
|
| 227 |
+
margin: 3px;
|
| 228 |
+
display: grid;
|
| 229 |
+
gap: 1px;
|
| 230 |
+
|
| 231 |
+
background-color: #fff;
|
| 232 |
+
border-radius: 10px;
|
| 233 |
+
overflow: hidden;
|
| 234 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
|
| 235 |
+
|
| 236 |
}
|
| 237 |
.day {
|
| 238 |
padding: 3px;
|
| 239 |
border: 1px solid #ccc;
|
| 240 |
border-radius: 5px;
|
| 241 |
}
|
| 242 |
+
.time-column {
|
| 243 |
+
grid-column: 1;
|
| 244 |
+
text-align: center;
|
| 245 |
+
font-size: 15px;
|
| 246 |
+
display: flex;
|
| 247 |
+
flex-direction: column;
|
| 248 |
+
justify-content: center;
|
| 249 |
+
line-height: 1.2;
|
| 250 |
+
|
| 251 |
+
}
|
| 252 |
+
.time-slot .course {
|
| 253 |
+
font-size: 12px;
|
| 254 |
+
padding: 3px;
|
| 255 |
+
/*height: auto;*/
|
| 256 |
+
width: auto;
|
| 257 |
+
word-break: break-word; /* 确保长单词在小屏幕上也会换行 */
|
| 258 |
+
white-space: normal; /* 允许文本换行 */
|
| 259 |
+
overflow-wrap: break-word; /* 处理可能过长的文本,强制其换行 */
|
| 260 |
+
margin: 1px;
|
| 261 |
+
height: 90%;
|
| 262 |
+
}
|
| 263 |
}
|
| 264 |
+
/* .time-slot .course {*/
|
| 265 |
+
/* position: absolute;*/
|
| 266 |
+
/* background-color: #a7d8de;*/
|
| 267 |
+
/* color: #333;*/
|
| 268 |
+
/* border-radius: 5px;*/
|
| 269 |
+
/* padding: 25px;*/
|
| 270 |
+
/* font-size: 10px;*/
|
| 271 |
+
/* font-weight: bold;*/
|
| 272 |
+
/* text-align: center;*/
|
| 273 |
+
/* margin: 5px;*/
|
| 274 |
+
/* width: 65%;*/
|
| 275 |
+
/* !* height: 100%; *!*/
|
| 276 |
+
/* box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);*/
|
| 277 |
+
/* transition: transform 0.3s ease, background-color 0.3s ease;*/
|
| 278 |
+
/*}*/
|
| 279 |
+
|
| 280 |
</style>
|
| 281 |
</head>
|
| 282 |
|