Add a library page: seasons, race weekends and sessions as Plex shows them

The operator wants to browse the posters the way a Plex or Emby Formula 1
library shows them. The page reads the whole library from the one Kometa
file (rounds, race names in the race posters' addresses, sessions in the
episodes'), waits through a fresh server's minutes-long first answer
instead of failing, and loads each picture only when it is on screen, two
at a time, dropping the queue when the reader leaves a level: every
poster is a render of about 10 s that pulls map tiles. Each level has its
own address and back/forward work; a picture the server has none for is
a plain card with its name.

The session order per weekend format moves into site.js, so the posters
page and the library read the same list.

Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
This commit is contained in:
2026-11-27 10:33:19 +01:00
parent 8237aabd87
commit db9f386c7a
10 changed files with 518 additions and 16 deletions
+56
View File
@@ -297,3 +297,59 @@ table.kv th { width: 12rem; }
.pages a.page p { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.92rem; }
.pages a.page ul { margin: 0; padding-left: 1.1rem; font-size: 0.78rem; }
.pages a.page li code { background: none; padding: 0; overflow-wrap: anywhere; }
/* ---- library ---- */
.status.warn::before { content: "! "; color: var(--warn); }
.status.warn { color: var(--warn); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.3rem; margin: 1.5rem 0 0.25rem; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs [aria-current="page"] { font-weight: 700; }
.crumbs .sep { color: var(--muted); }
.level-head { display: flex; gap: 1.25rem; align-items: flex-start; margin: 0.75rem 0 1rem; }
.level-head .tile { width: 180px; flex: none; }
.level-head h2 { margin-top: 0.25rem; }
.level-head p { margin: 0.3rem 0; color: var(--muted); }
.tiles { display: grid; gap: 1.25rem 1rem; }
.tiles.posters { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tiles.thumbs { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.tile-link { color: var(--text); text-decoration: none; display: flex; flex-direction: column; gap: 0.3rem; }
a.tile-link:hover .tile-frame { outline: 3px solid var(--accent); }
.tile-frame {
position: relative;
background: var(--code-bg);
border: 1px solid var(--line);
border-radius: 8px;
overflow: hidden;
display: grid;
place-items: center;
}
.tile-frame.poster { aspect-ratio: 2 / 3; }
.tile-frame.thumb { aspect-ratio: 16 / 9; }
.tile-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-frame .tile-note { font-size: 0.8rem; color: var(--muted); text-align: center; padding: 0.5rem; }
.tile-frame.plain { background: var(--card); padding: 0.75rem; text-align: center; }
.tile-frame.plain strong { display: block; font-size: 1rem; margin-bottom: 0.4rem; }
.tile-frame.plain span { font-size: 0.8rem; color: var(--muted); }
.tile-title { font-weight: 650; line-height: 1.3; }
.tile-sub { font-size: 0.82rem; color: var(--muted); }
.tile .request.compact { padding: 0.25rem 0.35rem; min-height: 0; gap: 0.3rem; }
.tile .request.compact .url { font-size: 0.66rem; }
.tile .request .verb { font-size: 0.62rem; }
.tile .request button, .tile .request a.open { font-size: 0.7rem; padding: 0.1rem 0.4rem; }
.tile .status { font-size: 0.72rem; margin: 0; }
.spinner {
width: 2.2rem; height: 2.2rem; border-radius: 50%;
border: 4px solid var(--line); border-top-color: var(--accent);
animation: spin 1s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }
.waiting { display: flex; gap: 1rem; align-items: center; }
.waiting p { margin: 0.2rem 0; }