Fix search, branding, header centering, and card-based feed layout

- Search box now fills navbar center with max-width 400px
- Dropdown items have more padding (p-4) and hover contrast
- Branding uses cross-browser gradient text with visible tagline
- Navbar centers tabs + search together in navbar-center
- Feed redesigned as responsive card grid (cover-centered, details below)
- Cards show large cover art with aspect-ratio:1, fallback SVG on 404
- Artist name, title, type badge, and date positioned under cover
This commit is contained in:
2026-07-03 11:12:58 +02:00
parent d66b6e884f
commit 695d46259d
4 changed files with 75 additions and 81 deletions
@@ -1,5 +1,5 @@
{#if entries.isEmpty()}
<div class="bg-base-100 shadow-xl rounded-box p-10 text-center border border-base-300">
<div class="bg-base-100 shadow-xl rounded-box p-12 text-center border border-base-300">
<svg class="icon-lg" style="margin:0 auto 0.75rem;color:var(--bc);opacity:0.15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">
<circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/>
<path d="M9 18V5l12-2v13"/><path d="M9 9l12-2"/>
@@ -8,46 +8,40 @@
<p style="font-size:0.875rem;color:var(--bc);opacity:0.4;margin-top:0.25rem">Add artists to your collection to see their releases here</p>
</div>
{#else}
<div class="overflow-x-auto rounded-box border border-base-300">
<table class="table table-pin-rows">
<thead>
<tr style="background:color-mix(in srgb, var(--b2) 80%, transparent)">
<th style="width:5rem">Cover</th>
<th>Artist</th>
<th>Release</th>
<th>Type</th>
<th style="width:7rem">Date</th>
</tr>
</thead>
<tbody>
{#for entry in entries}
<tr style="transition:background 0.15s" onmouseover="this.style.background='color-mix(in srgb, var(--b2) 50%, transparent)'" onmouseout="this.style.background=''">
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer">
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250" alt="Cover" class="cover-img" loading="lazy" onerror="this.style.display='none'">
</a>
</td>
<td><span style="font-weight:500">{entry.artistName}</span></td>
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer" class="link link-hover" style="font-weight:500">
{entry.title}
</a>
</td>
<td>
{#if entry.primaryType == 'Album'}
<span class="badge badge-primary badge-sm">Album</span>
{#else if entry.primaryType == 'Single'}
<span class="badge badge-secondary badge-sm">Single</span>
{#else if entry.primaryType == 'EP'}
<span class="badge badge-accent badge-sm">EP</span>
{#else}
<span class="badge badge-ghost badge-sm">{entry.primaryType}</span>
{/if}
</td>
<td style="font-size:0.875rem;color:var(--bc);opacity:0.5">{entry.firstReleaseDate}</td>
</tr>
{/for}
</tbody>
</table>
<div style="display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:1rem">
{#for entry in entries}
<a href="https://musicbrainz.org/release-group/{entry.mbid}"
target="_blank" rel="noopener noreferrer"
class="bg-base-100 shadow-md rounded-box border border-base-300 overflow-hidden"
style="text-decoration:none;transition:transform 0.15s,box-shadow 0.15s;display:flex;flex-direction:column"
onmouseover="this.style.transform='translateY(-2px)';this.style.boxShadow='0 8px 24px rgba(0,0,0,0.2)'"
onmouseout="this.style.transform='';this.style.boxShadow=''">
<div style="aspect-ratio:1;overflow:hidden;background:var(--b2)">
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250"
alt="Cover for {entry.title}"
style="width:100%;height:100%;object-fit:cover;display:block"
loading="lazy"
onerror="this.parentElement.innerHTML='<div style=\'display:flex;align-items:center;justify-content:center;height:100%;color:var(--bc);opacity:0.15\'><svg width=\'48\' height=\'48\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'1.5\'><circle cx=\'6\' cy=\'18\' r=\'3\'/><circle cx=\'18\' cy=\'16\' r=\'3\'/><path d=\'M9 18V5l12-2v13\'/><path d=\'M9 9l12-2\'/></svg></div>'">
</div>
<div style="padding:0.65rem 0.75rem;flex:1;display:flex;flex-direction:column;gap:0.2rem">
<div style="font-size:0.75rem;font-weight:500;color:var(--bc);opacity:0.55;text-transform:uppercase;letter-spacing:0.05em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{entry.artistName}</div>
<div style="font-size:0.85rem;font-weight:600;color:var(--bc);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.3">{entry.title}</div>
<div style="margin-top:auto;padding-top:0.35rem;display:flex;align-items:center;gap:0.4rem;flex-wrap:wrap">
{#if entry.primaryType == 'Album'}
<span class="badge badge-primary badge-xs">Album</span>
{#else if entry.primaryType == 'Single'}
<span class="badge badge-secondary badge-xs">Single</span>
{#else if entry.primaryType == 'EP'}
<span class="badge badge-accent badge-xs">EP</span>
{#else}
<span class="badge badge-ghost badge-xs">{entry.primaryType}</span>
{/if}
{#if entry.firstReleaseDate}
<span style="font-size:0.7rem;color:var(--bc);opacity:0.45">{entry.firstReleaseDate}</span>
{/if}
</div>
</div>
</a>
{/for}
</div>
{/if}
@@ -1,18 +1,18 @@
<div class="bg-base-100 shadow-xl border border-base-300 rounded-box mt-1" style="max-height:18rem;overflow-y:auto">
<div class="bg-base-100 shadow-xl border border-base-300 rounded-box mt-1" style="max-height:24rem;overflow-y:auto">
{#if artists.isEmpty()}
<div class="p-4 text-sm text-center" style="color:var(--bc);opacity:0.5">No artists found</div>
<div class="p-6 text-sm text-center" style="color:var(--bc);opacity:0.5">No artists found</div>
{#else}
{#for artist in artists}
<div class="search-dropdown-item p-3 border-b border-base-200" style="display:flex;align-items:center;justify-content:space-between">
<div class="flex-1 min-w-0 mr-2">
<div style="display:flex;align-items:center;gap:0.5rem">
<span style="font-weight:600;font-size:0.875rem">{artist.name}</span>
<div class="p-4 border-b border-base-200 last:border-b-0" style="display:flex;align-items:center;justify-content:space-between;transition:background 0.15s" onmouseover="this.style.background='color-mix(in srgb, var(--p) 8%, transparent)'" onmouseout="this.style.background=''">
<div class="flex-1 min-w-0 mr-3">
<div style="display:flex;align-items:center;gap:0.5rem;margin-bottom:0.25rem">
<span style="font-weight:600;font-size:0.9rem">{artist.name}</span>
{#if artist.type}
<span class="badge badge-ghost badge-xs">{artist.type}</span>
{/if}
</div>
{#if artist.disambiguation}
<div style="font-size:0.75rem;color:var(--bc);opacity:0.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{artist.disambiguation}</div>
<div style="font-size:0.8rem;color:var(--bc);opacity:0.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:0.15rem">{artist.disambiguation}</div>
{/if}
{#if artist.area}
<div style="font-size:0.75rem;color:var(--bc);opacity:0.4">{artist.area}</div>
@@ -20,12 +20,13 @@
</div>
<div style="flex-shrink:0">
{#if artist.alreadyTracked}
<span class="badge badge-success badge-sm gap-1">
<span class="badge badge-success badge-sm gap-1" style="padding:0.3rem 0.6rem">
<svg class="icon-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><polyline points="20 6 9 17 4 12"/></svg>
Added
</span>
{#else}
<button class="btn btn-primary btn-xs"
<button class="btn btn-primary btn-sm"
style="min-height:0;height:2rem;padding:0 0.75rem"
hx-post="/api/artists/{artist.mbid}/track"
hx-target="#search-results"
hx-swap="innerHTML"