Fix navbar layout and feed ordering
- Replace daisyUI navbar sections with custom flex layout - Branding centered: simple solid-color text (no gradient tricks) - Tabs on the left, search + theme + settings on the right - Search wrapper has max-width 420px, flex-shrink parent prevents overflow - Feed ORDER BY adds NULLS LAST handling for empty dates
This commit is contained in:
@@ -221,7 +221,7 @@ public class DatabaseService {
|
|||||||
var typePlaceholders = String.join(",", primaryTypes.stream().map(t -> "?").toList());
|
var typePlaceholders = String.join(",", primaryTypes.stream().map(t -> "?").toList());
|
||||||
sql += " AND primary_type IN (" + typePlaceholders + ")";
|
sql += " AND primary_type IN (" + typePlaceholders + ")";
|
||||||
}
|
}
|
||||||
sql += " ORDER BY first_release_date DESC";
|
sql += " ORDER BY (CASE WHEN first_release_date IS NULL OR first_release_date = '' THEN 1 ELSE 0 END), first_release_date DESC";
|
||||||
|
|
||||||
try (Connection conn = getConnection();
|
try (Connection conn = getConnection();
|
||||||
PreparedStatement ps = conn.prepareStatement(sql)) {
|
PreparedStatement ps = conn.prepareStatement(sql)) {
|
||||||
|
|||||||
@@ -7,23 +7,14 @@
|
|||||||
<link href="https://cdn.jsdelivr.net/npm/daisyui@4/dist/full.min.css" rel="stylesheet">
|
<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>
|
<script src="https://unpkg.com/htmx.org@2/dist/htmx.min.js"></script>
|
||||||
<style>
|
<style>
|
||||||
#search-wrapper { position: relative; width: 100%; max-width: 400px; }
|
#search-wrapper { position: relative; width: 100%; }
|
||||||
#search-results {
|
#search-results {
|
||||||
position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
|
position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
|
||||||
}
|
}
|
||||||
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
|
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-sm { width: 16px; height: 16px; flex-shrink: 0; }
|
||||||
.icon-xs { width: 12px; height: 12px; flex-shrink: 0; }
|
.icon-xs { width: 12px; height: 12px; flex-shrink: 0; }
|
||||||
.icon-lg { width: 48px; height: 48px; 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>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
@@ -38,26 +29,20 @@
|
|||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body class="min-h-screen bg-base-200">
|
<body class="min-h-screen bg-base-200">
|
||||||
<div class="navbar bg-base-100 shadow-lg px-4">
|
<div style="display:flex;align-items:center;gap:1rem;padding:0.5rem 1rem;background:var(--b1);box-shadow:0 1px 3px rgba(0,0,0,0.1)">
|
||||||
<div class="navbar-start">
|
<div style="display:flex;align-items:center;gap:0.25rem;flex-shrink:0">
|
||||||
<a href="/" class="flex items-center gap-2 no-underline">
|
<div class="tabs tabs-box">
|
||||||
<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>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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="/" 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="/artists" class="tab tab-sm {#if activeTab == 'artists'}tab-active{/if}">Artists</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="search-wrapper">
|
</div>
|
||||||
|
|
||||||
|
<div style="flex:1;text-align:center">
|
||||||
|
<a href="/" style="text-decoration:none;font-size:1.25rem;font-weight:800;color:var(--p)">DiscDrop</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div style="display:flex;align-items:center;gap:0.5rem;flex:1;justify-content:flex-end;max-width:50%">
|
||||||
|
<div id="search-wrapper" style="max-width:420px">
|
||||||
<form hx-get="/api/artists/search"
|
<form hx-get="/api/artists/search"
|
||||||
hx-target="#search-results"
|
hx-target="#search-results"
|
||||||
hx-swap="innerHTML"
|
hx-swap="innerHTML"
|
||||||
@@ -71,10 +56,8 @@
|
|||||||
</form>
|
</form>
|
||||||
<div id="search-results"></div>
|
<div id="search-results"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="navbar-end gap-1">
|
<select class="select select-bordered select-sm" style="width:7rem;flex-shrink:0"
|
||||||
<select class="select select-bordered select-sm" style="width:7rem"
|
|
||||||
onchange="setTheme(this)">
|
onchange="setTheme(this)">
|
||||||
<option value="dark">Dark</option>
|
<option value="dark">Dark</option>
|
||||||
<option value="light">Light</option>
|
<option value="light">Light</option>
|
||||||
@@ -86,7 +69,7 @@
|
|||||||
<option value="nord">Nord</option>
|
<option value="nord">Nord</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<button class="btn btn-ghost btn-sm px-2"
|
<button class="btn btn-ghost btn-sm px-2" style="flex-shrink:0"
|
||||||
onclick="settingsModal.showModal()">⚙️</button>
|
onclick="settingsModal.showModal()">⚙️</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user