From 79d53f26b810b28645ad61c689f090224d132c4d Mon Sep 17 00:00:00 2001 From: Barry Prendergast Date: Sun, 25 Oct 2026 18:24:32 +0100 Subject: [PATCH 1/3] Redesign the header: black, big two-weight wordmark, compact sticky brand - Drop the teal gradient. The masthead is pure black, with a hairline dot grid fading in on the right (not on phones). - Wordmark: "Sound" bold and "Selections" light, sized per breakpoint so it always fits (stacked above the tagline on phones). - The tagline is no longer capped at 40rem and scales with the screen: it stays on one line from about 960px up and wraps only where it must. - A live cyan dot with "A new playlist every week", and "Latest added" with the date of the newest playlist. - Once the search bar sticks to the top (Chrome and Edge), it shows a compact avatar and name that scroll back to the top when clicked. Co-Authored-By: Claude Sonnet 5.5 --- public/css/app.css | 174 ++++++++++++++++++++++++++++++++++++++++----- public/js/main.js | 18 +++++ views/index.ejs | 16 +++-- 3 files changed, 188 insertions(+), 20 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index a74ede2..a7e79f4 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -160,53 +160,153 @@ main:focus { outline: none; } -/* Masthead: black fading into cyan ------------------------------------------ */ +/* Masthead: pure black, a big two-weight wordmark, a hairline dot grid ---------- */ .masthead { - background: - radial-gradient(70% 140% at 12% 115%, hsl(180 100% 50% / 0.34), transparent 70%), - linear-gradient(180deg, var(--black) 0%, hsl(180 100% 50% / 0.1) 100%), - var(--black); - padding-block: clamp(2rem, 7vw, 4rem) clamp(1.25rem, 4vw, 2.25rem); + position: relative; + isolation: isolate; + overflow: hidden; + padding-block: clamp(2.25rem, 7vw, 5rem) clamp(1.75rem, 4vw, 3.25rem); + background: var(--black); +} + +/* Texture only on the right, fading out behind the text so nothing competes with it. + Left off phones, where there is no empty space to put it in. */ +@media (min-width: 48rem) { + .masthead::before { + content: ''; + position: absolute; + inset: 0; + z-index: -1; + background: radial-gradient(circle, hsl(0 0% 100% / 0.16) 1px, transparent 1.5px) 0 0 / 24px 24px; + -webkit-mask-image: linear-gradient(100deg, transparent 45%, #000 100%); + mask-image: linear-gradient(100deg, transparent 45%, #000 100%); + } } .masthead-inner { display: flex; - align-items: center; - gap: clamp(1rem, 3vw, 1.75rem); + flex-direction: column; + align-items: flex-start; + gap: clamp(1.25rem, 3vw, 1.75rem); +} + +@media (min-width: 48rem) { + .masthead-inner { + flex-direction: row; + align-items: center; + gap: 2rem; + } } .avatar { flex: none; - width: clamp(4rem, 12vw, 6.5rem); + width: clamp(4.5rem, 12vw, 7rem); height: auto; aspect-ratio: 1; border-radius: var(--avatar-radius); object-fit: cover; - box-shadow: 0 0 0 1px var(--line), 0 18px 40px -16px hsl(180 100% 50% / 0.45); + box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.16); +} + +.masthead-text { + min-width: 0; } .site-name { - font-size: clamp(2rem, 6vw, 3.5rem); + /* Stacked on phones the wordmark can use the full width; beside the avatar it needs less. */ + font-size: clamp(2.25rem, 12.5vw, 5rem); + line-height: 0.95; + letter-spacing: -0.05em; + white-space: nowrap; +} + +@media (min-width: 48rem) { + .site-name { + font-size: clamp(2.5rem, 7.2vw, 5rem); + } +} + +.site-name-bold { font-weight: 700; - line-height: 1; - letter-spacing: -0.035em; +} + +.site-name-light { + font-weight: 300; } .tagline { - margin-top: 0.625rem; - max-width: 40rem; + margin-top: clamp(0.75rem, 2vw, 1.125rem); color: var(--text-2); - font-size: clamp(0.9375rem, 2vw, 1.125rem); + /* Scales with the screen so it stays on one line from about 1000px up, wrapping only when it must. */ + font-size: clamp(1rem, 1.7vw, 1.25rem); + letter-spacing: -0.01em; text-wrap: pretty; } +@media (max-width: 47.99rem) { + .tagline { + text-wrap: balance; + } +} + +.masthead-meta { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.375rem 0.875rem; + margin-top: clamp(1rem, 2.5vw, 1.5rem); + color: var(--text-2); + font-size: 0.75rem; + font-weight: 500; + letter-spacing: 0.1em; + text-transform: uppercase; +} + +.live { + display: inline-flex; + align-items: center; + gap: 0.625rem; + color: var(--text); +} + +.live-dot { + width: 0.5rem; + height: 0.5rem; + border-radius: 50%; + background: var(--cyan); + animation: pulse 2.4s ease-out infinite; +} + +@keyframes pulse { + 0% { + box-shadow: 0 0 0 0 hsl(180 100% 50% / 0.55); + } + 70%, + 100% { + box-shadow: 0 0 0 0.5rem hsl(180 100% 50% / 0); + } +} + +/* A divider between the two facts, only where they sit on one line. */ +@media (min-width: 40rem) { + .masthead-stats::before { + content: ''; + display: inline-block; + width: 1px; + height: 0.75em; + margin-right: 0.875rem; + background: hsl(0 0% 100% / 0.3); + } +} + /* Toolbar: frosted glass, like the player bar -------------------------------- */ .toolbar { position: sticky; top: 0; z-index: 10; + container: toolbar / scroll-state; padding-block: 0.75rem; background: hsl(0 0% 8% / 0.92); border-block: 1px solid var(--line); @@ -220,12 +320,54 @@ main:focus { } } +.toolbar-inner { + display: flex; + align-items: center; + gap: 1rem; +} + .filters { + flex: 1; + min-width: 0; display: flex; gap: 0.75rem; align-items: center; } +/* Once the bar sticks to the top of the screen (Chrome and Edge), it shows who you are: + a small avatar and the name, so the identity never scrolls away. Elsewhere it stays hidden. */ +.toolbar-brand { + display: none; + flex: none; + align-items: center; + gap: 0.75rem; + color: var(--text); + font-weight: 700; + letter-spacing: -0.02em; + text-decoration: none; + transition: opacity var(--base) ease-out, translate var(--base) var(--ease-out), display var(--base) allow-discrete; +} + +.toolbar-avatar { + width: 2rem; + height: 2rem; + border-radius: var(--avatar-radius); + object-fit: cover; +} + +@container toolbar scroll-state(stuck: top) { + @media (min-width: 48rem) { + .toolbar-brand { + display: flex; + + @starting-style { + opacity: 0; + translate: -0.5rem 0; + } + } + } +} + .search-field { position: relative; flex: 1; diff --git a/public/js/main.js b/public/js/main.js index ddb7c82..a6ce4f9 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -2,6 +2,7 @@ import './error-handlers.js'; import { ApiError } from './api.js'; import { createPlaylistDialog } from './dialog.js'; import { DEFAULT_SORT, applyView, isSort, popularTags, searchText, tagKey } from './filter.js'; +import { formatDate } from './format.js'; import { createGrid } from './grid.js'; import { reportError } from './report.js'; import { loadCache, saveCache } from './store.js'; @@ -24,6 +25,8 @@ const els = { notice: $('notice'), empty: $('empty'), grid: $('grid'), + stats: $('masthead-stats'), + brand: $('brand'), }; const state = { @@ -162,11 +165,20 @@ function syncControls() { els.sort.value = state.view.sort; } +/** "Latest added 23 Oct 2026" in the masthead, from the newest playlist. */ +function renderMastheadStats() { + const newest = state.playlists.reduce((latest, record) => ((record.createdAt ?? '') > (latest?.createdAt ?? '') ? record : latest), null); + const date = newest?.createdAt && formatDate(newest.createdAt); + els.stats.hidden = !date; + if (date) els.stats.textContent = `Latest added ${date}`; +} + function setPlaylists(playlists) { state.playlists = playlists; state.byId = new Map(playlists.map((record) => [record.id, record])); state.entries = playlists.map((record) => ({ record, text: searchText(record) })); grid.prune(state.byId); + renderMastheadStats(); renderTags(); renderView(); } @@ -323,6 +335,12 @@ els.tags.addEventListener('click', (event) => { setView({ tag: chip.getAttribute('aria-pressed') === 'true' ? '' : chip.dataset.tag }); }); +// The compact brand in the sticky bar returns to the top without adding a history entry. +els.brand.addEventListener('click', (event) => { + event.preventDefault(); + window.scrollTo({ top: 0, behavior: window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth' }); +}); + // Long-lived tabs: look for new playlists when the visitor comes back. const resyncIfStale = () => { if (document.visibilityState === 'visible' && Date.now() - state.lastSyncAt > RESYNC_AFTER_MS) refresh(); diff --git a/views/index.ejs b/views/index.ejs index d9dd454..6a62188 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -46,18 +46,26 @@ -
+
- -
-

SoundSelections

+ +
+

SoundSelections

Weekly curated playlists for every genre and mood, plus deep dives into artists' back catalogues.

+

+ A new playlist every week + +

+ + + SoundSelections +
From b03d0e2bd83b222265d2a1a7e94701a2d006b074 Mon Sep 17 00:00:00 2001 From: Barry Prendergast Date: Sun, 25 Oct 2026 18:26:02 +0100 Subject: [PATCH 2/3] Remove the avatar; draw the search bar's box only when pinned - The avatar is gone from the masthead and the sticky bar. The wordmark is now larger, and the tagline scales to stay on one line from about 800px. (The avatar is still used for the browser-tab icon and social previews.) - The frosted-glass bar behind the search and sort controls is invisible while the controls sit in the page, and fades in once they pin to the top of the screen (Chrome and Edge). Browsers that can't detect pinning always show it, so scrolling content never runs underneath bare controls. - The compact name in the pinned bar now matches the two-weight wordmark. Co-Authored-By: Claude Sonnet 5.5 --- public/css/app.css | 83 +++++++++++++++++++--------------------------- views/index.ejs | 23 +++++-------- 2 files changed, 43 insertions(+), 63 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index a7e79f4..32422ce 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -53,7 +53,6 @@ --radius-m: 0.75rem; --radius-l: 1.25rem; --radius-pill: 999px; - --avatar-radius: var(--radius-s); /* Set to 0 for sharp corners. */ --gutter: clamp(1rem, 4vw, 2.5rem); --gap: clamp(0.75rem, 2vw, 1.5rem); @@ -184,38 +183,9 @@ main:focus { } } -.masthead-inner { - display: flex; - flex-direction: column; - align-items: flex-start; - gap: clamp(1.25rem, 3vw, 1.75rem); -} - -@media (min-width: 48rem) { - .masthead-inner { - flex-direction: row; - align-items: center; - gap: 2rem; - } -} - -.avatar { - flex: none; - width: clamp(4.5rem, 12vw, 7rem); - height: auto; - aspect-ratio: 1; - border-radius: var(--avatar-radius); - object-fit: cover; - box-shadow: 0 0 0 1px hsl(0 0% 100% / 0.16); -} - -.masthead-text { - min-width: 0; -} - .site-name { - /* Stacked on phones the wordmark can use the full width; beside the avatar it needs less. */ - font-size: clamp(2.25rem, 12.5vw, 5rem); + /* Fills the width on phones; capped on large screens. */ + font-size: clamp(2.25rem, 12.5vw, 7rem); line-height: 0.95; letter-spacing: -0.05em; white-space: nowrap; @@ -223,7 +193,7 @@ main:focus { @media (min-width: 48rem) { .site-name { - font-size: clamp(2.5rem, 7.2vw, 5rem); + font-size: clamp(3rem, 9vw, 7rem); } } @@ -238,8 +208,8 @@ main:focus { .tagline { margin-top: clamp(0.75rem, 2vw, 1.125rem); color: var(--text-2); - /* Scales with the screen so it stays on one line from about 1000px up, wrapping only when it must. */ - font-size: clamp(1rem, 1.7vw, 1.25rem); + /* Scales with the screen so it stays on one line from about 800px up, wrapping only when it must. */ + font-size: clamp(1rem, 2vw, 1.375rem); letter-spacing: -0.01em; text-wrap: pretty; } @@ -308,18 +278,41 @@ main:focus { z-index: 10; container: toolbar / scroll-state; padding-block: 0.75rem; - background: hsl(0 0% 8% / 0.92); +} + +/* The frosted-glass bar sits behind the controls. It is only drawn once the toolbar is pinned + to the top of the screen (Chrome and Edge); until then the controls float on the black page. + Browsers that can't tell when it's pinned always show it, so scrolling content never runs + underneath bare controls. */ +.toolbar-surface { + position: absolute; + inset: 0; + z-index: -1; + background: hsl(0 0% 8% / 0.94); border-block: 1px solid var(--line); + transition: opacity var(--slow) ease-out; } @supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) { - .toolbar { + .toolbar-surface { background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); } } +@supports (container-type: scroll-state) { + .toolbar-surface { + opacity: 0; + } + + @container toolbar scroll-state(stuck: top) { + .toolbar-surface { + opacity: 1; + } + } +} + .toolbar-inner { display: flex; align-items: center; @@ -334,27 +327,19 @@ main:focus { align-items: center; } -/* Once the bar sticks to the top of the screen (Chrome and Edge), it shows who you are: - a small avatar and the name, so the identity never scrolls away. Elsewhere it stays hidden. */ +/* Once the bar sticks to the top of the screen (Chrome and Edge), it shows the name, so the + identity never scrolls away. Elsewhere it stays hidden. */ .toolbar-brand { display: none; flex: none; align-items: center; - gap: 0.75rem; color: var(--text); - font-weight: 700; - letter-spacing: -0.02em; + font-size: 1.125rem; + letter-spacing: -0.04em; text-decoration: none; transition: opacity var(--base) ease-out, translate var(--base) var(--ease-out), display var(--base) allow-discrete; } -.toolbar-avatar { - width: 2rem; - height: 2rem; - border-radius: var(--avatar-radius); - object-fit: cover; -} - @container toolbar scroll-state(stuck: top) { @media (min-width: 48rem) { .toolbar-brand { diff --git a/views/index.ejs b/views/index.ejs index 6a62188..00e46b4 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -47,25 +47,20 @@
-
- -
-

SoundSelections

-

Weekly curated playlists for every genre and mood, plus deep dives into artists' back catalogues.

-

- A new playlist every week - -

-
+
+

SoundSelections

+

Weekly curated playlists for every genre and mood, plus deep dives into artists' back catalogues.

+

+ A new playlist every week + +

+ - - - SoundSelections - + SoundSelections
From ee05d37ab40d1ae90c6ca1e8409e35a9bf78d2b6 Mon Sep 17 00:00:00 2001 From: Barry Prendergast Date: Sun, 25 Oct 2026 18:29:26 +0100 Subject: [PATCH 3/3] Let the tagline use the full width on phones and tablets Below 768px the tagline used text-wrap: balance, which narrows the text so lines come out even and leaves empty space beside it. It now uses `pretty` at every width, which only avoids a lone last word. The tagline fills 80-99% of its width on phones and sits on one line from 759px. Co-Authored-By: Claude Sonnet 5.5 --- public/css/app.css | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/public/css/app.css b/public/css/app.css index 32422ce..3e58020 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -211,15 +211,10 @@ main:focus { /* Scales with the screen so it stays on one line from about 800px up, wrapping only when it must. */ font-size: clamp(1rem, 2vw, 1.375rem); letter-spacing: -0.01em; + /* `pretty` only avoids a lone last word; it never narrows the text to even out the lines. */ text-wrap: pretty; } -@media (max-width: 47.99rem) { - .tagline { - text-wrap: balance; - } -} - .masthead-meta { display: flex; flex-wrap: wrap;