Apply new frontend theme

Full style rewrite (holographic/chrome dark theme) plus matching favicon,
authored externally and dropped in at /home/andrew/alembic-theme. Verified
every template's variable names, form field names, and action URLs match
the actual data each router passes before importing -- all matched exactly
with zero router/service changes needed. Validated all templates parse
(Jinja2 env.get_template over the full tree) and confirmed the live
container serves the new theme after rebuild+redeploy.
This commit is contained in:
andrew
2026-07-08 15:01:39 -06:00
parent a1f5bbb121
commit ee21251f3e
13 changed files with 927 additions and 346 deletions
+62 -32
View File
@@ -1,44 +1,74 @@
{% extends "base.html" %}
{% block title %}{{ playlist.name }} — alembic{% endblock %}
{% block content %}
<p><a href="/playlists">&larr; back to playlists</a></p>
<h1>{{ playlist.name }}</h1>
<p class="muted"><a href="{{ playlist.spotify_url }}">{{ playlist.spotify_url }}</a></p>
<a class="back-link" href="/playlists">&larr; back to playlists</a>
<form method="post" action="/playlists/{{ playlist.id }}">
<label><input type="checkbox" name="active" value="true" {{ "checked" if playlist.active }}> active</label>
<label for="cron_expr">Cron schedule</label>
<input type="text" id="cron_expr" name="cron_expr" value="{{ playlist.cron_expr or '' }}" placeholder="0 1 * * *">
<label><input type="checkbox" name="no_m3u" value="true" {{ "checked" if playlist.no_m3u }}> skip M3U</label>
<label for="notes">Notes</label>
<textarea id="notes" name="notes">{{ playlist.notes or '' }}</textarea>
<button type="submit">Save</button>
</form>
<div class="page-header">
<div>
<h1>{{ playlist.name }}</h1>
<p class="subtitle muted"><a href="{{ playlist.spotify_url }}">{{ playlist.spotify_url }}</a></p>
</div>
<div class="actions">
<form method="post" action="/jobs/playlist:{{ playlist.name }}/run" class="inline">
<button type="submit" class="btn btn-primary">Run now</button>
</form>
</div>
</div>
<form method="post" action="/jobs/playlist:{{ playlist.name }}/run" style="display:inline">
<button type="submit">Run now</button>
</form>
<div class="panel" style="max-width:560px;">
<form method="post" action="/playlists/{{ playlist.id }}">
<label class="checkbox-field"><input type="checkbox" name="active" value="true" {{ "checked" if playlist.active }}> Active</label>
<div class="field">
<label for="cron_expr">Cron schedule</label>
<input type="text" id="cron_expr" name="cron_expr" value="{{ playlist.cron_expr or '' }}" placeholder="0 1 * * *">
</div>
<label class="checkbox-field"><input type="checkbox" name="no_m3u" value="true" {{ "checked" if playlist.no_m3u }}> Skip M3U</label>
<div class="field wide">
<label for="notes">Notes</label>
<textarea id="notes" name="notes" rows="3">{{ playlist.notes or '' }}</textarea>
</div>
<button type="submit" class="btn">Save</button>
</form>
</div>
<h2>Status</h2>
{% if error %}
<p class="muted">Couldn't fetch live status: {{ error }}</p>
<div class="notice warning">Couldn't fetch live status: {{ error }}</div>
{% elif status %}
<p>
{% for key, count in status.counts.items() %}
<strong>{{ count }}</strong> {{ key }} &nbsp;
{% endfor %}
</p>
<table>
<thead><tr><th>Artist</th><th>Title</th><th>Status</th></tr></thead>
<tbody>
{% for t in status.tracks %}
<tr>
<td>{{ t.artist }}</td>
<td>{{ t.title }}</td>
<td>{{ t.status }}</td>
</tr>
{% set status_meta = {
"IN_LIBRARY": ("var(--status-success)", "In library"),
"QUARANTINED": ("var(--status-warning)", "Quarantined"),
"DOWNLOADED_PENDING_IMPORT": ("var(--status-info)", "Downloaded, pending import"),
"NOT_YET_ATTEMPTED": ("var(--status-muted)", "Not yet attempted")
} %}
{% set total = status.counts.values() | sum %}
<div class="status-bar">
{% for key, count in status.counts.items() %}
{% if count %}
<span style="width: {{ (count / total * 100) if total else 0 }}%; background: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }};"></span>
{% endif %}
{% endfor %}
</tbody>
</table>
</div>
<div class="status-legend">
{% for key, count in status.counts.items() %}
<span class="item"><span class="dot" style="background: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }}; color: {{ status_meta.get(key, ('var(--status-muted)', key))[0] }};"></span><strong>{{ count }}</strong> {{ status_meta.get(key, (None, key))[1] }}</span>
{% endfor %}
</div>
{% set badge_class = {"IN_LIBRARY": "badge-success", "QUARANTINED": "badge-warning", "DOWNLOADED_PENDING_IMPORT": "badge-info", "NOT_YET_ATTEMPTED": "badge-muted"} %}
<div class="table-wrap scroll">
<table>
<thead><tr><th>Artist</th><th>Title</th><th>Status</th></tr></thead>
<tbody>
{% for t in status.tracks %}
<tr>
<td>{{ t.artist }}</td>
<td>{{ t.title }}</td>
<td><span class="badge {{ badge_class.get(t.status, 'badge-muted') }}">{{ status_meta.get(t.status, (None, t.status))[1] }}</span></td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% endblock %}