diff options
| author | Adam Soltys <[email protected]> | 2026-10-22 10:06:20 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-22 10:06:20 -0700 |
| commit | 2c1acf85ac24f78207e0c667a7fae8dfdfa54ac0 (patch) | |
| tree | 3a14c6cff68d28c542bda1b0142f23c9aac10f18 /src | |
| parent | 9e48c1513bccdd1bd9cb59736d9efe7676353f6b (diff) | |
| download | coinosv3-2c1acf85ac24f78207e0c667a7fae8dfdfa54ac0.tar.gz coinosv3-2c1acf85ac24f78207e0c667a7fae8dfdfa54ac0.zip | |
Videos grid: "All shapes" lays the clips out three across in squares (tall tiles stay for a phone held upright showing tall clips only)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/features/messages.js | 10 | ||||
| -rw-r--r-- | src/style.css | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 0f8c78a..350ad7e 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -14205,10 +14205,12 @@ export function messagesFeature(ctx) { if (missing.length) warmTileThumbs(missing).then(() => queueTileThumbs(missing.filter((u) => !tileThumbs.has(u)))); } if (mediaMode === 'videos') for (const it of items.slice(0, 24)) preconnect(playSrc(it.url)); - // wide clips only (a wide screen, not "All shapes"): one to a row, wide - // posters, not slivers of them cut to portrait tiles (Adam, 2026-10-22) - const wideRows = mediaMode === 'videos' && !clipsAll() && !screenTall(); - return h('div', { class: 'media-grid' + (wideRows ? ' wide' : ''), 'data-key': 'media-grid:' + mediaMode }, + // The tiles take the clips' shape (Adam, 2026-10-22): wide clips only (a + // wide screen) go one to a row, their posters whole, not slivers cut to + // portrait tiles; every shape ("All shapes") goes three across in + // squares; tall ones only (a phone held upright) keep the tall tiles. + const shape = mediaMode !== 'videos' ? '' : clipsAll() ? ' square' : screenTall() ? '' : ' wide'; + return h('div', { class: 'media-grid' + shape, 'data-key': 'media-grid:' + mediaMode }, ...items.map((it) => { const k = mediaKey(it); // a video tile shows a still at once: kept, given, or the server's diff --git a/src/style.css b/src/style.css index 25f3bed..0403a88 100644 --- a/src/style.css +++ b/src/style.css @@ -1541,6 +1541,8 @@ body::after { /* only wide clips in it: one to a row, the poster whole */ .media-grid.wide { grid-template-columns: 1fr; gap: 6px; } .media-grid.wide .media-tile.video { aspect-ratio: 16 / 9; } +/* every shape in it: squares, none of them favoured */ +.media-grid.square .media-tile.video { aspect-ratio: 1; } .media-tile img, .media-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; } .media-tile.broken { display: none; } .media-tile-play { |
