i0110 commited on
Commit
f627d8c
·
verified ·
1 Parent(s): cdd61b3

Update public/index.html

Browse files
Files changed (1) hide show
  1. public/index.html +73 -19
public/index.html CHANGED
@@ -53,13 +53,13 @@
53
  max-width: 1400px;
54
  margin: 0 auto;
55
  animation: fadeIn 0.5s ease;
56
- padding: 0 20px;
57
  }
58
  .overview {
59
  background: var(--card-background);
60
  border-radius: 15px;
61
- padding: 25px;
62
- margin-bottom: 30px;
63
  border: 1px solid var(--card-border);
64
  transition: background 0.3s ease, border 0.3s ease;
65
  }
@@ -68,14 +68,14 @@
68
  display: flex;
69
  align-items: center;
70
  gap: 10px;
71
- margin-bottom: 20px;
72
  color: var(--text-color);
73
  }
74
  .theme-toggle {
75
  display: flex;
76
  align-items: center;
77
  gap: 10px;
78
- margin-bottom: 20px;
79
  font-size: 14px;
80
  color: var(--secondary-text);
81
  }
@@ -105,25 +105,28 @@
105
  #summary {
106
  display: grid;
107
  grid-template-columns: repeat(6, 1fr);
108
- gap: 15px;
109
  }
110
  #summary div {
111
  background: var(--metric-background);
112
- padding: 15px;
113
  border-radius: 8px;
114
  border: 1px solid var(--metric-border);
115
  transition: background 0.3s ease, border 0.3s ease;
116
  }
117
  #summary div {
118
- font-size: 14px;
119
  color: var(--secondary-text);
120
  }
121
  #summary span {
122
  display: block;
123
- font-size: 24px;
124
  font-weight: bold;
125
  margin-top: 5px;
126
  color: var(--text-color);
 
 
 
127
  }
128
  .stats-container {
129
  display: grid;
@@ -164,7 +167,9 @@
164
  padding: 15px;
165
  border: 1px solid var(--metric-border);
166
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border 0.3s ease;
167
- height: auto;
 
 
168
  }
169
  .server-card:hover {
170
  transform: translateY(-2px);
@@ -180,12 +185,21 @@
180
  .server-name {
181
  display: flex;
182
  align-items: center;
183
- gap: 10px;
 
 
 
 
 
 
 
 
184
  }
185
  .server-flag {
186
  width: 20px;
187
  height: 20px;
188
  border-radius: 4px;
 
189
  }
190
  .metric-grid {
191
  display: grid;
@@ -199,6 +213,7 @@
199
  border-radius: 6px;
200
  border: 1px solid var(--metric-border);
201
  transition: background 0.3s ease;
 
202
  }
203
  .metric-item:hover {
204
  background: var(--metric-hover);
@@ -207,10 +222,15 @@
207
  color: var(--label-color);
208
  font-size: 12px;
209
  margin-bottom: 3px;
 
210
  }
211
  .metric-value {
212
  font-size: 14px;
213
  font-weight: 500;
 
 
 
 
214
  }
215
  .status-dot {
216
  display: inline-block;
@@ -218,6 +238,7 @@
218
  animation: pulse 2s infinite;
219
  width: 10px;
220
  height: 10px;
 
221
  }
222
  .status-online {
223
  background-color: #4CAF50;
@@ -273,13 +294,39 @@
273
  }
274
  @media (max-width: 768px) {
275
  #summary {
276
- grid-template-columns: 1fr;
 
 
 
 
 
 
 
277
  }
278
  .user-servers {
279
- grid-template-columns: 1fr;
280
  }
281
  .metric-grid {
282
- grid-template-columns: 1fr 1fr;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
  }
285
  .login-overlay, .confirm-overlay, .loading-overlay {
@@ -352,7 +399,7 @@
352
  display: flex;
353
  justify-content: space-between;
354
  align-items: center;
355
- margin-bottom: 20px;
356
  }
357
  .auth-buttons {
358
  display: flex;
@@ -377,10 +424,10 @@
377
  border: 1px solid var(--card-border);
378
  border-radius: 10px;
379
  padding: 15px;
380
- margin-bottom: 25px;
381
  display: flex;
382
  flex-wrap: wrap;
383
- gap: 20px;
384
  align-items: center;
385
  transition: background 0.3s ease, border 0.3s ease;
386
  }
@@ -390,7 +437,7 @@
390
  gap: 10px;
391
  font-size: 14px;
392
  color: var(--text-color);
393
- min-width: 220px; /* 确保控件有足够的宽度 */
394
  }
