mirror of
https://github.com/narrrl/pl8list-rewind.git
synced 2026-11-04 00:46:59 +01:00
Redesign the bar, sheets and cards, and add likes queue, history and sleep timer
Feed modes move into tabs in the bar; likes, history, filters and settings, and account open as one kind of sheet: a drawer on wide screens, a bottom sheet with a drag handle on phones, with a scrim, Esc, a focus trap and focus restore. Cards get an artist avatar, follow and radio pills, a "new" chip, counts under round action buttons, an up-next pill and a redrawn waveform with rounded bars, a reflection and the buffered range. The start overlay names the track behind a big round play button. New: undo on dislike, a searchable likes list that plays as a queue (in order or shuffled), a local history of what played, deep links to a track (?t=handle/slug), a sleep timer, adjustable crossfade, bass boost, wheel up (w or a long press on the drop) and more keys.
This commit is contained in:
1 parent
53ac54b178
commit
62b28bd30e
10 files changed
+1312
-339
No files matched your search
+385
-110
@@ -57,48 +57,89 @@ button {
|
||||
|
||||
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
|
||||
|
||||
/* Header and panels ------------------------------------------------------ */
|
||||
/* Header ----------------------------------------------------------------- */
|
||||
|
||||
#bar {
|
||||
position: fixed;
|
||||
inset: 0 0 auto 0;
|
||||
z-index: 10;
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr auto 1fr;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.6rem 1rem;
|
||||
padding-top: max(0.6rem, env(safe-area-inset-top));
|
||||
background: linear-gradient(#000c, #0000);
|
||||
}
|
||||
body.zen #bar { display: none; }
|
||||
|
||||
.logo { font-weight: 600; margin-right: auto; display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap; }
|
||||
.logo { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap; justify-self: start; }
|
||||
.logo b { color: var(--accent); font-weight: 700; }
|
||||
.logo svg { width: 1.3em; height: 1.3em; color: var(--accent); flex: none; }
|
||||
#stats { color: var(--muted); font-size: 0.8rem; }
|
||||
#help-btn { width: 2.2em; padding: 0.35em 0; }
|
||||
#volume { display: flex; align-items: center; gap: 0.3rem; }
|
||||
#mute-btn { width: 2.2em; padding: 0.35em 0; display: grid; place-items: center; }
|
||||
#mute-btn svg { width: 1.1em; height: 1.1em; }
|
||||
#volume-slider { width: 5.5rem; accent-color: var(--accent); cursor: pointer; }
|
||||
#account-btn { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.bar-end { justify-self: end; display: flex; align-items: center; gap: 0.4rem; }
|
||||
|
||||
/* Feed modes as segmented tabs, the middle of the bar. */
|
||||
#mode-tabs {
|
||||
display: flex;
|
||||
gap: 0.2rem;
|
||||
padding: 0.2rem;
|
||||
border-radius: 999px;
|
||||
background: var(--glass);
|
||||
backdrop-filter: blur(12px);
|
||||
}
|
||||
#mode-tabs button {
|
||||
border: none;
|
||||
background: none;
|
||||
padding: 0.35em 0.95em;
|
||||
font-size: 0.85rem;
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
transition: background var(--fast), color var(--fast);
|
||||
}
|
||||
#mode-tabs button:hover { color: var(--fg); }
|
||||
#mode-tabs button[aria-pressed="true"] { background: var(--fg); color: #000; font-weight: 600; }
|
||||
|
||||
.icon-btn {
|
||||
width: 2.3rem;
|
||||
height: 2.3rem;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: none;
|
||||
background: var(--glass);
|
||||
transition: background var(--fast);
|
||||
}
|
||||
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--glass-strong); }
|
||||
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
|
||||
#filters-btn { position: relative; }
|
||||
#filters-btn.active::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 0.45em;
|
||||
height: 0.45em;
|
||||
margin-left: 0.4em;
|
||||
position: absolute;
|
||||
top: 0.35rem;
|
||||
right: 0.35rem;
|
||||
width: 0.45rem;
|
||||
height: 0.45rem;
|
||||
border-radius: 50%;
|
||||
background: var(--accent);
|
||||
vertical-align: middle;
|
||||
}
|
||||
#bar button[aria-expanded="true"] { background: rgba(255, 255, 255, 0.22); }
|
||||
.avatar-btn {
|
||||
width: 2.3rem;
|
||||
height: 2.3rem;
|
||||
padding: 0;
|
||||
border: 2px solid #fff3;
|
||||
font-weight: 700;
|
||||
color: #000;
|
||||
}
|
||||
#volume { display: flex; align-items: center; gap: 0.3rem; margin-right: 0.3rem; }
|
||||
#volume-slider { width: 5.5rem; accent-color: var(--accent); cursor: pointer; }
|
||||
#mode-chip {
|
||||
max-width: 14rem;
|
||||
max-width: 16rem;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.45em;
|
||||
padding-left: 0.3em;
|
||||
white-space: nowrap;
|
||||
border: none;
|
||||
background: color-mix(in oklab, var(--accent) 40%, transparent);
|
||||
}
|
||||
#mode-chip .chip-label { overflow: hidden; text-overflow: ellipsis; }
|
||||
@@ -112,71 +153,202 @@ button {
|
||||
font-size: 0.8em;
|
||||
background: #0006 center / cover no-repeat;
|
||||
}
|
||||
.chip-avatar svg { width: 0.9em; height: 0.9em; color: var(--accent); }
|
||||
|
||||
.panel {
|
||||
/* Sheets (sheet.ts): a drawer on the right, a bottom sheet on phones. ------- */
|
||||
|
||||
.scrim {
|
||||
position: fixed;
|
||||
z-index: 11;
|
||||
top: calc(3rem + env(safe-area-inset-top));
|
||||
right: 1rem;
|
||||
inset: 0;
|
||||
z-index: 24;
|
||||
background: #0008;
|
||||
backdrop-filter: blur(2px);
|
||||
animation: fade 0.2s ease;
|
||||
}
|
||||
.sheet {
|
||||
position: fixed;
|
||||
z-index: 25;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
width: min(26rem, 100vw);
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
padding: 1.2rem 1.3rem;
|
||||
padding-top: max(1.2rem, env(safe-area-inset-top));
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: var(--radius-m);
|
||||
padding: 0.8rem 1rem;
|
||||
border-left: 1px solid var(--line-strong);
|
||||
box-shadow: var(--shadow);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.9rem;
|
||||
animation: drawer 0.3s var(--ease-out);
|
||||
}
|
||||
.sheet:focus-visible { outline: none; }
|
||||
@keyframes drawer { from { transform: translateX(100%); } }
|
||||
.sheet-handle { display: none; }
|
||||
.sheet h2 { margin: 0; font: 800 1.25rem/1.2 var(--font-display); }
|
||||
.sheet fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 0.6rem; }
|
||||
.sheet legend, .sheet h3 {
|
||||
padding: 0;
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
#sleep-left { text-transform: none; letter-spacing: 0; color: var(--accent); }
|
||||
.sheet-actions { display: flex; align-items: center; gap: 1rem; }
|
||||
.sheet-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
|
||||
.sheet-tools input[type=search] {
|
||||
flex: 1 1 10rem;
|
||||
min-width: 0;
|
||||
padding: 0.55em 0.9em;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--line-strong);
|
||||
background: #111;
|
||||
}
|
||||
|
||||
#filters { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; max-width: 24rem; }
|
||||
.modes { display: flex; gap: 0.4rem; flex-wrap: wrap; flex-basis: 100%; margin: 0; padding: 0; border: 0; }
|
||||
.modes legend { color: var(--muted); font-size: 0.8rem; padding: 0; margin-bottom: 0.3rem; }
|
||||
.modes { flex-direction: row !important; flex-wrap: wrap; gap: 0.4rem !important; }
|
||||
.modes legend { flex-basis: 100%; }
|
||||
.modes label { cursor: pointer; }
|
||||
.modes input { position: absolute; opacity: 0; }
|
||||
.modes input { position: absolute; opacity: 0; pointer-events: none; }
|
||||
.modes label:has(input) {
|
||||
padding: 0.25em 0.8em;
|
||||
padding: 0.3em 0.9em;
|
||||
border-radius: 999px;
|
||||
border: 1px solid #ffffff40;
|
||||
font-size: 0.85rem;
|
||||
transition: background var(--fast);
|
||||
}
|
||||
.modes label:has(input:checked) { background: var(--accent); border-color: transparent; color: #000; }
|
||||
.modes label:has(input:checked) { background: var(--accent); border-color: transparent; color: #000; font-weight: 600; }
|
||||
.modes label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
#filters input[type=number] {
|
||||
width: 4.5em;
|
||||
background: #222;
|
||||
border: 1px solid #444;
|
||||
border-radius: 6px;
|
||||
padding: 0.2em 0.4em;
|
||||
}
|
||||
|
||||
#likes { width: min(26rem, calc(100vw - 2rem)); max-height: 70vh; overflow: auto; }
|
||||
#likes h2 { margin: 0 0 0.5rem; font-size: 1rem; }
|
||||
#likes ol { margin: 0; padding: 0; list-style: none; }
|
||||
#likes li {
|
||||
/* A checkbox drawn as a switch. */
|
||||
.switch { display: flex; align-items: center; gap: 0.7rem; cursor: pointer; }
|
||||
.switch input {
|
||||
appearance: none;
|
||||
flex: none;
|
||||
width: 2.6rem;
|
||||
height: 1.5rem;
|
||||
margin: 0;
|
||||
border-radius: 999px;
|
||||
background: #ffffff26;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
transition: background var(--fast);
|
||||
}
|
||||
.switch input::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0.2rem;
|
||||
left: 0.2rem;
|
||||
width: 1.1rem;
|
||||
height: 1.1rem;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
transition: transform 0.2s var(--ease-out);
|
||||
}
|
||||
.switch input:checked { background: var(--accent); }
|
||||
.switch input:checked::after { transform: translateX(1.1rem); }
|
||||
.switch.small input { transform: scale(0.85); }
|
||||
|
||||
/* The BPM range: two sliders on one track; --lo and --hi come from main.ts. */
|
||||
.bpm-head { display: flex; justify-content: space-between; font-size: 0.9rem; }
|
||||
.bpm-head output { color: var(--accent); font-weight: 600; }
|
||||
.range2 {
|
||||
--lo: 0%;
|
||||
--hi: 100%;
|
||||
position: relative;
|
||||
height: 1.6rem;
|
||||
margin: 0.2rem 0;
|
||||
}
|
||||
.range2::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 50% 0 auto;
|
||||
height: 4px;
|
||||
margin-top: -2px;
|
||||
border-radius: 2px;
|
||||
background: linear-gradient(90deg, #ffffff26 var(--lo), var(--accent) var(--lo) var(--hi), #ffffff26 var(--hi));
|
||||
}
|
||||
.range2 input {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
appearance: none;
|
||||
background: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
.range2 input::-webkit-slider-thumb {
|
||||
appearance: none;
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 45%, transparent);
|
||||
pointer-events: auto;
|
||||
cursor: grab;
|
||||
}
|
||||
.range2 input::-moz-range-thumb {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 45%, transparent);
|
||||
pointer-events: auto;
|
||||
cursor: grab;
|
||||
}
|
||||
.presets { display: flex; gap: 0.4rem; }
|
||||
.presets button { font-size: 0.8rem; padding: 0.25em 0.8em; }
|
||||
.presets button[aria-pressed="true"] { background: var(--accent); border-color: transparent; color: #fff; }
|
||||
|
||||
/* Likes and history: artwork that plays, title, artist. */
|
||||
.track-list { margin: 0; padding: 0; list-style: none; color: var(--muted); }
|
||||
.track-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.35rem 0;
|
||||
gap: 0.75rem;
|
||||
padding: 0.45rem 0;
|
||||
border-bottom: 1px solid #ffffff10;
|
||||
animation: fade 0.3s ease;
|
||||
}
|
||||
#likes li:last-child { border-bottom: none; }
|
||||
#likes li .meta { min-width: 0; flex: 1; }
|
||||
#likes li .meta a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
|
||||
#likes li .meta a:hover { text-decoration: underline; }
|
||||
#likes li .meta span { color: var(--muted); font-size: 0.8rem; }
|
||||
#likes li .play-now {
|
||||
.track-row:last-child { border-bottom: none; }
|
||||
.track-row .meta { min-width: 0; flex: 1; }
|
||||
.track-row .meta a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--fg); }
|
||||
.track-row .meta a:hover { text-decoration: underline; }
|
||||
.track-row .meta span { font-size: 0.8rem; }
|
||||
.row-play {
|
||||
flex: none;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
position: relative;
|
||||
width: 2.8rem;
|
||||
height: 2.8rem;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: var(--radius-s);
|
||||
background: #222 center / cover no-repeat;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
overflow: hidden;
|
||||
}
|
||||
#likes li .play-now svg { width: 0.9rem; height: 0.9rem; }
|
||||
.row-play::before { content: ""; position: absolute; inset: 0; background: #0006; opacity: 0; transition: opacity var(--fast); }
|
||||
.row-play svg { position: relative; width: 1rem; height: 1rem; opacity: 0; transition: opacity var(--fast); }
|
||||
.row-play:hover::before, .row-play:focus-visible::before, .row-play:hover svg, .row-play:focus-visible svg { opacity: 1; }
|
||||
@media not ((hover: hover) and (pointer: fine)) {
|
||||
.row-play::before { opacity: 0.6; }
|
||||
.row-play svg { opacity: 1; }
|
||||
}
|
||||
.row-unlike { flex: none; color: var(--accent); background: none; }
|
||||
.row-unlike:hover { background: var(--glass); }
|
||||
|
||||
#account { width: min(20rem, calc(100vw - 2rem)); display: flex; flex-direction: column; align-items: flex-start; gap: 0.7rem; }
|
||||
#account h2 { margin: 0; font-size: 1rem; }
|
||||
#account { align-items: flex-start; }
|
||||
#stats { margin: -0.5rem 0 0; color: var(--muted); font-size: 0.8rem; }
|
||||
#account a { font-size: 0.85rem; color: var(--muted); }
|
||||
#sync { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
|
||||
padding-bottom: 0.7rem; border-bottom: 1px solid #ffffff14; }
|
||||
#sync h3 { margin: 0; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
|
||||
padding-bottom: 0.9rem; border-bottom: 1px solid #ffffff14; }
|
||||
#sync h3 { margin: 0; }
|
||||
#sync-status { margin: 0; font-size: 0.85rem; color: var(--muted); }
|
||||
#sync-status.on::before { content: "● "; color: #3ddc84; }
|
||||
#delete-form { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
|
||||
@@ -361,17 +533,35 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
color: color-mix(in oklab, var(--card-accent) 70%, #fff);
|
||||
}
|
||||
.why:empty { display: none; }
|
||||
.byline { display: flex; align-items: center; gap: 0.6rem; }
|
||||
.artist { color: var(--muted); text-decoration: none; }
|
||||
.artist:hover { text-decoration: underline; }
|
||||
.follow, .radio {
|
||||
.byline { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
|
||||
.artist-avatar {
|
||||
flex: none;
|
||||
width: 1.6rem;
|
||||
height: 1.6rem;
|
||||
border-radius: 50%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 0.75rem;
|
||||
padding: 0.15em 0.75em;
|
||||
font-weight: 700;
|
||||
background: var(--card-accent) center / cover no-repeat;
|
||||
box-shadow: 0 0 0 2px #0008;
|
||||
}
|
||||
.artist { color: var(--fg); font-weight: 600; text-decoration: none; }
|
||||
.artist:hover { text-decoration: underline; }
|
||||
.pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.3em;
|
||||
font-size: 0.75rem;
|
||||
padding: 0.2em 0.75em 0.2em 0.55em;
|
||||
border-radius: 999px;
|
||||
border: 1px solid #ffffff40;
|
||||
background: transparent;
|
||||
transition: background var(--fast), border-color var(--fast);
|
||||
}
|
||||
.follow.on { background: #ffffff1f; border-color: transparent; color: var(--muted); }
|
||||
.pill svg { width: 0.95em; height: 0.95em; }
|
||||
.pill:hover { background: var(--glass); }
|
||||
.follow.on { background: color-mix(in oklab, var(--card-accent) 25%, transparent); border-color: transparent; }
|
||||
|
||||
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
|
||||
.chips span {
|
||||
@@ -381,6 +571,7 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
.chips .free { background: #1f7a4d; }
|
||||
.chips .new { background: var(--fg); color: #000; font-weight: 700; }
|
||||
.chips span:first-child { background: color-mix(in oklab, var(--card-accent) 35%, transparent); }
|
||||
.chips .preview { background: #6a4b16; }
|
||||
.chips .tag { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--card-accent) 60%, transparent); }
|
||||
@@ -412,34 +603,49 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
transition: opacity 0.1s;
|
||||
}
|
||||
.wave-wrap.hover .wave-tip { opacity: 1; }
|
||||
.time { width: 100%; display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; }
|
||||
.counts { color: var(--muted); font-size: 0.8rem; }
|
||||
.time { width: 100%; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
|
||||
.counts { opacity: 0.8; }
|
||||
|
||||
.actions {
|
||||
position: absolute;
|
||||
right: 0.8rem;
|
||||
bottom: 18vh;
|
||||
bottom: 16vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.9rem;
|
||||
gap: 0.7rem;
|
||||
}
|
||||
.actions > * {
|
||||
/* A round button with a small count or label under it. */
|
||||
.act {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.2rem;
|
||||
padding: 0;
|
||||
border: none;
|
||||
background: none;
|
||||
border-radius: 0;
|
||||
text-decoration: none;
|
||||
font-size: 0.7rem;
|
||||
color: var(--fg);
|
||||
}
|
||||
.act .ring {
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
background: rgba(255, 255, 255, 0.12);
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
padding: 0;
|
||||
transition: background 0.15s, transform 0.15s;
|
||||
backdrop-filter: blur(8px);
|
||||
transition: background var(--fast), transform var(--fast);
|
||||
}
|
||||
.actions > *:hover { background: rgba(255, 255, 255, 0.2); }
|
||||
.actions > *:active { transform: scale(0.9); }
|
||||
.actions svg { width: 1.3rem; height: 1.3rem; }
|
||||
.actions .like.on { color: var(--card-accent); background: color-mix(in oklab, var(--card-accent) 22%, transparent); }
|
||||
.actions .like.pop svg { animation: pop 0.35s ease; }
|
||||
.act:hover .ring { background: rgba(255, 255, 255, 0.2); }
|
||||
.act:active .ring { transform: scale(0.9); }
|
||||
.act .n { text-shadow: 0 1px 4px #000; min-height: 1em; }
|
||||
.act svg { width: 1.3rem; height: 1.3rem; }
|
||||
.act.like.on .ring { color: var(--card-accent); background: color-mix(in oklab, var(--card-accent) 22%, transparent); }
|
||||
.act.like.pop svg { animation: pop 0.35s ease; }
|
||||
.act.like.pop .ring { animation: ring-out 0.5s ease-out; }
|
||||
@keyframes ring-out { from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--card-accent) 70%, transparent); } to { box-shadow: 0 0 0 1rem transparent; } }
|
||||
@keyframes pop { 50% { transform: scale(1.4); } }
|
||||
|
||||
/* Feedback overlays ------------------------------------------------------ */
|
||||
@@ -487,7 +693,8 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
position: fixed;
|
||||
z-index: 40;
|
||||
left: 50%;
|
||||
bottom: max(2rem, env(safe-area-inset-bottom));
|
||||
/* Above the up-next pill. */
|
||||
bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 3.4rem);
|
||||
transform: translate(-50%, 1rem);
|
||||
padding: 0.6em 1.1em;
|
||||
border-radius: 999px;
|
||||
@@ -502,6 +709,47 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
#toast.show { opacity: 1; transform: translate(-50%, 0); }
|
||||
#toast.has-action { pointer-events: auto; display: flex; align-items: center; gap: 0.8rem; }
|
||||
#toast button { border: none; padding: 0.2em 0.7em; background: var(--fg); color: #000; font-weight: 700; font-size: 0.8rem; }
|
||||
#toast:not(.show) button { pointer-events: none; }
|
||||
|
||||
/* What plays next, at the bottom; a tap skips to it. */
|
||||
#up-next {
|
||||
position: fixed;
|
||||
z-index: 6;
|
||||
left: 50%;
|
||||
bottom: max(1rem, env(safe-area-inset-bottom));
|
||||
transform: translateX(-50%);
|
||||
max-width: min(24rem, calc(100vw - 2rem));
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.3rem 0.9rem 0.3rem 0.3rem;
|
||||
border: none;
|
||||
background: #0008;
|
||||
backdrop-filter: blur(12px);
|
||||
text-align: left;
|
||||
animation: rise 0.35s var(--ease-out);
|
||||
opacity: 0.85;
|
||||
transition: opacity var(--fast);
|
||||
}
|
||||
#up-next:hover { opacity: 1; }
|
||||
.up-next-avatar {
|
||||
flex: none;
|
||||
width: 2rem;
|
||||
height: 2rem;
|
||||
border-radius: 50%;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 700;
|
||||
background: #222 center / cover no-repeat;
|
||||
}
|
||||
.up-next-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
|
||||
.up-next-text small { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
|
||||
.up-next-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; }
|
||||
#up-next > svg { flex: none; width: 1rem; height: 1rem; color: var(--muted); }
|
||||
body.zen #up-next { display: none; }
|
||||
|
||||
#feed-status {
|
||||
position: fixed;
|
||||
@@ -529,7 +777,22 @@ button.danger:not(.link) { background: var(--accent); border: none; color: #fff;
|
||||
background: var(--scrim);
|
||||
cursor: pointer;
|
||||
}
|
||||
#start button { font-size: 1.3rem; padding: 0.7em 1.6em; background: var(--accent); border: none; color: #fff; }
|
||||
.start-play {
|
||||
width: 6rem;
|
||||
height: 6rem;
|
||||
padding: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
border: none;
|
||||
background: var(--accent);
|
||||
color: #000;
|
||||
box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 60%, transparent);
|
||||
animation: beckon 1.8s ease-out infinite;
|
||||
}
|
||||
.start-play svg { width: 2.6rem; height: 2.6rem; margin-left: 0.3rem; }
|
||||
@keyframes beckon { to { box-shadow: 0 0 0 2rem transparent; } }
|
||||
.start-track { margin: 0.4rem 0 0; font-weight: 700; font-size: 1.1rem; text-align: center; padding: 0 1rem; }
|
||||
.start-hint { margin: 0; color: var(--muted); font-size: 0.85rem; }
|
||||
|
||||
/* Radio sheet: a bottom sheet on phones, a centred box elsewhere. */
|
||||
#station {
|
||||
@@ -621,6 +884,7 @@ button.primary {
|
||||
gap: 0.4em;
|
||||
}
|
||||
button.primary svg { width: 1em; height: 1em; }
|
||||
button.primary:disabled { opacity: 0.35; cursor: default; }
|
||||
|
||||
/* The end of an artist radio, over its last card. */
|
||||
#radio-end {
|
||||
@@ -643,25 +907,8 @@ button.primary svg { width: 1em; height: 1em; }
|
||||
}
|
||||
#radio-end p { flex-basis: 100%; margin: 0 0 0.3rem; color: var(--muted); font-size: 0.9rem; }
|
||||
|
||||
#help {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 25;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 1rem;
|
||||
background: var(--scrim);
|
||||
animation: fade 0.2s ease;
|
||||
}
|
||||
@keyframes fade { from { opacity: 0; } }
|
||||
.help-box {
|
||||
width: min(22rem, 100%);
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--line-strong);
|
||||
border-radius: var(--radius-l);
|
||||
padding: 1.2rem 1.4rem;
|
||||
}
|
||||
.help-box h2 { margin: 0 0 0.8rem; font-size: 1.1rem; }
|
||||
.help-box h2 { margin: 0 0 0.8rem; }
|
||||
.help-box dl { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1rem; margin: 0; }
|
||||
.help-box dt { font-family: ui-monospace, monospace; font-size: 0.85rem; color: var(--accent); }
|
||||
.help-box dd { margin: 0; }
|
||||
@@ -720,30 +967,58 @@ button.primary svg { width: 1em; height: 1em; }
|
||||
/* Phones ----------------------------------------------------------------- */
|
||||
|
||||
@media (max-width: 640px) {
|
||||
#stats { display: none; }
|
||||
#bar { gap: 0.4rem; padding-left: 0.7rem; padding-right: 0.7rem; }
|
||||
#bar button { padding: 0.3em 0.7em; font-size: 0.85rem; }
|
||||
#help-btn { display: none; }
|
||||
/* Logo and buttons on one row, the feed tabs on their own below. */
|
||||
#bar { grid-template-columns: 1fr auto; gap: 0.5rem 0.4rem; padding-left: 0.7rem; padding-right: 0.7rem; }
|
||||
#mode-tabs, #mode-chip { grid-column: 1 / -1; grid-row: 2; justify-self: center; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
|
||||
/* Phones have volume buttons; the bar has no room. */
|
||||
#volume { display: none; }
|
||||
#account-btn { max-width: 6.5rem; }
|
||||
.panel { left: 0.7rem; right: 0.7rem; }
|
||||
.logo-pl8 { display: none; }
|
||||
#station { place-items: end stretch; padding: 0; }
|
||||
.station-box { width: 100%; border-radius: var(--radius-l) var(--radius-l) 0 0; padding-bottom: max(1.4rem, env(safe-area-inset-bottom)); }
|
||||
#mode-chip { max-width: 9rem; }
|
||||
.logo-pl8 { display: none; }
|
||||
/* A station chip says more than the logo; there is no room for both. */
|
||||
#bar:has(#mode-chip:not([hidden])) .logo { display: none; }
|
||||
#likes { width: auto; }
|
||||
.content { width: calc(100vw - 2rem); margin-bottom: 4.5rem; }
|
||||
.sheet {
|
||||
top: auto;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-height: 85dvh;
|
||||
border-left: none;
|
||||
border-top: 1px solid var(--line-strong);
|
||||
border-radius: var(--radius-l) var(--radius-l) 0 0;
|
||||
padding-top: 0.4rem;
|
||||
padding-bottom: max(1.2rem, env(safe-area-inset-bottom));
|
||||
animation-name: sheet-up;
|
||||
transition: transform 0.25s var(--ease-out);
|
||||
}
|
||||
.sheet.dragging { transition: none; }
|
||||
@keyframes sheet-up { from { transform: translateY(100%); } }
|
||||
.sheet-handle {
|
||||
display: block;
|
||||
flex: none;
|
||||
align-self: stretch;
|
||||
height: 1.6rem;
|
||||
margin: 0 -1.3rem -0.4rem;
|
||||
touch-action: none;
|
||||
cursor: grab;
|
||||
}
|
||||
.sheet-handle::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 2.6rem;
|
||||
height: 0.3rem;
|
||||
margin: 0.55rem auto 0;
|
||||
border-radius: 999px;
|
||||
background: #fff5;
|
||||
}
|
||||
.content { width: calc(100vw - 2rem); margin-bottom: 5.5rem; }
|
||||
.actions {
|
||||
right: auto;
|
||||
left: 50%;
|
||||
bottom: max(1.2rem, env(safe-area-inset-bottom));
|
||||
bottom: max(0.8rem, env(safe-area-inset-bottom));
|
||||
transform: translateX(-50%);
|
||||
flex-direction: row;
|
||||
gap: 0.9rem;
|
||||
gap: 0.7rem;
|
||||
}
|
||||
#up-next { bottom: calc(max(0.8rem, env(safe-area-inset-bottom)) + 4.6rem); }
|
||||
#toast { bottom: calc(max(0.8rem, env(safe-area-inset-bottom)) + 8rem); }
|
||||
}
|
||||
|
||||
/* Zen: nothing but the drop, bigger, and the music. */
|
||||
|
||||
Reference in new issue
Block a user