diff --git a/web/app.js b/web/app.js index fab4343..53b9bd4 100644 --- a/web/app.js +++ b/web/app.js @@ -15,6 +15,7 @@ const view = $("#view"); // ---- appearance ------------------------------------------------------------------------------- const THEMES = { + graphite: { bg: "#181819", panel: "#101010", raised: "#262628", line: "#2b2b2e", text: "#e7e7e7", muted: "#a8a8a8", accent: "#3a81ed" }, amber: { bg: "#0d0e12", panel: "#15171d", raised: "#1d2028", line: "#262a33", text: "#eceef3", muted: "#8a8f9c", accent: "#f2b544" }, ocean: { bg: "#0a1018", panel: "#101a26", raised: "#172434", line: "#1f2f42", text: "#e6eef7", muted: "#8698ad", accent: "#4cc2ff" }, rose: { bg: "#120c10", panel: "#1b1218", raised: "#251922", line: "#33222e", text: "#f5e9f0", muted: "#a48b99", accent: "#ff6f9f" }, @@ -28,7 +29,7 @@ const inkFor = hex => { return l > 0.6 ? "#141414" : "#ffffff"; }; function applyTheme() { - const t = THEMES[S.theme] || THEMES.amber, a = S.accent || t.accent; + const t = THEMES[S.theme] || THEMES.graphite, a = S.accent || t.accent; $("#theme").textContent = `:root{--bg:${t.bg};--panel:${t.panel};--raised:${t.raised};--line:${t.line};--text:${t.text};--muted:${t.muted};` + `--accent:${a};--accent-ink:${inkFor(a)};--glass:${t.panel}ee;--hover:${t.text}0d;--shadow:${t.light ? "#0003" : "#0009"};` + `--wave:${t.text}44;--wave-ghost:${t.text}14;color-scheme:${t.light ? "light" : "dark"}}`; @@ -592,7 +593,13 @@ function card({ href, img: src, fb, t, s = "", round, kind, srv, key }) { const nk = kind === "album" || kind === "artist" ? nameKey(t) : ""; const hide = nk && !stemSets()[kind].has(nk); return ` - ${src ? `` : `
`}
${esc(t)}
${esc(s)}
`; +
${src ? `` : `
`}${kind ? `` : ""}
${esc(t)}
${esc(s)}
`; +} +// Tracks behind a card, for its play button and right-click menu. +async function cardTracks(c) { + const { kind, srv, key } = c.dataset; + if (kind === "playlist") return ((await px(srv, `/playlists/${key}/items`)).Metadata || []).map(m => track(srv, m)); + return leaves(srv, key); } const albumCard = m => card({ href: `#/album/${m._srv}:${m.ratingKey}`, img: img(m._srv, m.thumb), t: m.title, s: [m.parentTitle, m.year].filter(Boolean).join(" · "), kind: "album", srv: m._srv, key: m.ratingKey }); const artistCard = m => card({ href: `#/artist/${m._srv}:${m.ratingKey}`, img: img(m._srv, m.thumb), t: m.title, round: true, kind: "artist", srv: m._srv, key: m.ratingKey }); @@ -600,15 +607,18 @@ const artistCard = m => card({ href: `#/artist/${m._srv}:${m.ratingKey}`, img: i const rowHtml = (listId, t, i, { numbers, album = true, mix } = {}) => ` ${numbers ? t.index ?? i + 1 : i + 1} - ${esc(t.title)}${badge(t)}${mix ? 'MIX' : ""}${album ? `${esc([t.artist, t.album].filter(Boolean).join(" · "))}` : ""} +
${esc(t.title)}${badge(t)}${mix ? 'MIX' : ""}
${esc(t.artist || "")} + ${album ? `${esc(t.album || "")}` : ""} ${Offline.has(t.id) ? ICON.download : ""} ${fmtTime(t.duration / 1000)} `; +const CLOCK = ''; +const thead = (album = true) => `#Title${album ? 'Album' : ""}${CLOCK}`; function trackTable(listId, tracks, opts = {}) { lists[listId] = tracks; if (!tracks.length) return `

Nothing here.

