90 lines
3.5 KiB
HTML
90 lines
3.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en" data-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>DiscDrop</title>
|
|
<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>
|
|
body {
|
|
width: 100vw;
|
|
overflow-x: hidden;
|
|
}
|
|
#search-wrapper { position: relative; width: 100%; }
|
|
#search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; }
|
|
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1rem; }
|
|
.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; }
|
|
.card-shadow { box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
|
|
.card-shadow:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
|
|
.dropdown-shadow { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
|
|
</style>
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function () {
|
|
var saved = localStorage.getItem('daisyui-theme');
|
|
if (saved) document.documentElement.setAttribute('data-theme', saved);
|
|
document.addEventListener('click', function (e) {
|
|
var search = document.getElementById('search-wrapper');
|
|
var results = document.getElementById('search-results');
|
|
if (results && search && !search.contains(e.target)) {
|
|
results.innerHTML = '';
|
|
}
|
|
});
|
|
});
|
|
function setTheme(sel) {
|
|
var theme = sel.value;
|
|
document.documentElement.setAttribute('data-theme', theme);
|
|
localStorage.setItem('daisyui-theme', theme);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="min-h-screen bg-base-100">
|
|
<div class="navbar bg-base-300 shadow-lg px-4 min-h-0 h-14">
|
|
<div class="navbar-start"></div>
|
|
|
|
<div class="navbar-center gap-4">
|
|
<a href="/" class="btn btn-ghost btn-sm no-underline">DiscDrop</a>
|
|
<a href="/artists" class="btn btn-ghost btn-sm {#if activeTab == 'artists'}btn-active{/if}">Artists</a>
|
|
<div id="search-wrapper" style="width:24rem">
|
|
<form hx-get="/api/artists/search"
|
|
hx-target="#search-results"
|
|
hx-swap="innerHTML"
|
|
hx-trigger="keyup changed delay:300ms from:#search-input">
|
|
<input id="search-input" type="text" placeholder="Add artist to follow"
|
|
class="input input-bordered input-sm" name="q" autocomplete="off" style="width:100%">
|
|
</form>
|
|
<div id="search-results"></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="navbar-end gap-2">
|
|
<select class="select select-bordered select-sm" style="width:7rem" onchange="setTheme(this)">
|
|
<option value="dark">Dark</option>
|
|
<option value="light">Light</option>
|
|
<option value="synthwave">Synthwave</option>
|
|
<option value="retro">Retro</option>
|
|
<option value="dracula">Dracula</option>
|
|
<option value="night">Night</option>
|
|
<option value="dim">Dim</option>
|
|
<option value="nord">Nord</option>
|
|
</select>
|
|
|
|
<button class="btn btn-ghost btn-sm" onclick="settingsModal.showModal()">⚙️</button>
|
|
</div>
|
|
</div>
|
|
|
|
<main>
|
|
{#insert page-content}{/insert}
|
|
</main>
|
|
|
|
<dialog id="settingsModal" class="modal">
|
|
<div class="modal-box max-w-md" id="settings-modal-content"
|
|
hx-get="/api/settings/form" hx-trigger="load" hx-swap="innerHTML">
|
|
<span class="loading loading-spinner"></span>
|
|
</div>
|
|
</dialog>
|
|
</body>
|
|
</html>
|