From e708bec6cd76c2686de4158dde4d04f72a3c300d Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Wed, 6 May 2026 12:21:26 -0700 Subject: init: lumiere film diary --- templates/_film_card.html | 70 ++++++++++++ templates/base.html | 30 ++++++ templates/detail.html | 83 ++++++++++++++ templates/director.html | 31 ++++++ templates/form.html | 144 +++++++++++++++++++++++++ templates/import.html | 108 +++++++++++++++++++ templates/index.html | 64 +++++++++++ templates/stats.html | 268 ++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 798 insertions(+) create mode 100644 templates/_film_card.html create mode 100644 templates/base.html create mode 100644 templates/detail.html create mode 100644 templates/director.html create mode 100644 templates/form.html create mode 100644 templates/import.html create mode 100644 templates/index.html create mode 100644 templates/stats.html (limited to 'templates') diff --git a/templates/_film_card.html b/templates/_film_card.html new file mode 100644 index 0000000..9fcd89b --- /dev/null +++ b/templates/_film_card.html @@ -0,0 +1,70 @@ +
+ + {% if film.poster_url %} + {{ film.title }} poster + {% else %} + {{ film.title[:1] }} + {% endif %} + +
+
+
+

{{ film.title }}

+

+ {% if film.year %}{{ film.year }}{% endif %} + {% set directors = split_credit_names(film.director) %} + {% if directors %} + {% if film.year %} · {% endif %} + {% for director in directors %} + {{ director }}{% if not loop.last %}, {% endif %} + {% endfor %} + {% endif %} +

+
+ {% if film.stars %} + {% for _ in range(film.stars) %}✦{% endfor %} + {% endif %} +
+ +
+ {{ film.shelf|title }} + {% if film.date_watched %}{{ film.date_watched }}{% endif %} + {% if film.runtime %}{{ film.runtime }} min{% endif %} + {% if film.language %}{{ film.language }}{% endif %} + {% if film.rewatch %}Rewatch{% 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 %} + + {% if film.notes %} +

{{ film.notes[:220] }}{% if film.notes|length > 220 %}...{% endif %}

+ {% endif %} + +
+ {% if film.shelf == 'queue' %} + Mark watched +
+ +
+ {% elif film.shelf == 'diary' %} +
+ +
+
+ +
+ {% else %} + Mark watched +
+ +
+ {% endif %} +
+
+
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..168efde --- /dev/null +++ b/templates/base.html @@ -0,0 +1,30 @@ + + + + + + {% block title %}Lumière{% endblock %} + + + + +
+
+ Lumière + +
+ +
+ {% block content %}{% endblock %} +
+
+ {% block scripts %}{% endblock %} + + diff --git a/templates/detail.html b/templates/detail.html new file mode 100644 index 0000000..b937c6b --- /dev/null +++ b/templates/detail.html @@ -0,0 +1,83 @@ +{% extends "base.html" %} + +{% block title %}{{ film.title }} · Lumière{% endblock %} + +{% block content %} +
+ + +
+

{{ film.shelf|title }} Entry

+

{{ film.title }}

+ {% if film.original_title %} +

{{ film.original_title }}

+ {% endif %} +

+ {% if film.year %}{{ film.year }}{% endif %} + {% set directors = split_credit_names(film.director) %} + {% if directors %} + {% if film.year %} · {% endif %} + {% for director in directors %} + {{ director }}{% if not loop.last %}, {% endif %} + {% endfor %} + {% 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 %} +
+ + {% 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 %} + + {% if film.notes %} +
+ {{ film.notes }} +
+ {% endif %} + +
+ Edit + {% if film.shelf == 'queue' %} + Mark watched +
+ +
+ {% elif film.shelf == 'diary' %} +
+ +
+
+ +
+ {% else %} + Mark watched +
+ +
+ {% endif %} +
+ +
+
+
+
+{% endblock %} diff --git a/templates/director.html b/templates/director.html new file mode 100644 index 0000000..3257ee9 --- /dev/null +++ b/templates/director.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} + +{% block title %}{{ director_name }} · Lumière{% endblock %} + +{% block content %} +
+

Director

+

{{ director_name }}

+
+ +
+
+ Films logged + {{ director_summary.total_films_logged }} +
+
+ Average stars + {{ "%.1f"|format(director_summary.average_stars) }} +
+
+ Common shelf + {{ director_summary.most_common_shelf|title }} +
+
+ +
+ {% for film in films %} + {% include "_film_card.html" %} + {% endfor %} +
+{% endblock %} diff --git a/templates/form.html b/templates/form.html new file mode 100644 index 0000000..4009e87 --- /dev/null +++ b/templates/form.html @@ -0,0 +1,144 @@ +{% extends "base.html" %} + +{% block title %}{{ page_title }} · Lumière{% endblock %} + +{% block content %} +
+
+

