Strip all custom CSS, use plain daisyUI classes only
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
{#include layouts/base}
|
||||
{#page-content}
|
||||
<div class="w-full">
|
||||
<h2 class="text-2xl font-bold mb-5">🎤 Tracked Artists</h2>
|
||||
<div>
|
||||
<h2 class="text-2xl font-bold mb-4">Artists</h2>
|
||||
<div id="artist-list" hx-get="/api/artists/list" hx-trigger="load">
|
||||
<span class="loading loading-spinner loading-lg block mx-auto my-12"></span>
|
||||
<div class="flex justify-center py-16">
|
||||
<span class="loading loading-spinner loading-lg"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/page-content}
|
||||
|
||||
@@ -1,86 +1,74 @@
|
||||
<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">
|
||||
<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>
|
||||
<p style="font-size:1.125rem;font-weight:500;color:var(--bc);opacity:0.6">No artists tracked yet</p>
|
||||
<p style="font-size:0.875rem;color:var(--bc);opacity:0.4;margin-top:0.25rem">Search for artists using the search bar above</p>
|
||||
<div class="card bg-base-100 shadow-xl p-12 text-center">
|
||||
<p class="text-lg text-base-content/60">No artists tracked yet</p>
|
||||
<p class="text-sm text-base-content/40 mt-2">Search for artists using the search bar above</p>
|
||||
</div>
|
||||
{#else}
|
||||
<div class="overflow-x-auto rounded-box border border-base-300">
|
||||
<table class="table table-pin-rows">
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table table-zebra">
|
||||
<thead>
|
||||
<tr style="background:color-mix(in srgb, var(--b2) 80%, transparent)">
|
||||
<tr>
|
||||
<th>Artist</th>
|
||||
<th>Since</th>
|
||||
<th>Release Types</th>
|
||||
<th style="width:6rem">Actions</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{#for artist in artists}
|
||||
<tr style="transition:background 0.15s" onmouseover="this.style.background='color-mix(in srgb, var(--b2) 50%, transparent)'" onmouseout="this.style.background=''">
|
||||
<tr>
|
||||
<td>
|
||||
<div style="font-weight:500">{artist.name}</div>
|
||||
<div class="font-medium">{artist.name}</div>
|
||||
{#if artist.disambiguation}
|
||||
<div style="font-size:0.75rem;color:var(--bc);opacity:0.5">{artist.disambiguation}</div>
|
||||
<div class="text-xs text-base-content/50">{artist.disambiguation}</div>
|
||||
{/if}
|
||||
</td>
|
||||
<td style="font-size:0.875rem;color:var(--bc);opacity:0.5">{artist.createdAt}</td>
|
||||
<td class="text-sm text-base-content/50">{artist.createdAt}</td>
|
||||
<td>
|
||||
<div style="display:flex;flex-wrap:wrap;gap:0.375rem">
|
||||
<div class="flex flex-wrap gap-1">
|
||||
<label class="label cursor-pointer gap-1 p-1">
|
||||
<input type="checkbox" class="checkbox checkbox-xs checkbox-primary"
|
||||
{#if artist.albumMonitored}checked{/if}
|
||||
hx-patch="/api/artists/{artist.mbid}/monitor?type=album"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML">
|
||||
<span class="label-text text-xs" style="color:var(--p)">Album</span>
|
||||
hx-target="#artist-list" hx-swap="innerHTML">
|
||||
<span class="label-text text-xs">Album</span>
|
||||
</label>
|
||||
<label class="label cursor-pointer gap-1 p-1">
|
||||
<input type="checkbox" class="checkbox checkbox-xs checkbox-secondary"
|
||||
{#if artist.singleMonitored}checked{/if}
|
||||
hx-patch="/api/artists/{artist.mbid}/monitor?type=single"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML">
|
||||
<span class="label-text text-xs" style="color:var(--s)">Single</span>
|
||||
hx-target="#artist-list" hx-swap="innerHTML">
|
||||
<span class="label-text text-xs">Single</span>
|
||||
</label>
|
||||
<label class="label cursor-pointer gap-1 p-1">
|
||||
<input type="checkbox" class="checkbox checkbox-xs checkbox-accent"
|
||||
{#if artist.epMonitored}checked{/if}
|
||||
hx-patch="/api/artists/{artist.mbid}/monitor?type=ep"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML">
|
||||
<span class="label-text text-xs" style="color:var(--a)">EP</span>
|
||||
hx-target="#artist-list" hx-swap="innerHTML">
|
||||
<span class="label-text text-xs">EP</span>
|
||||
</label>
|
||||
<label class="label cursor-pointer gap-1 p-1">
|
||||
<input type="checkbox" class="checkbox checkbox-xs"
|
||||
{#if artist.broadcastMonitored}checked{/if}
|
||||
hx-patch="/api/artists/{artist.mbid}/monitor?type=broadcast"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML">
|
||||
<span class="label-text text-xs" style="color:var(--bc);opacity:0.6">Broadcast</span>
|
||||
hx-target="#artist-list" hx-swap="innerHTML">
|
||||
<span class="label-text text-xs">Broadcast</span>
|
||||
</label>
|
||||
<label class="label cursor-pointer gap-1 p-1">
|
||||
<input type="checkbox" class="checkbox checkbox-xs"
|
||||
{#if artist.otherMonitored}checked{/if}
|
||||
hx-patch="/api/artists/{artist.mbid}/monitor?type=other"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML">
|
||||
<span class="label-text text-xs" style="color:var(--bc);opacity:0.6">Other</span>
|
||||
hx-target="#artist-list" hx-swap="innerHTML">
|
||||
<span class="label-text text-xs">Other</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-ghost btn-xs" style="color:var(--er)"
|
||||
<button class="btn btn-ghost btn-xs text-error"
|
||||
hx-delete="/api/artists/{artist.mbid}"
|
||||
hx-target="#artist-list"
|
||||
hx-swap="innerHTML"
|
||||
onclick="return confirm('Remove {artist.name}?')">
|
||||
<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>
|
||||
Remove
|
||||
</button>
|
||||
hx-target="#artist-list" hx-swap="innerHTML"
|
||||
onclick="return confirm('Remove {artist.name}?')">Remove</button>
|
||||
</td>
|
||||
</tr>
|
||||
{/for}
|
||||
|
||||
@@ -1,31 +1,23 @@
|
||||
{#if entries.isEmpty()}
|
||||
<div class="bg-base-100 shadow-xl rounded-box p-12 text-center border border-base-300">
|
||||
<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">
|
||||
<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>
|
||||
<p style="font-size:1.125rem;font-weight:500;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.25rem">Add artists to your collection to see their releases here</p>
|
||||
<div class="card bg-base-100 shadow-xl p-12 text-center">
|
||||
<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>
|
||||
{#else}
|
||||
<div style="display:flex;flex-direction:column;gap:1rem">
|
||||
<div class="grid grid-cols-1 gap-4">
|
||||
{#for entry in entries}
|
||||
<a href="https://musicbrainz.org/release-group/{entry.mbid}"
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
class="shadow-sm" style="display:flex;text-decoration:none;transition:box-shadow 0.15s;background:var(--b1);border:1px solid var(--b3);border-radius:0.5rem;overflow:hidden"
|
||||
onmouseover="this.style.boxShadow='0 3px 12px rgba(0,0,0,0.12)'"
|
||||
onmouseout="this.style.boxShadow=''">
|
||||
<div style="width:250px;height:250px;flex-shrink:0;overflow:hidden;background:var(--b2)">
|
||||
<a href="https://musicbrainz.org/release-group/{entry.mbid}" target="_blank" rel="noopener noreferrer"
|
||||
class="card card-side bg-base-100 shadow-sm border border-base-300 hover:shadow-md transition-shadow">
|
||||
<figure class="w-60">
|
||||
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front-250"
|
||||
alt="Cover for {entry.title}"
|
||||
style="width:100%;height:100%;object-fit:cover;display:block"
|
||||
alt="{entry.title}" class="object-cover w-full h-full"
|
||||
loading="lazy"
|
||||
onerror="this.parentElement.innerHTML='<div style=\'display:flex;align-items:center;justify-content:center;width:250px;height:250px;color:var(--bc);opacity:0.1\'><svg width=\'64\' height=\'64\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'currentColor\' stroke-width=\'1.5\'><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>
|
||||
<div style="padding:1rem 1.25rem;flex:1;display:flex;flex-direction:column;justify-content:center;gap:0.3rem;min-width:0">
|
||||
<div style="font-size:0.8rem;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;color:var(--p);opacity:0.7;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;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden">{entry.title}</div>
|
||||
<div style="margin-top:0.3rem;display:flex;align-items:center;gap:0.6rem;flex-wrap:wrap">
|
||||
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">
|
||||
{#if entry.primaryType == 'Album'}
|
||||
<span class="badge badge-primary badge-sm">Album</span>
|
||||
{#else if entry.primaryType == 'Single'}
|
||||
@@ -36,7 +28,7 @@
|
||||
<span class="badge badge-ghost badge-sm">{entry.primaryType}</span>
|
||||
{/if}
|
||||
{#if entry.firstReleaseDate}
|
||||
<span style="font-size:0.8rem;color:var(--bc);opacity:0.45">{entry.firstReleaseDate}</span>
|
||||
<span class="text-sm text-base-content/40">{entry.firstReleaseDate}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +1,32 @@
|
||||
<div class="bg-base-100 shadow-xl border border-base-300 rounded-box mt-1" style="max-height:24rem;overflow-y:auto">
|
||||
<div class="card bg-base-100 shadow-xl border border-base-300 mt-1 max-h-72 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 class="p-4 text-sm text-center text-base-content/50">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">
|
||||
<span style="font-weight:600;font-size:0.9rem">{artist.name}</span>
|
||||
<div class="flex items-center justify-between p-3 hover:bg-base-200 border-b border-base-200 last:border-b-0">
|
||||
<div class="flex-1 min-w-0 mr-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<span class="font-semibold text-sm">{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 class="text-xs text-base-content/50 truncate">{artist.disambiguation}</div>
|
||||
{/if}
|
||||
{#if artist.area}
|
||||
<div style="font-size:0.75rem;color:var(--bc);opacity:0.4">{artist.area}</div>
|
||||
<div class="text-xs text-base-content/40">{artist.area}</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div style="flex-shrink:0">
|
||||
<div class="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 gap-1">✓ Added</span>
|
||||
{#else}
|
||||
<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>
|
||||
|
||||
@@ -7,14 +7,7 @@
|
||||
<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: 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; }
|
||||
#search-results { position: absolute; top: 100%; left: 0; right: 0; z-index: 50; }
|
||||
</style>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
@@ -28,37 +21,26 @@
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body style="min-height:100vh;background:var(--b2)">
|
||||
<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 style="display:flex;align-items:center;gap:0.25rem;flex-shrink:0">
|
||||
<body class="min-h-screen bg-base-200">
|
||||
<div class="navbar bg-base-100 shadow-lg px-4">
|
||||
<div class="flex-1">
|
||||
<div class="tabs tabs-box">
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<div class="flex-none gap-2">
|
||||
<div class="form-control relative w-72">
|
||||
<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="Search artists..."
|
||||
class="input input-bordered input-sm w-full"
|
||||
name="q"
|
||||
autocomplete="off">
|
||||
<input id="search-input" type="text" placeholder="Search artists..."
|
||||
class="input input-bordered input-sm w-full" name="q" autocomplete="off">
|
||||
</form>
|
||||
<div id="search-results"></div>
|
||||
</div>
|
||||
|
||||
<select class="select select-bordered select-sm" style="width:7rem;flex-shrink:0"
|
||||
onchange="setTheme(this)">
|
||||
<select class="select select-bordered select-sm w-28" onchange="setTheme(this)">
|
||||
<option value="dark">Dark</option>
|
||||
<option value="light">Light</option>
|
||||
<option value="synthwave">Synthwave</option>
|
||||
@@ -68,21 +50,17 @@
|
||||
<option value="dim">Dim</option>
|
||||
<option value="nord">Nord</option>
|
||||
</select>
|
||||
|
||||
<button class="btn btn-ghost btn-sm px-2" style="flex-shrink:0"
|
||||
onclick="settingsModal.showModal()">⚙️</button>
|
||||
<button class="btn btn-ghost btn-sm" onclick="settingsModal.showModal()">⚙️</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<main>
|
||||
<main class="container mx-auto p-4">
|
||||
{#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">
|
||||
hx-get="/api/settings/form" hx-trigger="load" hx-swap="innerHTML">
|
||||
<span class="loading loading-spinner"></span>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
@@ -1,24 +1,15 @@
|
||||
{#include layouts/base}
|
||||
{#page-content}
|
||||
<div class="w-full">
|
||||
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1.5rem;flex-wrap:wrap;gap:0.75rem">
|
||||
<h2 style="font-size:1.5rem;font-weight:700">📡 Releases</h2>
|
||||
<div style="display:flex;gap:0.5rem">
|
||||
<a href="/feed/rss.xml" class="btn btn-primary btn-sm gap-2">
|
||||
<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/>
|
||||
<circle cx="5" cy="19" r="1"/>
|
||||
</svg>
|
||||
RSS Feed
|
||||
</a>
|
||||
<a href="/feed/opml" class="btn btn-ghost btn-sm gap-2">
|
||||
<svg class="icon-sm" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>
|
||||
OPML
|
||||
</a>
|
||||
<div>
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<h2 class="text-2xl font-bold">Releases</h2>
|
||||
<div class="flex gap-2">
|
||||
<a href="/feed/rss.xml" class="btn btn-primary btn-sm">RSS Feed</a>
|
||||
<a href="/feed/opml" class="btn btn-ghost btn-sm">OPML</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="feed-entries" hx-get="/api/artists/feed-table" hx-trigger="load">
|
||||
<div style="display:flex;justify-content:center;padding:4rem 0">
|
||||
<div class="flex justify-center py-16">
|
||||
<span class="loading loading-spinner loading-lg"></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user