diff --git a/PROJECT.md b/PROJECT.md index 5e31306..e12eda9 100644 --- a/PROJECT.md +++ b/PROJECT.md @@ -504,6 +504,13 @@ Two more from Oliver's screenshots: grey; the band's top rung wears the red border, it is the final. Every other mode keeps the player block (main.buildLeaguePanel). - **The ribbon grew** (13px type, taller band), per his call. +- **The court section stops pretending on the league modes** (his catch: "eine Liga hat einen + festen Court — eigentlich sollte gar keine Courtauswahl da sein" — right; start() had forced + the venue all along while the list still offered a pick). On zombie/cup the section reads + "02 · HOME COURT · SET BY YOUR LEAGUE" and shows exactly one ringed row, the league's court; + the click handler refuses there. One authoritative loop in syncSetup paints on/lock/display for + both faces — the first cut had the league filter ABOVE the generic repaint, which promptly + undid it. ## Session log: THE LEAGUES — the polish round: the ribbon, the glow, the count-up (2026-08-29, same day, STAGING ONLY) diff --git a/index.html b/index.html index 2679273..954e835 100644 --- a/index.html +++ b/index.html @@ -352,6 +352,8 @@ if (location.hostname !== 'splatter-tennis.wuwi.one' && !window.Capacitor?.isNat .lgFoe.un i { color: var(--dim); } /* the band's top rung is the final — it wears the door's own red */ .lgFoe.fin { border-color: var(--red); } + /* league modes: the venue is the league's own and not a choice — one row, no tap */ + #courtList.fixed .court { cursor: default; } /* the WAY-UP RIBBON, horizontal (Oliver's call after two diagonal cuts — a rotated pixel font was the one anti-aliased thing in the menu): a red band running in from OVER the left border, dissolving rightward through a real PIXEL FADE — an inline-SVG mask of 6px cells thresholded @@ -721,7 +723,7 @@ if (location.hostname !== 'splatter-tennis.wuwi.one' && !window.Capacitor?.isNat
-

02 · COURT

+

02 · COURT

@@ -918,6 +920,6 @@ if (location.hostname !== 'splatter-tennis.wuwi.one' && !window.Capacitor?.isNat
- + diff --git a/src/main.js b/src/main.js index 05472df..9d31de0 100644 --- a/src/main.js +++ b/src/main.js @@ -342,11 +342,21 @@ function syncSetup() { document.getElementById('s01').textContent = leagueMode ? '01 · YOUR LEAGUE' : '01 · PLAYER'; if (leagueMode) buildLeaguePanel(); if (!courtUnlocked(picked)) picked = leagueOf(profile.prof.lg).court; + // ...and the COURT section stops pretending to be a choice on the league modes (Oliver: a + // league HAS its court — start() has forced it all along): only the league's own row shows, + // ringed, as the venue. Every other mode gets the full pickable list. This runs AFTER the + // generic repaint below would, so it has the last word on .on/.lock. + const homeCourt = leagueOf(profile.prof.lg).court; + document.getElementById('s02').innerHTML = leagueMode + ? '02 · HOME COURTSET BY YOUR LEAGUE' : '02 · COURT'; + courtList.classList.toggle('fixed', leagueMode); for (const el of courtList.children) { const c = COURTS.find(x => x.id === el.dataset.id), l = courtLeague(el.dataset.id); const open = courtUnlocked(el.dataset.id); - el.classList.toggle('lock', !open); - el.classList.toggle('on', open && el.dataset.id === picked); + el.classList.toggle('lock', !open && !leagueMode); + el.classList.toggle('on', leagueMode ? el.dataset.id === homeCourt + : open && el.dataset.id === picked); + el.style.display = leagueMode && el.dataset.id !== homeCourt ? 'none' : ''; // the sub line carries the lock and names the price — the tile stays visible, as a goal should el.querySelector('i').textContent = open ? c.sub : 'LOCKED — REACH ' + l.name; } @@ -430,6 +440,7 @@ for (const c of COURTS) { // Tapping a tile SELECTS it and nothing more. It used to start the match on the spot, which gave // you no way to look at the three of them and no way back out of the screen. b.addEventListener('click', () => { + if (pickedMode === 'zombie' || pickedMode === 'cup') return; // the league picks the venue if (!courtUnlocked(c.id)) return; // locked: the row itself says which league opens it picked = c.id; for (const el of courtList.children) el.classList.toggle('on', el === b);