395
  .filter-sort-group label {
396
  white-space: nowrap;
@@ -453,7 +500,8 @@
453
  min-width: 100%; /* 小屏时控件占满一行 */
454
  }
455
  .filter-sort-panel {
456
- gap: 15px; /* 小屏时减少间距 */
 
457
  }
458
  }
459
  /* 图表相关样式 */
@@ -477,6 +525,7 @@
477
  font-size: 13px;
478
  transition: background 0.2s ease;
479
  margin-left: auto;
 
480
  }
481
  .chart-toggle-button:hover {
482
  background: var(--action-button-hover);
@@ -488,6 +537,11 @@
488
  width: 100% !important;
489
  height: auto !important;
490
  }
 
 
 
 
 
491
  </style>
492
  </head>
493
  <body>
 
53
  max-width: 1400px;
54
  margin: 0 auto;
55
  animation: fadeIn 0.5s ease;
56
+ padding: 0 15px;
57
  }
58
  .overview {
59
  background: var(--card-background);
60
  border-radius: 15px;
61
+ padding: 20px;
62
+ margin-bottom: 25px;
63
  border: 1px solid var(--card-border);
64
  transition: background 0.3s ease, border 0.3s ease;
65
  }
 
68
  display: flex;
69
  align-items: center;
70
  gap: 10px;
71
+ margin-bottom: 15px;
72
  color: var(--text-color);
73
  }
74
  .theme-toggle {
75
  display: flex;
76
  align-items: center;
77
  gap: 10px;
78
+ margin-bottom: 15px;
79
  font-size: 14px;
80
  color: var(--secondary-text);
81
  }
 
105
  #summary {
106
  display: grid;
107
  grid-template-columns: repeat(6, 1fr);
108
+ gap: 12px;
109
  }
110
  #summary div {
111
  background: var(--metric-background);
112
+ padding: 12px;
113
  border-radius: 8px;
114
  border: 1px solid var(--metric-border);
115
  transition: background 0.3s ease, border 0.3s ease;
116
  }
117
  #summary div {
118
+ font-size: 13px;
119
  color: var(--secondary-text);
120
  }
121
  #summary span {
122
  display: block;
123
+ font-size: 22px;
124
  font-weight: bold;
125
  margin-top: 5px;
126
  color: var(--text-color);
127
+ overflow: hidden;
128
+ text-overflow: ellipsis;
129
+ white-space: nowrap;
130
  }
131
  .stats-container {
132
  display: grid;
 
167
  padding: 15px;
168
  border: 1px solid var(--metric-border);
169
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, border 0.3s ease;
170
+ min-height: 180px; /* 固定最小高度,避免内容变化导致抖动 */
171
+ display: flex;
172
+ flex-direction: column;
173
  }