Diary Entry

+

{{ page_title }}

+
+ + {% if error %} +
{{ error }}
+ {% endif %} + +
+ +
+ + +
+
+
+ +
+ + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + {% set current_shelf = shelf_override if shelf_override else (film.shelf if film and film.shelf else 'diary') %} + +
+ +
+ + {% set current_stars = film.stars if film else 0 %} + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ {% if film and film.poster_url %} + Poster preview + {% else %} + Poster preview + {% endif %} +
+
+ +
+ + +
+
+ +
+ Cancel + +
+
+
+{% endblock %} diff --git a/templates/import.html b/templates/import.html new file mode 100644 index 0000000..50c27d6 --- /dev/null +++ b/templates/import.html @@ -0,0 +1,108 @@ +{% extends "base.html" %} + +{% block title %}Import · Lumière{% endblock %} + +{% block content %} +
+
+

Letterboxd

+

Import diary CSV

+
+ + {% if error %} +
{{ error }}
+ {% endif %} + +
+
+ + +
+ +
+ Cancel + +
+
+
+ +
+
+

Queue

+

Import watchlist CSV

+
+ +
+
+ + +
+ +
+ Cancel + +
+
+
+ +
+
+

TMDB

+

Fetch missing posters

+
+ +

+ Match imported films against TMDB and fill blank posters plus missing metadata. +

+ +
+
+ +
+
+
+ +
+
+

Data

+

Clear duplicates

+
+ +

+ Remove repeated imports that match the same film and watched date, keeping the oldest entry. +

+ +
+
+ +
+
+
+ +
+
+

Data

+

Clear diary

+
+ +

+ Remove every film entry from Lumière and reset the local database counter. +

+ +
+
+ +
+
+
+{% endblock %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..52c633f --- /dev/null +++ b/templates/index.html @@ -0,0 +1,64 @@ +{% extends "base.html" %} + +{% block title %}{{ shelf_meta.title }} · Lumière{% endblock %} + +{% block content %} +
+

{{ shelf_meta.eyebrow }}

+
+

{{ shelf_meta.title }}

+ {% if active_shelf == 'queue' %} + Surprise me + {% endif %} +
+
+ + {% if imported is not none %} +
{{ imported }} entries imported.
+ {% endif %} + + {% if skipped is not none and skipped %} +
{{ skipped }} duplicate entries skipped.
+ {% endif %} + + {% if cleared is not none %} +
{{ cleared }} entries cleared.
+ {% endif %} + + {% if deduped is not none %} +
{{ deduped }} duplicate entries removed.
+ {% endif %} + + {% if empty_queue is not none %} +
The queue is empty. Add a film to get a random pick.
+ {% endif %} + + {% if enriched is not none %} +
{{ enriched }} entries enriched from TMDB.
+ {% endif %} + + {% if films %} +
+ {% if active_shelf == 'diary' and grouped_films %} + {% for group in grouped_films %} +
+

{{ group.month }}

+ {% for film in group.films %} + {% include "_film_card.html" %} + {% endfor %} +
+ {% endfor %} + {% else %} + {% for film in films %} + {% include "_film_card.html" %} + {% endfor %} + {% endif %} +
+ {% else %} +
+

{{ shelf_meta.empty_title }}

+

{{ shelf_meta.empty_text }}

+ Add Film +
+ {% endif %} +{% endblock %} diff --git a/templates/stats.html b/templates/stats.html new file mode 100644 index 0000000..7b54634 --- /dev/null +++ b/templates/stats.html @@ -0,0 +1,268 @@ +{% extends "base.html" %} + +{% block title %}Stats · Lumière{% endblock %} + +{% block content %} +
+

Stats

+

Watching patterns

+
+ +
+
+
+
+

World Map

+

Films per country

+
+
+
+
+ Hover a country + Film count will appear here. +
+ +
+ +
+
+
+

Heatmap

+

Past 365 days

+
+
+
+
+ +
+
+
+

Directors

+

Most watched

+
+
+
    +
    + +
    +
    +
    +

    Stars

    +

    Distribution

    +
    +
    +
    +
    + +
    +
    +
    +

    Rewatch

    +

    Rate

    +
    +
    +
    +
    + +
    +
    +
    +

    Companions

    +

    Watched with

    +
    +
    +
      +
      +
      +{% endblock %} + +{% block scripts %} + + + +{% endblock %} -- cgit v1.3-2-g0d8e