Rebuild the web UI on Bootstrap 5 with the dark felt theme
CI / Build and push docker image (push) Failing after 39s

The lobby was hand-rolled CSS and looked plain. Vendor Bootstrap 5.3
(MIT) under web/vendor so builds stay offline, load it in dark mode and
bridge the felt/gold palette onto Bootstrap's CSS variables in a new
theme.css; style.css now only owns the game table, cards and scoring
summary.

Rebuild the lobby, waiting room and shared chrome with Bootstrap
components: a shared navbar, creation form as cards with schema-driven
controls, roster as a list group with seat/team badges, a seats progress
bar and a copy-to-clipboard button on the join code. History,
leaderboard, connection/error states and the 404 page use cards, tables
and buttons too; the play table itself is unchanged.

The copy feedback timer is cancelled when the waiting room is rebuilt by
another player joining, fixing a disposed-signal panic that froze the
page mid-match.
This commit is contained in:
2026-09-21 23:40:44 +08:00
parent ed8a004ec8
commit 12fa3f5aae
15 changed files with 774 additions and 486 deletions
+5 -191
View File
@@ -1,17 +1,7 @@
/* Scopone scientifico frontend — dark table-felt theme. */
:root {
--felt: #1d5c38;
--felt-dark: #14341f;
--panel: #223026;
--panel-light: #2e4234;
--text: #f1f0e8;
--muted: #a9b7ab;
--accent: #e8c547;
--danger: #d9534f;
--team-a: #7db4e8;
--team-b: #e8967d;
}
/* Scopone scientifico frontend — game table, cards and scoring summary.
*
* The felt palette and the Bootstrap theme overrides live in theme.css,
* which is loaded before this file. */
* {
box-sizing: border-box;
@@ -20,8 +10,6 @@
body {
margin: 0;
font-family: "Segoe UI", system-ui, sans-serif;
background: var(--felt-dark);
color: var(--text);
}
.app {
@@ -32,65 +20,7 @@ body {
/* ---------- shared chrome ---------- */
.top-nav {
display: flex;
gap: 1rem;
align-items: center;
padding: 0.75rem 1rem;
background: rgba(0, 0, 0, 0.25);
}
.top-nav a {
color: var(--accent);
text-decoration: none;
}
.whoami {
margin-right: auto;
}
.whoami .rating {
color: var(--muted, #888);
}
.panel {
background: var(--panel);
border-radius: 12px;
padding: 1.25rem 1.5rem;
margin: 1rem;
}
.button {
display: inline-block;
background: var(--panel-light);
color: var(--text);
border: 1px solid #4c6a54;
border-radius: 8px;
padding: 0.55rem 1.1rem;
margin: 0.25rem 0.25rem 0.25rem 0;
cursor: pointer;
font-size: 1rem;
text-decoration: none;
}
.button.primary {
background: var(--accent);
border-color: var(--accent);
color: #1d1d1d;
font-weight: 600;
}
.button:hover {
filter: brightness(1.15);
}
.status {
color: var(--muted);
text-align: center;
margin: 2rem;
}
.toast {
.app-toast {
position: fixed;
top: 1rem;
left: 50%;
@@ -103,96 +33,6 @@ body {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
/* ---------- lobby / pages ---------- */
.lobby h1,
.page h1 {
text-align: center;
margin-top: 2rem;
}
.lobby-grid,
.page {
max-width: 720px;
margin: 0 auto;
width: 100%;
}
.login-panel {
text-align: center;
}
.target-buttons {
display: flex;
gap: 0.5rem;
}
.check {
display: flex;
align-items: center;
gap: 0.4rem;
}
.join-form {
display: flex;
gap: 0.5rem;
}
.join-form input {
flex: 1;
font-size: 1.2rem;
text-transform: uppercase;
letter-spacing: 0.3em;
padding: 0.5rem;
border-radius: 8px;
border: 1px solid #4c6a54;
background: var(--panel-light);
color: var(--text);
}
.join-code {
font-size: 2.4rem;
font-weight: 700;
letter-spacing: 0.35em;
color: var(--accent);
text-align: center;
margin: 0.5rem 0;
}
.status-panel {
max-width: 520px;
margin: 3rem auto;
text-align: center;
}
.roster {
list-style: none;
padding: 0;
text-align: center;
}
table.matches {
width: 100%;
border-collapse: collapse;
margin: 1rem;
}
table.matches th,
table.matches td {
padding: 0.5rem 0.75rem;
text-align: left;
border-bottom: 1px solid #3c5543;
}
table.matches td.won {
color: #8bc34a;
font-weight: 600;
}
table.matches td.lost {
color: var(--muted);
}
/* ---------- game table ---------- */
.hud {
@@ -396,11 +236,6 @@ table.matches td.lost {
transform: translateY(-10px);
}
.hint {
color: var(--muted);
font-size: 0.85rem;
}
/* ---------- move banner ---------- */
.move-banner {
@@ -422,27 +257,6 @@ table.matches td.lost {
margin-left: 0.25rem;
}
/* ---------- connection banner ---------- */
.conn-banner {
display: flex;
align-items: center;
justify-content: center;
gap: 0.75rem;
background: rgba(232, 197, 71, 0.15);
border: 1px solid var(--accent);
border-radius: 8px;
color: var(--accent);
padding: 0.4rem 1rem;
margin: 0.5rem auto 0;
width: fit-content;
}
.conn-banner a {
color: var(--accent);
text-decoration: underline;
}
/* ---------- overlays ---------- */
.overlay {