summaryrefslogtreecommitdiff
path: root/templates/detail.html
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:14:57 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-09 01:14:57 -0700
commit65466fd5c645e546707ce699b4ea289f894fea20 (patch)
treedebb3768e8d84000a8c32d2df8361bb42a457523 /templates/detail.html
parent9f82415366e6220651351007c2dc0ef21df7ff85 (diff)
Auto-select today's date on add form; clean up rewatch history panel
- Default date_watched to today when adding a new film (JS, en-CA locale) - Match rewatch history by tmdb_id when available, fall back to title - Replace inline styles in rewatch section with CSS classes - Simplify redundant Jinja conditions (rewatch_history and, loop.length > 1) - Move review-panel margin-top hack to .review-panel-spaced class Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'templates/detail.html')
-rw-r--r--templates/detail.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/detail.html b/templates/detail.html
index 325b0c1..83bd26a 100644
--- a/templates/detail.html
+++ b/templates/detail.html
@@ -87,27 +87,27 @@
</article>
</section>
- {% if rewatch_history and rewatch_history|length > 1 %}
+ {% if rewatch_history|length > 1 %}
<section class="detail-panel">
<p class="eyebrow">Rewatches</p>
- <div style="display: flex; flex-direction: column; gap: 12px;">
+ <div class="rewatch-list">
{% for entry in rewatch_history %}
- <div style="display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line);">
+ <div class="rewatch-row">
<div>
- <p style="margin: 0 0 4px; color: var(--muted); font-size: 0.9rem;">{{ entry.date_watched }}</p>
- <p style="margin: 0; display: flex; align-items: center; gap: 8px;">
- <span style="color: var(--accent);">{% for _ in range(entry.stars) %}✦{% endfor %}</span>
- {% if entry.watched_with %}<span style="color: var(--muted); font-size: 0.9rem;">with {{ entry.watched_with }}</span>{% endif %}
+ <p class="rewatch-meta">{{ entry.date_watched }}</p>
+ <p class="rewatch-rating">
+ <span class="rewatch-stars">{% for _ in range(entry.stars) %}✦{% endfor %}</span>
+ {% if entry.watched_with %}<span class="rewatch-companion">with {{ entry.watched_with }}</span>{% endif %}
</p>
</div>
- {% if loop.length > 1 and not loop.first %}
- <span style="color: var(--subtle); font-size: 0.85rem; text-align: right;">
+ {% if not loop.first %}
+ <span class="rewatch-delta">
{% set prev_entry = rewatch_history[loop.index - 2] %}
{% if prev_entry.date_watched %}
{% set days = (entry.date_watched - prev_entry.date_watched).days %}
{{ days }}d
{% if entry.stars != prev_entry.stars %}
- <span style="color: var(--accent);">({{ prev_entry.stars }}→{{ entry.stars }})</span>
+ <span class="rewatch-delta-rating">({{ prev_entry.stars }}→{{ entry.stars }})</span>
{% endif %}
{% endif %}
</span>