Alternative names (#32): - PUT /api/v1/soundtracks/{uuid}/alternative-names replaces a soundtrack's alternative names (trimmed, deduplicated, without the soundtrack's own name). - alternative_names is in the soundtrack and statistics responses. - /find matches them too and shows which name matched. Covers (#12), stored in COVERS_PATH and off when it is not set: - GET, PUT (upload) and DELETE /api/v1/soundtracks/{uuid}/cover, and PUT .../cover/source to pick a SteamGridDB game or AniList anime by ID. Uploaded and picked covers are never replaced automatically. - With STEAMGRIDDB_API_KEY, a background job searches SteamGridDB, then AniList, by name, alternative names and the name without bracketed parts, at startup, after a sync and after names change. Search results are ranked by matching words, so "Civilization IV" gets "Sid Meier's Civilization IV". - cover_modified (Unix seconds) is in the soundtrack and statistics responses, so clients can cache covers. The new columns are added to migration 000006, which is not released yet. Closes #12, closes #32 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
156 lines
3.0 KiB
CSS
156 lines
3.0 KiB
CSS
/* Pure CSS styles for Music Search */
|
|
|
|
:root {
|
|
/* Light mode colors (default) */
|
|
--bg-primary: #f3f4f6;
|
|
--bg-secondary: #e5e7eb;
|
|
--bg-tertiary: #dcfce7;
|
|
--text-primary: #000;
|
|
--text-secondary: #374151;
|
|
--border-primary: #9ca3af;
|
|
--border-focus: #6b7280;
|
|
--accent-primary: #f97316;
|
|
--accent-hover: #ea580c;
|
|
--shadow-color: rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
[data-theme="dark"] {
|
|
/* Dark mode colors matching frontend */
|
|
--bg-primary: #555;
|
|
--bg-secondary: #333;
|
|
--bg-tertiary: #2a2a2a;
|
|
--text-primary: #fff;
|
|
--text-secondary: #ff9c00;
|
|
--border-primary: #666;
|
|
--border-focus: #ff9c00;
|
|
--accent-primary: #ff9c00;
|
|
--accent-hover: #e68a00;
|
|
--shadow-color: rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html, body {
|
|
height: 100%;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
line-height: 1.5;
|
|
background-color: var(--bg-primary);
|
|
color: var(--text-primary);
|
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
}
|
|
|
|
main {
|
|
max-width: 1200px;
|
|
margin: 0 auto;
|
|
padding: 1rem;
|
|
}
|
|
|
|
#search-container {
|
|
text-align: center;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
#search_term {
|
|
width: 60vw;
|
|
max-width: 600px;
|
|
font-size: 1.5rem;
|
|
padding: 0.5rem;
|
|
border: 1px solid var(--border-primary);
|
|
border-radius: 0.5rem;
|
|
background-color: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
#search_term:focus {
|
|
outline: none;
|
|
border-color: var(--border-focus);
|
|
}
|
|
|
|
#clear {
|
|
font-size: 1.5rem;
|
|
padding: 0.5rem 1rem;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
background-color: var(--accent-primary);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
margin-left: 1rem;
|
|
}
|
|
|
|
#clear:hover {
|
|
background-color: var(--accent-hover);
|
|
}
|
|
|
|
#games-container {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.game-text {
|
|
color: var(--text-primary);
|
|
word-break: break-word;
|
|
}
|
|
|
|
/* Dark mode toggle */
|
|
#dark-mode-toggle {
|
|
position: fixed;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
font-size: 1.2rem;
|
|
padding: 0.4rem 0.8rem;
|
|
border: none;
|
|
border-radius: 0.5rem;
|
|
background-color: var(--bg-secondary);
|
|
color: var(--text-primary);
|
|
cursor: pointer;
|
|
z-index: 1000;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
#dark-mode-toggle:hover {
|
|
background-color: var(--border-primary);
|
|
}
|
|
|
|
/* Game result cards */
|
|
.bg-green-100 {
|
|
background-color: var(--bg-tertiary);
|
|
}
|
|
|
|
.p-4 {
|
|
padding: 1rem;
|
|
}
|
|
|
|
.shadow-md {
|
|
box-shadow: 0 4px 6px -1px var(--shadow-color), 0 2px 4px -2px var(--shadow-color);
|
|
}
|
|
|
|
.rounded-lg {
|
|
border-radius: 0.5rem;
|
|
}
|
|
|
|
.mt-6 {
|
|
margin-top: 1.5rem;
|
|
}
|
|
|
|
.matched-name {
|
|
margin: 0.25rem 0 0;
|
|
font-size: 0.9rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
/* Responsive adjustments */
|
|
@media (max-width: 768px) {
|
|
#search_term {
|
|
width: 80vw;
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
#clear {
|
|
font-size: 1.2rem;
|
|
padding: 0.4rem 0.8rem;
|
|
}
|
|
}
|