From a3df69ff5218cee132a6def9d860cd0276cc0cd4 Mon Sep 17 00:00:00 2001
From: Tyler Hoang
Date: Wed, 6 May 2026 14:34:01 -0700
Subject: Add year review and inline diary ratings
---
templates/_film_card.html | 14 +++-
templates/detail.html | 80 ++++++++++++++++-----
templates/stats.html | 9 ++-
templates/year_review.html | 175 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 256 insertions(+), 22 deletions(-)
create mode 100644 templates/year_review.html
(limited to 'templates')
diff --git a/templates/_film_card.html b/templates/_film_card.html
index 9fcd89b..7147a1e 100644
--- a/templates/_film_card.html
+++ b/templates/_film_card.html
@@ -21,7 +21,19 @@
{% endif %}
- {% if film.stars %}
+ {% if film.shelf == 'diary' %}
+
@@ -31,29 +45,57 @@
{% endif %}
-
- {% if film.stars %}{% for _ in range(film.stars) %}✦{% endfor %}{% endif %}
- {% if film.date_watched %}{{ film.date_watched }}{% endif %}
- {% if film.runtime %}{{ film.runtime }} min{% endif %}
- {% if film.rewatch %}Rewatch{% if film.rewatch_count %} #{{ film.rewatch_count }}{% endif %}{% endif %}
- {% if film.country %}{{ film.country }}{% endif %}
- {% if film.language %}{{ film.language }}{% endif %}
-
+
+
+ Watch log
+
+ {% if film.date_watched %}{{ film.date_watched }}{% endif %}
+ {% if film.runtime %}{{ film.runtime }} min{% endif %}
+ {% if film.rewatch %}Rewatch{% if film.rewatch_count %} #{{ film.rewatch_count }}{% endif %}{% endif %}
+ {% if film.watched_with %}With {{ film.watched_with }}{% endif %}
+ {% if film.context %}{{ film.context }}{% endif %}
+ {% if film.how_found %}{{ film.how_found }}{% endif %}
+
+
- {% if film.context or film.how_found or film.watched_with %}
-
- {% if film.context %}{{ film.context }}{% endif %}
- {% if film.how_found %}{{ film.how_found }}{% endif %}
- {% if film.watched_with %}With {{ film.watched_with }}{% endif %}
-
- {% endif %}
+
+ Production
+
+ {% if film.country %}{{ film.country }}{% endif %}
+ {% if film.language %}{{ film.language }}{% endif %}
+ {% if film.year %}{{ film.year }}{% endif %}
+ {% if film.tmdb_id %}TMDB {{ film.tmdb_id }}{% endif %}
+
+
+
- {% if film.notes %}
-
- {{ film.notes }}
-
+ {% if tmdb_context %}
+
+ Summary
+ {% if tmdb_context.tagline %}
+ {{ tmdb_context.tagline }}
+ {% endif %}
+ {% if tmdb_context.overview %}
+ {{ tmdb_context.overview }}
+ {% endif %}
+ {% if tmdb_context.cast %}
+
+
Cast
+
{{ tmdb_context.cast|join(", ") }}
+
+ {% endif %}
+
{% endif %}
+
+ Notes
+ {% if film.notes %}
+ {{ film.notes }}
+ {% else %}
+ No notes saved.
+ {% endif %}
+
+
Edit
{% if film.shelf == 'queue' %}
diff --git a/templates/stats.html b/templates/stats.html
index 7b54634..2983418 100644
--- a/templates/stats.html
+++ b/templates/stats.html
@@ -4,8 +4,13 @@
{% block content %}
- Stats
- Watching patterns
+
+
+
Stats
+
Watching patterns
+
+
Year in review
+
diff --git a/templates/year_review.html b/templates/year_review.html
new file mode 100644
index 0000000..5339c34
--- /dev/null
+++ b/templates/year_review.html
@@ -0,0 +1,175 @@
+{% extends "base.html" %}
+
+{% block title %}{{ selected_year }} Year in Review · Lumière{% endblock %}
+
+{% block content %}
+
+
+
Year in Review
+
{{ selected_year }}
+
A snapshot of the films you logged that year.
+
+
+
+
+
+ {% if total_watched == 0 %}
+
+ No entries
+ No diary films for this year
+ Pick another year or add more diary entries.
+
+ {% else %}
+
+
+ Films watched
+ {{ total_watched }}
+
+
+ Average stars
+ {{ "%.1f"|format(average_stars) }}
+
+
+ Rewatch rate
+ {{ (rewatch_rate.rate * 100)|round(0) }}%
+
+
+ Top director
+ {% if top_director %}{{ top_director.director }}{% else %}—{% endif %}
+
+
+ Top month
+ {% if top_month %}{{ top_month.month }}{% else %}—{% endif %}
+
+
+
+
+
+ Monthly activity
+
+ {% set max_month = films_per_month | map(attribute='count') | max if films_per_month else 1 %}
+ {% for item in films_per_month %}
+
+
{{ item.month[:3] }}
+
+
{{ item.count }}
+
+ {% endfor %}
+
+
+
+
+ Stars
+
+ {% set max_stars = star_distribution | map(attribute='count') | max if star_distribution else 1 %}
+ {% for item in star_distribution %}
+
+
{{ item.stars }} star
+
+
{{ item.count }}
+
+ {% endfor %}
+
+
+
+
+ Companions
+
+ {% for item in watched_with_breakdown %}
+ - {{ item.watched_with }}{{ item.count }}
+ {% endfor %}
+
+
+
+
+
+ {% endif %}
+{% endblock %}
--
cgit v1.3-2-g0d8e