From a8bfa708370c3a19c6f0c3781038233f0fadd2df Mon Sep 17 00:00:00 2001 From: Radek Davidek Date: Sun, 16 Nov 2025 10:05:30 +0100 Subject: [PATCH] best design --- src/main/resources/index.html | 349 ++++++++++++++++------------------ 1 file changed, 164 insertions(+), 185 deletions(-) diff --git a/src/main/resources/index.html b/src/main/resources/index.html index f8581bc..cb01ff6 100644 --- a/src/main/resources/index.html +++ b/src/main/resources/index.html @@ -7,277 +7,238 @@ TVCOM Přenosy @@ -431,6 +392,24 @@ function formatDateTime(dateStr, timeStr) { } } +// === ikona pro sport === +function getSportIcon(sport) { + const icons = { + 'Basketbal': '🏀', + 'Fotbal': '⚽', + 'Hokej': '🏒', + 'Volejbal': '🏐', + 'Florbal': '🥍', + 'Házenou': '🤾', + 'Házená': '🤾', + 'Tenis': '🎾', + 'Futsal': '⚽', + 'Atletika': '🏃', + 'Plavání': '🏊' + }; + return icons[sport] || '🏆'; +} + // === vykreslení seznamu === function renderList(items) { if (!items.length) { @@ -443,7 +422,7 @@ function renderList(items) { - + @@ -455,14 +434,14 @@ function renderList(items) { for (const t of items) { const dateTimeStr = formatDateTime(t.date, t.time); - const imgSrc = t.image || 'https://via.placeholder.com/80x60?text=Bez+náhledu'; const league = t.league || ''; const leaguePart = t.leaguePart || ''; const fullLeague = `${league} ${leaguePart}`.trim(); + const sportIcon = getSportIcon(t.sport); tableHTML += ` - +
Náhled Název Čas Sport
${sportIcon} ${t.title} ${dateTimeStr} ${t.sport || ''}