From 65466fd5c645e546707ce699b4ea289f894fea20 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sat, 9 May 2026 01:14:57 -0700 Subject: 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 --- templates/detail.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'templates/detail.html') 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 @@ - {% if rewatch_history and rewatch_history|length > 1 %} + {% if rewatch_history|length > 1 %}

Rewatches

-
+
{% for entry in rewatch_history %} -
+
-

{{ entry.date_watched }}

-

- {% for _ in range(entry.stars) %}✦{% endfor %} - {% if entry.watched_with %}with {{ entry.watched_with }}{% endif %} +

{{ entry.date_watched }}

+

+ {% for _ in range(entry.stars) %}✦{% endfor %} + {% if entry.watched_with %}with {{ entry.watched_with }}{% endif %}

- {% if loop.length > 1 and not loop.first %} - + {% if not loop.first %} + {% 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 %} - ({{ prev_entry.stars }}→{{ entry.stars }}) + ({{ prev_entry.stars }}→{{ entry.stars }}) {% endif %} {% endif %} -- cgit v1.3-2-g0d8e