ikun520 commited on
Commit
1ce82f9
·
verified ·
1 Parent(s): 9f36564

Update templates/index.html

Browse files
Files changed (1) hide show
  1. 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: 2px;
182
  margin: 10px 20px;
183
  background-color: #fff;
184
  border-radius: 10px;
@@ -188,7 +189,7 @@
188
 
189
  /* 移动端适配 */
190
  @media (max-width: 768px) {
191
- body {
192
  font-size: 14px;
193
  padding: 5px;
194
  }
@@ -196,52 +197,86 @@
196
  font-size: 20px;
197
  margin: 15px 0;
198
  }
199
- .controls {
200
- flex-direction: column;
201
- padding: 10px;
202
- margin: 5px;
203
- }
204
- .controls select,
205
- .controls button {
206
- padding: 8px;
207
- font-size: 12px;
208
- margin: 5px;
209
- }
 
 
 
 
 
 
 
210
  .time-header {
211
- grid-template-columns: 50px repeat(7, 1fr);
212
- font-size: 10px;
213
- padding: 8px;
 
 
214
  }
215
  .schedule-container {
216
- grid-template-columns: 50px repeat(7, 1fr);
217
- margin: 5px;
 
 
 
 
 
 
 
 
218
  }
219
  .day {
220
  padding: 3px;
221
  border: 1px solid #ccc;
222
  border-radius: 5px;
223
  }
224
- /* .time-slot .course {
225
- font-size: 10px;
226
- padding: 10px;
227
- width: 85%;
228
- } */
229
- .time-slot .course {
230
- position: absolute;
231
- background-color: #a7d8de;
232
- color: #333;
233
- border-radius: 5px;
234
- padding: 25px;
235
- font-size: 10px;
236
- font-weight: bold;
237
- text-align: center;
238
- margin: 5px;
239
- width: 65%;
240
- /* height: 100%; */
241
- box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.1);
242
- transition: transform 0.3s ease, background-color 0.3s ease;
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