174
  .server-card:hover {
175
  transform: translateY(-2px);
 
185
  .server-name {
186
  display: flex;
187
  align-items: center;
188
+ gap: 8px;
189
+ flex: 1;
190
+ min-width: 0; /* 防止内容溢出 */
191
+ }
192
+ .server-name div {
193
+ overflow: hidden;
194
+ text-overflow: ellipsis;
195
+ white-space: nowrap;
196
+ max-width: 100%; /* 限制名称的最大宽度 */
197
  }
198
  .server-flag {
199
  width: 20px;
200
  height: 20px;
201
  border-radius: 4px;
202
+ flex-shrink: 0;
203
  }
204
  .metric-grid {
205
  display: grid;
 
213
  border-radius: 6px;
214
  border: 1px solid var(--metric-border);
215
  transition: background 0.3s ease;
216
+ overflow: hidden; /* 防止内容溢出 */
217
  }
218
  .metric-item:hover {
219
  background: var(--metric-hover);
 
222
  color: var(--label-color);
223
  font-size: 12px;
224
  margin-bottom: 3px;
225
+ white-space: nowrap;
226
  }
227
  .metric-value {
228
  font-size: 14px;
229
  font-weight: 500;
230
+ overflow: hidden;
231
+ text-overflow: ellipsis;
232
+ white-space: nowrap;
233
+ max-width: 100%; /* 限制指标值的宽度 */
234
  }
235
  .status-dot {
236
  display: inline-block;
 
238
  animation: pulse 2s infinite;
239
  width: 10px;
240
  height: 10px;
241
+ flex-shrink: 0;
242
  }
243
  .status-online {
244
  background-color: #4CAF50;
 
294
  }
295
  @media (max-width: 768px) {
296
  #summary {
297
+ grid-template-columns: 1fr; /* 小屏幕单列显示 */
298
+ gap: 10px;
299
+ }
300
+ #summary div {
301
+ padding: 10px;
302
+ }
303
+ #summary span {
304
+ font-size: 20px; /* 小屏幕字体略小 */
305
  }
306
  .user-servers {
307
+ grid-template-columns: 1fr; /* 小屏幕单列显示实例卡片 */
308
  }
309
  .metric-grid {
310
+ grid-template-columns: repeat(2, 1fr); /* 小屏幕指标网格改为2列 */
311
+ gap: 8px;
312
+ }
313
+ .metric-item {
314
+ padding: 6px;
315
+ }
316
+ .metric-value {
317
+ font-size: 13px; /* 小屏幕字体略小 */
318
+ }
319
+ .server-header {
320
+ flex-direction: row;
321
+ flex-wrap: wrap;
322
+ gap: 8px; /* 小屏幕避免标题和按钮过于紧密 */
323
+ }
324
+ .container {
325
+ padding: 0 10px; /* 小屏幕减少整体边距 */
326
+ }
327
+ .overview {
328
+ padding: 15px;
329
+ margin-bottom: 20px;
330
  }
331
  }
332
  .login-overlay, .confirm-overlay, .loading-overlay {
 
399
  display: flex;
400
  justify-content: space-between;
401
  align-items: center;
402
+ margin-bottom: 15px;
403
  }
404
  .auth-buttons {
405
  display: flex;
 
424
  border: 1px solid var(--card-border);
425
  border-radius: 10px;
426
  padding: 15px;
427
+ margin-bottom: 20px;
428
  display: flex;
429
  flex-wrap: wrap;
430
+ gap: 15px;
431
  align-items: center;
432
  transition: background 0.3s ease, border 0.3s ease;
433
  }
 
437
  gap: 10px;
438
  font-size: 14px;
439
  color: var(--text-color);
440
+ min-width: 200px; /* 确保控件有足够的宽度 */
441
  }
442
  .filter-sort-group label {
443
  white-space: nowrap;
 
500
  min-width: 100%; /* 小屏时控件占满一行 */
501
  }
502
  .filter-sort-panel {
503
+ gap: 12px; /* 小屏时减少间距 */
504
+ padding: 12px;
505
  }
506
  }
507
  /* 图表相关样式 */
 
525
  font-size: 13px;
526
  transition: background 0.2s ease;
527
  margin-left: auto;
528
+ white-space: nowrap;
529
  }
530
  .chart-toggle-button:hover {
531
  background: var(--action-button-hover);
 
537
  width: 100% !important;
538
  height: auto !important;
539
  }
540
+ @media (max-width: 768px) {
541
+ .chart-container {
542
+ height: 250px; /* 小屏幕图表高度略减 */
543
+ }
544
+ }
545
  </style>
546
  </head>
547
  <body>