Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
aed5d68
1
Parent(s):
7d8fea8
Change settings
Browse files- src/views/LiveView.vue +36 -25
src/views/LiveView.vue
CHANGED
|
@@ -311,11 +311,13 @@ watchEffect(() => {
|
|
| 311 |
.empty { padding: 14px; border: 1px dashed #D6DAE1; border-radius: 12px; color: #6B7280; font-size: .92rem; }
|
| 312 |
|
| 313 |
/* 5 cards in a row */
|
|
|
|
| 314 |
.cards5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
|
| 315 |
-
@media (max-width:
|
| 316 |
-
@media (max-width:
|
|
|
|
| 317 |
|
| 318 |
-
/* card
|
| 319 |
.card {
|
| 320 |
display: grid;
|
| 321 |
grid-template-rows: auto auto auto; /* header, meta, footer */
|
|
@@ -325,45 +327,60 @@ watchEffect(() => {
|
|
| 325 |
border-radius: 14px;
|
| 326 |
background: #fff;
|
| 327 |
box-shadow: 0 1px 2px rgba(0,0,0,.04);
|
| 328 |
-
min-width: 0; /*
|
| 329 |
}
|
| 330 |
.card--bh { outline: 2px dashed rgba(15,23,42,.08); }
|
| 331 |
.card--winner { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
|
| 332 |
|
| 333 |
-
/*
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
.card__header {
|
| 335 |
display: grid;
|
| 336 |
-
grid-template-columns: 48px minmax(0,
|
|
|
|
| 337 |
align-items: center;
|
| 338 |
-
gap: 12px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
}
|
| 340 |
|
| 341 |
/* logo */
|
| 342 |
-
.card__logo {
|
| 343 |
-
|
| 344 |
-
background: #F3F4F6; display: grid; place-items: center;
|
| 345 |
-
overflow: hidden; position: relative; flex: 0 0 44px;
|
| 346 |
-
}
|
| 347 |
.card__logo img { width: 100%; height: 100%; object-fit: contain; }
|
| 348 |
.card__logo-fallback { width: 60%; height: 60%; border-radius: 999px; background: #E5E7EB; }
|
| 349 |
.card__badge { position: absolute; right: -6px; top: -6px; font-size: 16px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
|
| 350 |
|
| 351 |
/* title block */
|
| 352 |
-
.card__title-wrap { min-width: 0; display: grid; gap: 2px; }
|
| 353 |
.card__title {
|
| 354 |
-
font-weight: 800; color: #0F172A; line-height: 1.
|
| 355 |
-
|
|
|
|
|
|
|
|
|
|
| 356 |
}
|
| 357 |
.card__subtitle {
|
| 358 |
font-size: 12px; color: #5B6476; opacity: .85; line-height: 1.1;
|
|
|
|
| 359 |
}
|
| 360 |
|
| 361 |
-
/* balance (never wraps) */
|
| 362 |
.card__balance {
|
|
|
|
| 363 |
white-space: nowrap;
|
| 364 |
font-weight: 900; color: #0F172A;
|
| 365 |
-
font-size: clamp(18px,
|
| 366 |
-
|
| 367 |
}
|
| 368 |
|
| 369 |
/* meta row */
|
|
@@ -387,10 +404,4 @@ watchEffect(() => {
|
|
| 387 |
.pill.pos { background: #DCFCE7; color: #166534; }
|
| 388 |
.pill.neg { background: #FEE2E2; color: #B91C1C; }
|
| 389 |
.pill--neutral { background: #EEF2F7; color: #0F172A; }
|
| 390 |
-
.pill--outline {
|
| 391 |
-
background: transparent; color: #475569; border: 1px solid #E5E7EB; padding: 3px 8px;
|
| 392 |
-
}
|
| 393 |
-
|
| 394 |
-
/* utilities */
|
| 395 |
-
.ellipsize { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
| 396 |
-
</style>
|
|
|
|
| 311 |
.empty { padding: 14px; border: 1px dashed #D6DAE1; border-radius: 12px; color: #6B7280; font-size: .92rem; }
|
| 312 |
|
| 313 |
/* 5 cards in a row */
|
| 314 |
+
/* grid of 5 cards */
|
| 315 |
.cards5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
|
| 316 |
+
@media (max-width: 1280px) { .cards5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
|
| 317 |
+
@media (max-width: 960px) { .cards5 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
|
| 318 |
+
@media (max-width: 640px) { .cards5 { grid-template-columns: 1fr; } }
|
| 319 |
|
| 320 |
+
/* card shell */
|
| 321 |
.card {
|
| 322 |
display: grid;
|
| 323 |
grid-template-rows: auto auto auto; /* header, meta, footer */
|
|
|
|
| 327 |
border-radius: 14px;
|
| 328 |
background: #fff;
|
| 329 |
box-shadow: 0 1px 2px rgba(0,0,0,.04);
|
| 330 |
+
min-width: 0; /* allow truncation inside */
|
| 331 |
}
|
| 332 |
.card--bh { outline: 2px dashed rgba(15,23,42,.08); }
|
| 333 |
.card--winner { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.12); }
|
| 334 |
|
| 335 |
+
/* HEADER — responsive grid areas
|
| 336 |
+
wide: "logo title balance"
|
| 337 |
+
tight: "logo title balance"
|
| 338 |
+
"logo . balance"
|
| 339 |
+
*/
|
| 340 |
.card__header {
|
| 341 |
display: grid;
|
| 342 |
+
grid-template-columns: 48px minmax(0,1fr) auto;
|
| 343 |
+
grid-template-areas: "logo title balance";
|
| 344 |
align-items: center;
|
| 345 |
+
column-gap: 12px;
|
| 346 |
+
row-gap: 6px;
|
| 347 |
+
}
|
| 348 |
+
@media (max-width: 1200px) {
|
| 349 |
+
.card__header {
|
| 350 |
+
grid-template-areas:
|
| 351 |
+
"logo title balance"
|
| 352 |
+
"logo . balance"; /* balance gets its own row when tight */
|
| 353 |
+
}
|
| 354 |
}
|
| 355 |
|
| 356 |
/* logo */
|
| 357 |
+
.card__logo { grid-area: logo; width: 44px; height: 44px; border-radius: 999px; background: #F3F4F6;
|
| 358 |
+
display: grid; place-items: center; overflow: hidden; position: relative; }
|
|
|
|
|
|
|
|
|
|
| 359 |
.card__logo img { width: 100%; height: 100%; object-fit: contain; }
|
| 360 |
.card__logo-fallback { width: 60%; height: 60%; border-radius: 999px; background: #E5E7EB; }
|
| 361 |
.card__badge { position: absolute; right: -6px; top: -6px; font-size: 16px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
|
| 362 |
|
| 363 |
/* title block */
|
| 364 |
+
.card__title-wrap { grid-area: title; min-width: 0; display: grid; gap: 2px; }
|
| 365 |
.card__title {
|
| 366 |
+
font-weight: 800; color: #0F172A; line-height: 1.15;
|
| 367 |
+
/* two-line clamp to avoid 'Bu…' / 'Invest…' */
|
| 368 |
+
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
|
| 369 |
+
overflow: hidden;
|
| 370 |
+
font-size: clamp(16px, 1.6vw, 19px);
|
| 371 |
}
|
| 372 |
.card__subtitle {
|
| 373 |
font-size: 12px; color: #5B6476; opacity: .85; line-height: 1.1;
|
| 374 |
+
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
| 375 |
}
|
| 376 |
|
| 377 |
+
/* balance (never wraps; can move to its own row on tight cards) */
|
| 378 |
.card__balance {
|
| 379 |
+
grid-area: balance;
|
| 380 |
white-space: nowrap;
|
| 381 |
font-weight: 900; color: #0F172A;
|
| 382 |
+
font-size: clamp(18px, 1.9vw, 22px);
|
| 383 |
+
align-self: start;
|
| 384 |
}
|
| 385 |
|
| 386 |
/* meta row */
|
|
|
|
| 404 |
.pill.pos { background: #DCFCE7; color: #166534; }
|
| 405 |
.pill.neg { background: #FEE2E2; color: #B91C1C; }
|
| 406 |
.pill--neutral { background: #EEF2F7; color: #0F172A; }
|
| 407 |
+
.pill--outline { background: transparent; color: #475569; border: 1px solid #E5E7EB; padding: 3px 8px; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|