Fix background hierarchy: body --b1 (lightest), navbar+cards idle --b2, cards hover --b3 (darkest)

This commit is contained in:
2026-07-03 12:39:43 +02:00
parent b6e57db54b
commit ba2db960c6
4 changed files with 30 additions and 34 deletions
@@ -1,39 +1,33 @@
<div class="bg-base-200 shadow-xl border border-base-300 rounded-box mt-1" style="max-height:24rem;overflow-y:auto">
<div style="background:var(--b2);border:1px solid var(--b3);border-radius:0.5rem;box-shadow:0 8px 24px rgba(0,0,0,0.2);margin-top:0.25rem;max-height:24rem;overflow-y:auto">
{#if artists.isEmpty()}
<div class="p-6 text-sm text-center" style="color:var(--bc);opacity:0.5">No artists found</div>
<div style="padding:1rem;text-align:center;font-size:0.875rem;color:var(--bc);opacity:0.5">No artists found</div>
{#else}
{#for artist in artists}
<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">
<div style="display:flex;align-items:center;justify-content:space-between;padding:0.75rem 1rem;border-bottom:1px solid var(--b3);transition:background 0.1s"
onmouseover="this.style.background='var(--b3)'" onmouseout="this.style.background=''">
<div style="flex:1;min-width:0;margin-right:0.5rem">
<div style="display:flex;align-items:center;gap:0.5rem">
<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.8rem;color:var(--bc);opacity:0.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-bottom:0.15rem">{artist.disambiguation}</div>
<div style="font-size:0.8rem;color:var(--bc);opacity:0.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:0.1rem">{artist.disambiguation}</div>
{/if}
{#if artist.area}
<div style="font-size:0.75rem;color:var(--bc);opacity:0.4">{artist.area}</div>
<div style="font-size:0.75rem;color:var(--bc);opacity:0.4;margin-top:0.1rem">{artist.area}</div>
{/if}
</div>
<div style="flex-shrink:0">
{#if artist.alreadyTracked}
<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>
<span class="badge badge-success badge-sm">✓ Added</span>
{#else}
<button class="btn btn-primary btn-sm"
style="min-height:0;height:2rem;padding:0 0.75rem"
<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"
onclick="document.getElementById('search-input').value=''">
<svg class="icon-xs" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
Add
</button>
onclick="document.getElementById('search-input').value=''">+ Add</button>
{/if}
</div>
</div>