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
+28 -29
View File
@@ -7,20 +7,23 @@
<link href="https://cdn.jsdelivr.net/npm/daisyui@4/dist/full.min.css" rel="stylesheet">
<script src="https://unpkg.com/htmx.org@2/dist/htmx.min.js"></script>
<style>
#search-wrapper { position: relative; width: 280px; }
@media (min-width: 768px) { #search-wrapper { width: 320px; } }
@media (min-width: 1024px) { #search-wrapper { width: 384px; } }
#search-wrapper { position: relative; width: 100%; max-width: 400px; }
#search-results {
position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
}
main { max-width: 1024px; margin: 0 auto; padding: 1.5rem 1rem; }
@media (min-width: 640px) { main { padding: 1.5rem 1.5rem; } }
.brand-icon { width: 28px; height: 28px; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 12px; height: 12px; }
.icon-lg { width: 48px; height: 48px; }
.cover-img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.search-dropdown-item:hover { background: color-mix(in srgb, var(--p) 10%, transparent); }
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; }
.icon-sm { width: 16px; height: 16px; flex-shrink: 0; }
.icon-xs { width: 12px; height: 12px; flex-shrink: 0; }
.icon-lg { width: 48px; height: 48px; flex-shrink: 0; }
.brand-text {
font-size: 1.25rem;
font-weight: 800;
background: linear-gradient(135deg, var(--p), var(--a));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
</style>
<script>
document.addEventListener('DOMContentLoaded', function () {
@@ -37,27 +40,23 @@
<body class="min-h-screen bg-base-200">
<div class="navbar bg-base-100 shadow-lg px-4">
<div class="navbar-start">
<div class="flex items-center gap-2">
<a href="/" class="flex items-center gap-2 no-underline">
<svg class="brand-icon text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" 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"/>
</svg>
<div>
<div class="text-xl font-bold" style="background:linear-gradient(135deg,var(--p),var(--a));-webkit-background-clip:text;-webkit-text-fill-color:transparent">DiscDrop</div>
<div class="text-xs text-base-content/50 leading-none" style="display:none">Release Groups Feed</div>
</div>
</a>
<div class="tabs tabs-box ml-2 hidden sm:flex">
<a href="/" class="tab tab-sm {#if activeTab == 'releases'}tab-active{/if}">Releases</a>
<a href="/artists" class="tab tab-sm {#if activeTab == 'artists'}tab-active{/if}">Artists</a>
<a href="/" class="flex items-center gap-2 no-underline">
<svg class="brand-icon text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" 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"/>
</svg>
<div>
<div class="brand-text">DiscDrop</div>
<div class="text-xs leading-none" style="color:var(--bc);opacity:0.5">Release Groups Feed</div>
</div>
</div>
</a>
</div>
<div class="navbar-center">
<div class="navbar-center flex-1 justify-center">
<div class="tabs tabs-box hidden sm:flex mr-4">
<a href="/" class="tab tab-sm {#if activeTab == 'releases'}tab-active{/if}">Releases</a>
<a href="/artists" class="tab tab-sm {#if activeTab == 'artists'}tab-active{/if}">Artists</a>
</div>
<div id="search-wrapper">
<form hx-get="/api/artists/search"
hx-target="#search-results"