themes-y2k/blocks/waveform_player.ninjatpl
Alex Dunmow b05ecf145d fix(y2k): remediate home whitespace + mobile responsiveness
- discography: kill the ballooning empty-media box — compact fixed-height
  chrome tile placeholder instead of a full aspect-square gray void, and
  a real CSS media-query grid (.y2k-grid-records: 1/2/4 cols) so column
  count no longer depends on the host Tailwind having scanned this persona
  template (it stuck at 2 cols at 1440px, making each empty square huge).
- landing: header absolute top-0 -> sticky top-0 (matches every other
  page template) so the audio bar no longer collides with / underlaps
  the navbar.
- waveform_player: constrain to a centered max-w-4xl column with section
  padding (was edge-to-edge full-bleed) and stack on phones.
- headings: remove the wide primary text-shadow halo that read as a stray
  render artifact behind every heading; tone the chrome shimmer to a faint
  glint. All colours stay semantic hsl(var(--token)).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 17:16:40 +08:00

18 lines
1.4 KiB
Plaintext

{% if audioUrl or trackTitle %}<section class="py-8 bg-background" data-block-key="y2k:waveform_player">
<div class="mx-auto max-w-4xl px-4">
<figure class="y2k-bevel y2k-chrome-bg rounded-xl overflow-hidden flex flex-col gap-4 p-4 sm:flex-row sm:items-stretch">
<div class="w-20 h-20 shrink-0 y2k-image-frame overflow-hidden bg-muted">
{% if coverImage %}{% img coverImage alt=trackTitle class="w-full h-full object-cover" %}{% else %}<span class="flex h-full w-full items-center justify-center text-muted-foreground"><svg class="h-8 w-8" aria-hidden="true"><use href="/icons/lucide.svg#music"></use></svg></span>{% endif %}
</div>
<div class="flex-1 min-w-0 flex flex-col justify-between gap-2">
<figcaption class="flex flex-wrap items-baseline justify-between gap-x-3 gap-y-1 min-w-0">
<span class="y2k-heading text-base truncate text-foreground">{{ trackTitle|default:"untitled track" }}</span>
{% if artist %}<span class="y2k-mono text-xs uppercase tracking-wider text-muted-foreground shrink-0">{{ artist }}</span>{% endif %}
</figcaption>
<div class="w-full h-12 y2k-waveform" aria-hidden="true"></div>
{% if audioUrl %}<audio controls preload="none" class="w-full" src="{{ audioUrl }}">Your browser does not support the audio element.</audio>{% else %}<p class="y2k-mono text-xs text-muted-foreground">No audio source set yet.</p>{% endif %}
</div>
</figure>
</div>
</section>{% endif %}