feat(now-playing): mount real waveform visualizer in NowPlaying card (mode C) + Fill container-sizing mode
Replace the 20 synthetic bars with a contained WaveformVisualizer driven by the live player, pointed at the current track; add a Fill mode (CSS-only, defaults off) sizing the canvas to its container; place the lava-lamp icon to popover on the card.
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
@keyframes wave-dance {
|
||||
from { height: var(--h-lo, 4px); }
|
||||
to { height: var(--h-hi, 20px); }
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0.3; }
|
||||
@@ -51,22 +46,25 @@
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
.waveform-bars {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
/* Contained visualizer region (Phase 12 mode C). The visualizer mounts with Fill="true", whose
|
||||
layer is `position: absolute; inset: 0` — so this box must be a positioned, sized ancestor for the
|
||||
canvas to fill. `overflow: hidden` keeps the lava inside the card's rounded chrome. The height is the
|
||||
card's bounded live readout — taller than the old synthetic-bar strip so the real waveform reads, but
|
||||
still compact for a home-page hero panel. */
|
||||
.np-visualizer {
|
||||
position: relative;
|
||||
height: 120px;
|
||||
margin-top: 1.2rem;
|
||||
}
|
||||
|
||||
.waveform-bar {
|
||||
width: 3px;
|
||||
background: var(--deepdrft-green-accent);
|
||||
overflow: hidden;
|
||||
border-radius: 2px;
|
||||
animation: wave-dance var(--dur, 1s) ease-in-out infinite alternate;
|
||||
}
|
||||
|
||||
.waveform-placeholder {
|
||||
margin-top: 1.2rem;
|
||||
height: 1px;
|
||||
background: rgba(250, 250, 248, 0.12);
|
||||
}
|
||||
/* The lava-lamp popover trigger overlays the visualizer's top-right corner (full parity, §8e). Above
|
||||
the canvas (z-index) and pointer-enabled so the icon is clickable even though the canvas layer below
|
||||
it is pointer-events:none. */
|
||||
.np-visualizer-controls {
|
||||
position: absolute;
|
||||
top: 0.25rem;
|
||||
right: 0.25rem;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user