`; - return `${tracks.map((t, i) => rowHtml(listId, t, i, { ...opts, mix: listItems[listId]?.[i]?.mix })).join("")}
+ return `${thead(opts.album)}${tracks.map((t, i) => rowHtml(listId, t, i, { ...opts, mix: listItems[listId]?.[i]?.mix })).join("")}

None of these have stems yet.

All of these have stems.

`; } @@ -623,12 +633,13 @@ function sortControl(screen) { const bar = (title, { sort, filter = true, extra = "" } = {}) => `

${esc(title)}

${extra}${filter ? stemsChip() : ""}${sort ? sortControl(sort) : ""}
`; const actions = id => `
- - + + -
`; -const hero = (src, kind, title, sub, id, round, fb) => `
${src ? `` : `
`} -
${kind}

${esc(title)}

${sub}
${id ? actions(id) : ""}
`; + `; +const hero = (src, kind, title, sub, id, round, fb) => `
${src ? `
` : ""} +
${src ? `` : `
`} +
${kind}

${esc(title)}

${sub}
${id ? actions(id) : ""}`; function needPlex() { view.innerHTML = `

Welcome

Add a Plex server in Settings to browse your library, or browse the stems on their own.

`; @@ -775,7 +786,7 @@ const routes = { const srcs = sources(); if (!srcs.length) return needPlex(); view.innerHTML = bar("Songs", { sort: "songs", extra: `` }) - + `

No songs with stems loaded yet. Scroll for more.

Every song loaded so far has stems. Scroll for more.

`; + + `${thead()}

No songs with stems loaded yet. Scroll for more.

Every song loaded so far has stems. Scroll for more.

`; lists.songs = []; const size = S.stemFilter ? 1000 : 150; await paged(my, $("tbody", view), new Pager(srcs, secPath, { type: 10, sort: sortState("songs").param }, size), size, (ms, off) => { @@ -814,7 +825,8 @@ const routes = { if (my !== seq) return; pls = st.random ? pls.sort(() => Math.random() - 0.5) : pls.sort(comparator(st.param)); count(pls.length + playlists.length, "playlist"); - $("#plexpl").innerHTML = pls.length ? `
${pls.map(p => card({ href: `#/playlist/${p._srv}:${p.ratingKey}`, img: img(p._srv, p.thumb || p.composite), fb: p.composite && rawImg(p._srv, p.composite), t: p.title, s: plural(p.leafCount || 0, "track") })).join("")}
` + navPls = [...pls].sort((a, b) => a.title.localeCompare(b.title)); navPlaylists(); + $("#plexpl").innerHTML = pls.length ? `
${pls.map(p => card({ href: `#/playlist/${p._srv}:${p.ratingKey}`, img: img(p._srv, p.thumb || p.composite), fb: p.composite && rawImg(p._srv, p.composite), t: p.title, s: plural(p.leafCount || 0, "track"), kind: "playlist", srv: p._srv, key: p.ratingKey })).join("")}
` : `

No music playlists.

`; }, async album(my, arg) { @@ -899,11 +911,26 @@ const routes = { settings: renderSettings, }; +// Sidebar playlist list: stem playlists, then Plex ones (fetched at start and on the Playlists page). +let navPls = [], navHtml = ""; +function navPlaylists() { + const box = $("#nav-pl"), html = playlists.map(p => `${esc(p.title)}`).join("") + + navPls.map(p => `${esc(p.title)}`).join(""); + if (html !== navHtml) { navHtml = html; box.innerHTML = html; } + for (const a of box.children) a.classList.toggle("on", a.getAttribute("href") === location.hash); +} +async function loadNavPlaylists() { + if (!liveServers().length) return; + try { navPls = (await everything(liveServers().map(srv => ({ srv })), "/playlists", { playlistType: "audio" })).sort((a, b) => a.title.localeCompare(b.title)); } catch {} + navPlaylists(); +} + async function route() { const my = ++seq; const [, name = "home", ...rest] = (location.hash || "#/home").split("/"); const arg = decodeURIComponent(rest.join("/")); $$("#nav a").forEach(a => a.classList.toggle("on", a.dataset.nav === name || (a.dataset.nav === "genres" && name === "genre") || (a.dataset.nav === "playlists" && /playlist$/.test(name)))); + navPlaylists(); lists = {}; listItems = {}; kick = null; delete view.dataset.genre; view.scrollTop = 0; @@ -923,6 +950,11 @@ view.addEventListener("click", async ev => { const el = ev.target.closest("button, tr[data-list]"); if (!el) return; const ds = el.dataset, row = ev.target.closest("tr[data-list]"); + if ("cardplay" in ds) { + ev.preventDefault(); + const ts = await cardTracks(el.closest(".card")); + return ts.length ? Q.playList(ts, 0, false) : toast("Nothing to play"); + } if (ds.stemfilter) { S.stemFilter = S.stemFilter === ds.stemfilter ? "" : ds.stemfilter; save(); applyStemFilter(); return; } if ("sortdir" in ds) { pickSort(ds.sortdir, sortState(ds.sortdir).i); return route(); } if ("reshuffle" in ds) return route(); @@ -989,7 +1021,7 @@ view.addEventListener("change", ev => { view.addEventListener("contextmenu", ev => { const row = ev.target.closest("tr[data-list]"), c = ev.target.closest(".card[data-kind]"); if (row) { ev.preventDefault(); trackMenu(ev.clientX, ev.clientY, row.dataset.list, +row.dataset.i); } - else if (c) { ev.preventDefault(); listMenu(ev.clientX, ev.clientY, () => leaves(c.dataset.srv, c.dataset.key), { title: $(".t", c).textContent, href: c.getAttribute("href") }); } + else if (c) { ev.preventDefault(); listMenu(ev.clientX, ev.clientY, () => cardTracks(c), { title: $(".t", c).textContent, href: c.getAttribute("href") }); } }); // ---- settings ----------------------------------------------------------------------------------- @@ -1028,7 +1060,7 @@ function serverHtml(srv) { } function renderSettings() { - const theme = THEMES[S.theme] || THEMES.amber; + const theme = THEMES[S.theme] || THEMES.graphite; view.innerHTML = `

Plex

Turn on the music libraries you want. Everything that's on is browsed as one library.

@@ -1210,6 +1242,7 @@ async function connect() { Q.restore(); UI.all(); route(); + loadNavPlaylists(); Live.poll(); setInterval(() => { if (!document.hidden) Stems.refresh(); }, 5 * 60 * 1000); })(); diff --git a/web/index.html b/web/index.html index ca2b304..84c7cd6 100644 --- a/web/index.html +++ b/web/index.html @@ -3,7 +3,7 @@ - + Stemify @@ -14,16 +14,18 @@
diff --git a/web/store.js b/web/store.js index 01caf46..2135a72 100644 --- a/web/store.js +++ b/web/store.js @@ -24,10 +24,11 @@ export const S = Object.assign({ acapella: false, // spell "A Cappella" as "Acapella" bar: { speed: true, mixer: true, lyrics: true, queue: true }, // player bar buttons stations: [], // web radio: [{id, name, url}] - theme: "amber", accent: "", css: "", + theme: "graphite", accent: "", css: "", }, load(KEY) || {}); if (!S.clientId) S.clientId = uuid(); +if (!S.ui2) { if (S.theme === "amber" && !S.accent) S.theme = "graphite"; S.ui2 = true; } if (S.fmt.startsWith("opus") && !new Audio().canPlayType('audio/ogg; codecs="opus"')) S.fmt = "flac"; // Before multiple servers there was one S.plex and one S.section. diff --git a/web/style.css b/web/style.css index 9ffb745..f377476 100644 --- a/web/style.css +++ b/web/style.css @@ -1,78 +1,112 @@ :root { - --bg: #0d0e12; - --panel: #15171d; - --raised: #1d2028; - --line: #262a33; - --text: #eceef3; - --muted: #8a8f9c; - --accent: #f2b544; - --accent-ink: #1a1306; - --radius: 12px; - --player-h: 96px; - --glass: #15171dee; - --hover: #eceef30d; + --bg: #181819; + --panel: #101010; + --raised: #262628; + --line: #2b2b2e; + --text: #e7e7e7; + --muted: #a8a8a8; + --accent: #3a81ed; + --accent-ink: #ffffff; + --radius: 6px; + --player-h: 90px; + --glass: #101010ee; + --hover: #e7e7e70d; --shadow: #0009; - --wave: #eceef344; - --wave-ghost: #eceef314; + --wave: #e7e7e744; + --wave-ghost: #e7e7e714; color-scheme: dark; } * { box-sizing: border-box; } html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); - font: 14px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; } + font: 13px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; } +* { scrollbar-width: thin; scrollbar-color: #5a5a5a80 transparent; } +::-webkit-scrollbar { width: 8px; height: 8px; } +::-webkit-scrollbar-thumb { background: #5a5a5a80; border-radius: 8px; } +::-webkit-scrollbar-thumb:hover { background: #5a5a5a; } +::-webkit-scrollbar-track { background: transparent; } button, input, select, textarea { font: inherit; color: inherit; } button:disabled { opacity: .4; cursor: default; } button { background: none; border: 0; cursor: pointer; padding: 0; } a { color: inherit; text-decoration: none; } svg { width: 1em; height: 1em; fill: currentColor; display: block; } -#app { display: grid; grid-template-columns: 210px 1fr auto; height: calc(100% - var(--player-h)); } -#nav { background: var(--panel); border-right: 1px solid var(--line); padding: 20px 12px; display: flex; flex-direction: column; gap: 2px; } -.brand { white-space: nowrap; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; padding: 0 10px 18px; } +#app { display: grid; grid-template-columns: 200px 1fr auto; height: calc(100% - var(--player-h)); } +#nav { background: var(--panel); padding: 16px 10px 10px; display: flex; flex-direction: column; gap: 1px; min-height: 0; } +.brand { white-space: nowrap; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; padding: 0 10px 6px; } .brand::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 3px; } -#nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; } +#nav a { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 4px; color: var(--muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +#nav a svg { width: 18px; height: 18px; flex: none; } #nav a:hover { color: var(--text); } #nav a.on { background: var(--raised); color: var(--text); } -#search input { width: 100%; margin: 12px 0; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; outline: none; } +#search input { width: 100%; margin: 10px 0; padding: 7px 10px; background: var(--raised); border: 1px solid transparent; border-radius: 4px; outline: none; } #search input:focus { border-color: var(--accent); } -.settings-link { margin-top: auto; } +.nav-h { margin: 16px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); opacity: .7; } +#nav-pl { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; margin: 0 -4px; padding: 0 4px; } +#nav-pl a { display: block; padding: 5px 10px; font-weight: 400; } +.settings-link { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 !important; padding-top: 10px !important; } -#view { overflow-y: auto; padding: 28px 32px 48px; } -h1 { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 4px; } -h2 { font-size: 17px; margin: 28px 0 12px; } +#view { overflow-y: auto; padding: 24px 32px 48px; background: var(--bg); } +h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; } +h2 { font-size: 18px; font-weight: 700; margin: 28px 0 12px; } .sub { color: var(--muted); } .bar { display: flex; align-items: center; gap: 10px; margin: 0 0 20px; flex-wrap: wrap; } .bar h1 { margin-right: auto; } -select, textarea, input[type=text], input[type=url], input[type=password] { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; outline: none; } +select, textarea, input[type=text], input[type=url], input[type=password] { background: var(--raised); border: 1px solid var(--line); border-radius: 4px; padding: 6px 10px; outline: none; } -.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 18px; } -.card { display: block; min-width: 0; content-visibility: auto; contain-intrinsic-size: auto 210px; } -.card img, .card .ph { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--raised); display: block; transition: transform .15s; } -.card:hover img { transform: translateY(-2px); } +.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; } +.card { display: block; min-width: 0; padding: 10px; border-radius: var(--radius); content-visibility: auto; contain-intrinsic-size: auto 240px; transition: background-color .15s; } +.card:hover { background: var(--hover); } +.card .art { position: relative; } +.card img, .card .ph { width: 100%; aspect-ratio: 1; border-radius: 4px; object-fit: cover; background: var(--raised); display: block; } .card.round img, .card.round .ph { border-radius: 50%; } -.card .t { margin-top: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.card .s { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.cplay { position: absolute; right: 8px; bottom: 8px; width: 42px; height: 42px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); + display: grid; place-items: center; font-size: 17px; box-shadow: 0 6px 16px #0008; opacity: 0; transform: translateY(6px); transition: opacity .15s, transform .15s; } +.cplay svg { margin-left: 2px; } +.card:hover .cplay, .cplay:focus-visible { opacity: 1; transform: none; } +.cplay:hover { transform: scale(1.06) !important; } +.card .t { margin-top: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.card .s { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.hero { display: flex; gap: 28px; align-items: flex-end; margin-bottom: 26px; } -.hero img { width: 210px; height: 210px; border-radius: var(--radius); object-fit: cover; background: var(--raised); box-shadow: 0 20px 50px var(--shadow); } +.hero { position: relative; isolation: isolate; overflow: hidden; margin: -24px -32px 0; padding: 64px 32px 28px; } +.hero-bg { position: absolute; inset: 0; z-index: -1; will-change: transform; } +.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(48px) saturate(1.4); transform: scale(1.3); opacity: .55; } +.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 55%, var(--bg) 100%); } +.hero-in { display: flex; gap: 28px; align-items: flex-end; } +.hero .art { width: 220px; height: 220px; flex: none; border-radius: 4px; object-fit: cover; background: var(--raised); box-shadow: 0 16px 40px #000a; } .hero .meta { min-width: 0; } -.hero .kind { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; } -.actions { display: flex; gap: 10px; margin-top: 16px; } -.btn { background: var(--raised); border-radius: 999px; padding: 9px 18px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; } +.hero h1 { font-size: clamp(32px, 4.6vw, 64px); line-height: 1.05; font-weight: 900; margin: 6px 0 12px; overflow-wrap: anywhere; + display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; } +.hero .sub { color: var(--text); opacity: .8; } +.hero .sub a:hover { text-decoration: underline; } +.hero .kind { color: var(--text); opacity: .75; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; } +.actions { display: flex; gap: 14px; align-items: center; margin: 4px 0 6px; padding: 14px 0; } +.bigplay { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: 22px; + box-shadow: 0 6px 18px #0006; transition: transform .1s, filter .15s; } +.bigplay svg { margin-left: 3px; } +.bigplay:hover { transform: scale(1.05); filter: brightness(1.1); } +.ibtn { color: var(--muted); font-size: 22px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; } +.ibtn:hover { color: var(--text); } +.btn { background: var(--raised); border-radius: 4px; padding: 8px 16px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; } .btn.primary { background: var(--accent); color: var(--accent-ink); } .btn:hover { filter: brightness(1.12); } -.tracks { width: 100%; border-collapse: collapse; } -.tracks tr { border-radius: 8px; } -.tracks td { padding: 8px 10px; border-bottom: 1px solid var(--hover); white-space: nowrap; } -.tracks tr:hover td { background: var(--panel); } -.tracks tr.playing td { color: var(--accent); } -.tracks .n { width: 36px; color: var(--muted); text-align: right; } -.tracks .ti { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; } -.tracks .ti small { color: var(--muted); margin-left: 8px; } -.tracks .d { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } +.tracks { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; } +.tracks th { position: sticky; top: -24px; z-index: 1; background: var(--bg); padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; + font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); } +.tracks th svg { width: 14px; height: 14px; margin-left: auto; } +.tracks td { padding: 6px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 52px; } +.tracks tbody tr:hover td { background: var(--hover); } +.tracks td:first-child { border-radius: 4px 0 0 4px; } +.tracks td:last-child { border-radius: 0 4px 4px 0; } +.tracks tr.playing .tt, .tracks tr.playing .n { color: var(--accent); } +.tracks .n { width: 48px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } +.tracks .ti .tt { overflow: hidden; text-overflow: ellipsis; color: var(--text); font-weight: 500; } +.tracks .ti small { display: block; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; } +.tracks .al { width: 32%; color: var(--muted); } +.tracks .d { width: 64px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; } .tracks tr { cursor: default; } -.tracks .off { color: var(--accent); width: 20px; padding: 0 2px; font-size: 13px; } -.tracks .acts { width: 1px; padding: 0 4px; } +.tracks .off { color: var(--accent); width: 24px; padding: 0 2px; font-size: 13px; } +.tracks .acts { width: 64px; padding: 0 4px; text-align: right; } .tracks .acts button { opacity: 0; color: var(--muted); font-size: 18px; width: 26px; height: 26px; border-radius: 6px; display: inline-grid; place-items: center; vertical-align: middle; } .tracks tr:hover .acts button { opacity: 1; } .tracks .acts button:hover { color: var(--text); background: var(--raised); } @@ -97,16 +131,16 @@ body.stems-ready .card.nostem .t::after { content: "NO STEMS"; font-size: 9px; f .link { color: var(--accent); cursor: pointer; } .btn.small { padding: 5px 12px; font-size: 13px; } .btn.icon { padding: 9px 12px; } -.hero .ph { width: 210px; height: 210px; border-radius: var(--radius); background: var(--raised); flex: none; } +.hero .ph { width: 220px; height: 220px; border-radius: 4px; background: var(--raised); flex: none; } .hero .round { border-radius: 50%; } /* Stems-only filter hides rows and cards without stems. */ body.stems-only .tracks tr.nostem, body.stems-only .card.nostem { display: none; } .only-stems { display: none; } -body.stems-only .tracks:not(:has(tr:not(.nostem))) + .only-stems { display: block; } +body.stems-only .tracks:not(:has(tbody tr:not(.nostem))) + .only-stems { display: block; } .only-nostems { display: none; } -body.no-stems .tracks tr:not(.nostem) { display: none; } -body.no-stems .tracks:not(:has(tr.nostem)) ~ .only-nostems { display: block; } +body.no-stems .tracks tbody tr:not(.nostem) { display: none; } +body.no-stems .tracks:not(:has(tbody tr.nostem)) ~ .only-nostems { display: block; } .seg.stemfilter { display: inline-flex; } .seg.stemfilter button { padding: 5px 10px; white-space: nowrap; } @@ -151,7 +185,7 @@ details summary { cursor: pointer; margin: 12px 0; } input[type=color] { width: 40px; height: 28px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; } .note { color: var(--muted); font-size: 13px; } -#drawer { width: 340px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 20px; } +#drawer { width: 320px; background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; padding: 22px 20px; } #drawer h2 { margin: 0 0 14px; } #drawer { display: flex; flex-direction: column; padding-top: 12px; } #drawer[hidden] { display: none; } @@ -202,32 +236,35 @@ input[type=color] { width: 40px; height: 28px; padding: 0; border: 1px solid var .q-item .x { color: var(--muted); font-size: 18px; padding: 0 4px; opacity: 0; } .q-item:hover .x { opacity: 1; } -#player { position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-h); background: var(--panel); - border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.6fr) minmax(180px, 1fr); align-items: center; gap: 20px; padding: 0 20px; } +#player { position: fixed; left: 0; right: 0; bottom: 0; height: var(--player-h); background: var(--bg); + border-top: 1px solid rgba(50, 50, 50, .7); display: grid; grid-template-columns: minmax(180px, 1fr) minmax(320px, 1.6fr) minmax(180px, 1fr); align-items: center; gap: 20px; padding: 0 20px; } #player.empty .center, #player.empty .right, #player.empty #b-queue { opacity: .35; pointer-events: none; } .left { display: flex; align-items: center; gap: 10px; min-width: 0; } #b-queue { flex: none; } .np { display: flex; gap: 12px; align-items: center; min-width: 0; } -#np-art { width: 58px; height: 58px; border-radius: 8px; object-fit: cover; background: var(--raised); flex: none; } +#np-art { width: 60px; height: 60px; border-radius: 4px; object-fit: cover; background: var(--raised); flex: none; } #np-art:not([src]) { display: none; } .np-text { min-width: 0; } -#np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +#np-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #np-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .center { display: grid; gap: 4px; } -.transport { display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 20px; } -.transport button { color: var(--text); } +.transport { display: flex; justify-content: center; align-items: center; gap: 20px; font-size: 18px; } +.transport button { color: #c5c5c5; } +.transport button:hover { color: #fff; } .transport .side { color: var(--muted); font-size: 17px; position: relative; } .transport .side.on { color: var(--accent); } .transport .side.on::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; } -.transport .play { width: 40px; height: 40px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 18px; } +.transport .play { width: 36px; height: 36px; border-radius: 50%; background: var(--text); color: var(--bg) !important; display: grid; place-items: center; font-size: 16px; transition: transform .1s; } +.transport .play:hover { transform: scale(1.06); } .transport .play.busy svg { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .seek { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; } .seek span:last-child { text-align: right; } #wave { width: 100%; height: 32px; cursor: pointer; display: block; } .right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; } -.pill { color: var(--muted); font-size: 18px; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; } -.pill.on { background: var(--raised); color: var(--accent); } +.pill { color: #c5c5c5; font-size: 18px; width: 34px; height: 34px; border-radius: 4px; display: grid; place-items: center; } +.pill:hover { color: #fff; } +.pill.on { color: var(--accent); } .pill { position: relative; } .pill.dot::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); } .np { cursor: pointer; } @@ -241,13 +278,17 @@ input[type=range] { accent-color: var(--accent); } #app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } #nav { flex-direction: row; overflow-x: auto; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); align-items: center; } .brand { padding: 0 8px 0 4px; } - #nav a { white-space: nowrap; } + #nav a { white-space: nowrap; overflow: visible; } + #nav a svg, .nav-h, #nav-pl { display: none; } + .settings-link { border-top: 0; padding-top: 7px !important; border-radius: 4px !important; } #search input { margin: 0; width: 120px; } #live { margin: 0; white-space: nowrap; } .settings { grid-template-columns: 1fr; } .toc { position: static; display: flex; flex-wrap: wrap; } .tracks .acts button { opacity: 1; } - .tracks .ti small { display: block; margin-left: 0; } + .tracks .al, .tracks .off { display: none; } + .tracks .n { width: 34px; } + .tracks th { top: -20px; } .settings-link { margin-top: 0; } #view { padding: 20px 16px 40px; } #drawer { position: fixed; inset: auto 0 var(--player-h) 0; width: auto; max-height: 60vh; border-left: 0; border-top: 1px solid var(--line); z-index: 5; } @@ -255,9 +296,12 @@ input[type=range] { accent-color: var(--accent); } .center { grid-column: 1 / -1; grid-row: 2; } .right #volume { display: none; } .stem { grid-template-columns: 78px 1fr 36px auto auto; gap: 6px; } - .hero { flex-direction: column; align-items: flex-start; } - .hero img { width: 160px; height: 160px; } - .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px 12px; } + .hero { margin: -20px -16px 0; padding: 32px 16px 20px; } + .hero-in { flex-direction: column; align-items: flex-start; gap: 18px; } + .hero .art, .hero .ph { width: 160px; height: 160px; } + .cplay { opacity: 1; transform: none; width: 36px; height: 36px; font-size: 14px; } + .grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; } + .card { padding: 6px; } } /* presets */ @@ -271,7 +315,7 @@ input[type=range] { accent-color: var(--accent); } .prow .btn.on { background: var(--accent); color: var(--accent-ink); } /* home */ -.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 16px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; } +.shelf { display: grid; grid-auto-flow: column; grid-auto-columns: 170px; gap: 4px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 20px; } .shelf.two { grid-template-rows: auto auto; } .stations { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; } .station { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 16px; border-radius: 12px; background: var(--raised); } @@ -294,3 +338,15 @@ input[type=number]#precachen { width: 64px; background: var(--raised); border: 1 /* about */ .people { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; } .person { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 12px; background: var(--raised); } + +/* toolbar shares its row with the filter/sort bar on wide screens */ +@media (min-width: 861px) { + .actions + .bar.sm { margin: -66px 0 12px auto; min-height: 52px; pointer-events: none; } + .actions + .bar.sm > * { pointer-events: auto; } +} +#volume { -webkit-appearance: none; appearance: none; height: 16px; background: none; cursor: pointer; } +#volume::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: #3c3f43; } +#volume::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4px; border-radius: 50%; background: #e7e7e7; border: 0; } +#volume::-moz-range-track { height: 4px; border-radius: 2px; background: #3c3f43; } +#volume::-moz-range-progress { height: 4px; border-radius: 2px; background: #cccccc; } +#volume::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #e7e7e7; border: 0; }