Fix background hierarchy: body --b1 (lightest), navbar+cards idle --b2, cards hover --b3 (darkest)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<div id="artist-list" hx-swap-oob="true">
|
||||
{#if artists.isEmpty()}
|
||||
<div class="bg-base-100 shadow-xl rounded-box p-10 text-center border border-base-300">
|
||||
<div style="background:var(--b2);border:1px solid var(--b3);border-radius:0.5rem;padding:2.5rem;text-align:center">
|
||||
<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">
|
||||
<path d="M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z"/>
|
||||
</svg>
|
||||
|
||||
@@ -1,23 +1,25 @@
|
||||
{#if entries.isEmpty()}
|
||||
<div class="card bg-base-200 shadow-xl p-12 text-center border border-base-300">
|
||||
<p class="text-lg text-base-content/60">No releases found</p>
|
||||
<p class="text-sm text-base-content/40 mt-2">Add artists to your collection to see their releases here</p>
|
||||
<div style="background:var(--b2);border:1px solid var(--b3);border-radius:0.5rem;padding:3rem;text-align:center">
|
||||
<p style="font-size:1.125rem;color:var(--bc);opacity:0.6">No releases found</p>
|
||||
<p style="font-size:0.875rem;color:var(--bc);opacity:0.4;margin-top:0.5rem">Add artists to your collection to see their releases here</p>
|
||||
</div>
|
||||
{#else}
|
||||
<div class="flex flex-col gap-6">
|
||||
<div style="display:flex;flex-direction:column;gap:1.5rem">
|
||||
{#for entry in entries}
|
||||
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer"
|
||||
class="card card-side bg-base-200 border border-base-300 hover:bg-base-300 transition-colors shadow-sm overflow-hidden">
|
||||
<figure class="w-64">
|
||||
style="display:flex;text-decoration:none;background:var(--b2);border:1px solid var(--b3);border-radius:0.5rem;overflow:hidden;transition:background 0.15s"
|
||||
onmouseover="this.style.background='var(--b3)'"
|
||||
onmouseout="this.style.background='var(--b2)'">
|
||||
<div style="width:250px;height:250px;flex-shrink:0;overflow:hidden;background:var(--b3)">
|
||||
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250"
|
||||
alt="{entry.title}" class="object-cover w-full h-full"
|
||||
alt="{entry.title}" style="width:100%;height:100%;object-fit:cover;display:block"
|
||||
loading="lazy"
|
||||
onerror="this.parentElement.innerHTML='<div class=\'flex items-center justify-center h-full text-base-content/20\'>No Cover</div>'">
|
||||
</figure>
|
||||
<div class="card-body">
|
||||
<h3 class="card-title text-sm text-base-content/60 uppercase tracking-wider">{entry.artistName}</h3>
|
||||
<h2 class="text-lg font-semibold">{entry.title}</h2>
|
||||
<div class="flex items-center gap-2 mt-2">
|
||||
onerror="this.parentElement.innerHTML='<div style=\'display:flex;align-items:center;justify-content:center;height:100%;color:var(--bc);opacity:0.15\'>No Cover</div>'">
|
||||
</div>
|
||||
<div style="padding:1rem 1.25rem;flex:1;display:flex;flex-direction:column;justify-content:center;min-width:0">
|
||||
<div style="font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--bc);opacity:0.55;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">{entry.artistName}</div>
|
||||
<div style="font-size:1.1rem;font-weight:700;color:var(--bc);line-height:1.35;margin-top:0.15rem">{entry.title}</div>
|
||||
<div style="display:flex;align-items:center;gap:0.5rem;margin-top:0.5rem;flex-wrap:wrap">
|
||||
{#if entry.primaryType == 'Album'}
|
||||
<span class="badge badge-primary badge-sm">Album</span>
|
||||
{#else if entry.primaryType == 'Single'}
|
||||
@@ -28,7 +30,7 @@
|
||||
<span class="badge badge-ghost badge-sm">{entry.primaryType}</span>
|
||||
{/if}
|
||||
{#if entry.firstReleaseDate}
|
||||
<span class="text-sm text-base-content/40">{entry.firstReleaseDate}</span>
|
||||
<span style="font-size:0.8rem;color:var(--bc);opacity:0.45">{entry.firstReleaseDate}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="min-h-screen bg-base-100">
|
||||
<div style="display:flex;align-items:center;gap:1rem;padding:0.5rem 1rem;background:var(--b3);box-shadow:0 1px 3px rgba(0,0,0,0.1)">
|
||||
<body style="min-height:100vh;background:var(--b1)">
|
||||
<div style="display:flex;align-items:center;gap:1rem;padding:0.5rem 1rem;background:var(--b2);box-shadow:0 1px 3px rgba(0,0,0,0.1)">
|
||||
<div style="display:flex;align-items:center;gap:0.25rem;flex-shrink:0">
|
||||
<div class="tabs tabs-box">
|
||||
<a href="/" class="tab tab-sm {#if activeTab == 'releases'}tab-active{/if}">Releases</a>
|
||||
|
||||
Reference in New Issue
Block a user