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/year_review.html | 175 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 templates/year_review.html (limited to 'templates/year_review.html') 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 %} +
  1. {{ item.watched_with }}{{ item.count }}
  2. + {% endfor %} +
+
+
+ +
+

Highlights

+
+ {% if highlight_films.highest_rated %} + {% for film in highlight_films.highest_rated %} + + {% endfor %} + {% endif %} + + {% if highlight_films.first_watch %} + + {% endif %} + + {% if highlight_films.last_watch %} + + {% endif %} + + {% if highlight_films.most_rewatched %} + + {% endif %} +
+
+ {% endif %} +{% endblock %} -- cgit v1.3-2-g0d8e