From cdd28b6c0a3a6444b9ae79b123fe4fa7401de5ab Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Thu, 14 May 2026 01:31:34 -0700 Subject: Refine Lumi layouts and public profile --- templates/_feed_partial.html | 12 +- templates/_film_card.html | 112 +++++---- templates/_public_feed_partial.html | 71 ++++++ templates/base.html | 66 ++++-- templates/detail.html | 455 ++++++++++++++++++++++-------------- templates/form.html | 226 ++++++++++-------- templates/index.html | 65 +++--- templates/profile.html | 298 +++++++++++------------ 8 files changed, 788 insertions(+), 517 deletions(-) create mode 100644 templates/_public_feed_partial.html (limited to 'templates') diff --git a/templates/_feed_partial.html b/templates/_feed_partial.html index e22cdde..47800be 100644 --- a/templates/_feed_partial.html +++ b/templates/_feed_partial.html @@ -1,10 +1,14 @@ {% if active_shelf == 'diary' and grouped_films %} {% for group in grouped_films %}
-

{{ group.month }}

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

{{ group.month }}

+
+
+ {% for film in group.films %} + {% include "_film_card.html" %} + {% endfor %} +
{% endfor %} {% else %} diff --git a/templates/_film_card.html b/templates/_film_card.html index a4e206f..6723821 100644 --- a/templates/_film_card.html +++ b/templates/_film_card.html @@ -7,8 +7,8 @@ {% endif %}
-
-
+
+

{{ film.title }}

{% if film.year %}{{ film.year }}{% endif %} @@ -21,6 +21,55 @@ {% endif %}

+ +
+ {{ film.shelf|title }} + {% 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.language or film.genre or film.context or film.how_found or film.watched_with %} +
+ {% if film.language %} +
+ Lang + {{ film.language }} +
+ {% endif %} + {% if film.genre %} +
+ Genre + {{ film.genre }} +
+ {% endif %} + {% if film.context %} +
+ Context + {{ film.context }} +
+ {% endif %} + {% if film.how_found %} +
+ 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 == 'diary' %}
{% for value in range(1, 4) %} @@ -36,48 +85,27 @@ {% elif 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{% if film.rewatch_count %} #{{ film.rewatch_count }}{% endif %}{% endif %} -
- {% if film.genre or film.context or film.how_found or film.watched_with %} -
- {% if film.genre %}{{ film.genre }}{% endif %} - {% if film.context %}{{ film.context }}{% endif %} - {% if film.how_found %}{{ film.how_found }}{% endif %} - {% if film.watched_with %}With {{ film.watched_with }}{% endif %} +
+ {% if film.shelf == 'queue' %} + Mark watched +
+ +
+ {% elif film.shelf == 'diary' %} +
+ +
+
+ +
+ {% else %} + Mark watched +
+ +
+ {% 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/_public_feed_partial.html b/templates/_public_feed_partial.html new file mode 100644 index 0000000..ba84c61 --- /dev/null +++ b/templates/_public_feed_partial.html @@ -0,0 +1,71 @@ +{% for film in films %} +
+
+ {% 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 %} + {{ directors|join(", ") }} + {% endif %} +

+
+ {% if film.stars %} + {% for _ in range(film.stars) %}✦{% endfor %} + {% endif %} +
+ +
+ Diary + {% 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.language or film.genre or film.context or film.how_found or film.watched_with %} +
+ {% if film.language %} +
+ Lang + {{ film.language }} +
+ {% endif %} + {% if film.genre %} +
+ Genre + {{ film.genre }} +
+ {% endif %} + {% if film.context %} +
+ Context + {{ film.context }} +
+ {% endif %} + {% if film.how_found %} +
+ Found + {{ film.how_found }} +
+ {% endif %} + {% if film.watched_with %} +
+ With + {{ film.watched_with }} +
+ {% endif %} +
+ {% endif %} +
+
+{% endfor %} diff --git a/templates/base.html b/templates/base.html index 4e814ad..1b48f06 100644 --- a/templates/base.html +++ b/templates/base.html @@ -10,26 +10,56 @@
-
- Lumière - - -
+
+ + +
+
+ Lumière + + +
-
- {% block content %}{% endblock %} -
+
+ {% block content %}{% endblock %} +
+
{% block scripts %}{% endblock %} diff --git a/templates/detail.html b/templates/detail.html index 9c558f7..f51372d 100644 --- a/templates/detail.html +++ b/templates/detail.html @@ -17,236 +17,335 @@ - - {% endif %} - -
-
- Shelf - {{ film.shelf|title }} -
-
- Watched - {% if film.date_watched %}{{ film.date_watched }}{% else %}Not set{% endif %} -
-
- Stars - {% if film.stars %}{% for _ in range(film.stars) %}✦{% endfor %}{% else %}Unstarred{% endif %} -
-
-

{{ 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 %} +

+
+

{{ film.shelf|title }} Entry

+

{{ film.title }}

+ {% if film.original_title %} +

{{ film.original_title }}

{% endif %} -

- {% if ratings %} -
- {% if ratings.imdb %} - - IMDb - {{ ratings.imdb }} - - {% endif %} - {% if ratings.rt %} - - Rotten Tomatoes - {{ ratings.rt }} - - {% endif %} - {% if ratings.metacritic %} - - Metacritic - {{ ratings.metacritic }} - +
+

+ {% 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 ratings %} +
+ {% if ratings.imdb %} + + IMDb + {{ ratings.imdb }} + + {% endif %} + {% if ratings.rt %} + + Rotten Tomatoes + {{ ratings.rt }} + + {% endif %} + {% if ratings.metacritic %} + + Metacritic + {{ ratings.metacritic }} + + {% endif %} +
+ {% endif %} +
+
+ +
+ Edit + {% if film.shelf == 'queue' %} + Mark watched +
+ +
+ {% elif film.shelf == 'diary' %} +
+ +
+
+ +
+ {% else %} + Mark watched +
+ +
{% endif %} +
+ +
- {% 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 %} +
+
-
-

Production

-
- {% if film.genre %}{{ film.genre }}{% endif %} - {% 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 %} -
-
-
+
+

Watch log

+
+ {% if film.date_watched %} +
+ Watched + {{ film.date_watched }} +
+ {% endif %} + {% if film.runtime %} +
+ Runtime + {{ film.runtime }} min +
+ {% endif %} + {% if film.rewatch %} +
+ Rewatch + Yes{% if film.rewatch_count %} · #{{ film.rewatch_count }}{% endif %} +
+ {% endif %} + {% if film.watched_with %} +
+ With + {{ film.watched_with }} +
+ {% endif %} + {% if film.context %} +
+ Context + {{ film.context }} +
+ {% endif %} + {% if film.how_found %} +
+ Found + {{ film.how_found }} +
+ {% endif %} +
+
- {% 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 %} -

+
+

Production

+
+ {% if film.genre %} +
+ Genre + {{ film.genre }} +
+ {% endif %} + {% if film.country %} +
+ Country + {{ film.country }} +
+ {% endif %} + {% if film.language %} +
+ Lang + {{ film.language }} +
+ {% endif %} + {% if film.year %} +
+ Year + {{ film.year }} +
+ {% endif %} + {% if film.tmdb_id %} +
+ TMDB + {{ film.tmdb_id }} +
+ {% endif %}
- {% 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 }}) +
+ + +
+ {% 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 %} -
- {% endfor %} -
-
- {% endif %} +
- {% 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(", ") }}

+ {% 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 %} +

+
+ {% 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 }}) + {% endif %} + {% endif %} + + {% endif %} +
+ {% endfor %}
+
{% endif %} -
- {% endif %} - -
-

Notes

- {% if film.notes %} -
{{ film.notes }}
- {% else %} -

No notes saved.

- {% endif %} +
- -
- Edit - {% if film.shelf == 'queue' %} - Mark watched -
- -
- {% elif film.shelf == 'diary' %} -
- -
-
- -
- {% else %} - Mark watched -
- -
- {% endif %} -
- -
-
+ {% if film.tmdb_id %} + + {% endif %} + {% if film.tmdb_id %} {% endif %} diff --git a/templates/form.html b/templates/form.html index cd29e67..f7bbbf1 100644 --- a/templates/form.html +++ b/templates/form.html @@ -13,138 +13,168 @@ {% set current_stars = film.stars if film and film.stars else 0 %} -
-

Diary Entry

-
-

{{ page_title }}

-
- {% for value in range(1, 4) %} - - {% endfor %} +
+
+

Diary Entry

+
+
+

{{ page_title }}

+

Search TMDB first, then tune the entry like a ledger instead of filling a blank spreadsheet.

+
+
+ {% for value in range(1, 4) %} + + {% endfor %} +
-
+ -
- +
+
+

Lookup

+

TMDB title search

+
-
+ -
-
- - +
+
+

Identity

+

Core film record

+
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - +
+ + +
+
-
- - +
+
+

Log

+

Watch context

+
+
+ + +
-
- - {% set current_shelf = shelf_override if shelf_override else (film.shelf if film and film.shelf else 'diary') %} - -
+
+ + {% set current_shelf = shelf_override if shelf_override else (film.shelf if film and film.shelf else 'diary') %} + +
-
- -
+
+ +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - +
+ + +
+
-
- - +
+
+

Archive

+

Poster and notes

+
+
+ + +
-
-
- {% if film and film.poster_url %} - Poster preview - {% else %} - Poster preview - {% endif %} +
+
+ {% if film and film.poster_url %} + Poster preview + {% else %} + Poster preview + {% endif %} +
-
-
- - +
+ + +
-
+
Cancel diff --git a/templates/index.html b/templates/index.html index dc76e5d..7e74c07 100644 --- a/templates/index.html +++ b/templates/index.html @@ -3,35 +3,44 @@ {% block title %}{{ shelf_meta.title }} · Lumière{% endblock %} {% block content %} -
-

{{ shelf_meta.eyebrow }}

-
+
+
+

{{ shelf_meta.eyebrow }}

{{ shelf_meta.title }}

+

{{ shelf_meta.empty_text }}

+
+
+
+ Entries + {{ total_films or 0 }} +
{% if active_shelf == 'queue' %} Surprise me {% endif %}
-
- - -
+
+
+ + +
+
{% if imported is not none %}
{{ imported }} entries imported.
@@ -62,10 +71,14 @@ {% if active_shelf == 'diary' and grouped_films %} {% for group in grouped_films %}
-

{{ group.month }}

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

{{ group.month }}

+
+
+ {% for film in group.films %} + {% include "_film_card.html" %} + {% endfor %} +
{% endfor %} {% else %} diff --git a/templates/profile.html b/templates/profile.html index 7c847f4..bbf70a2 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -3,199 +3,175 @@ - Tyler's Film Diary - Lumière + Tyler's Film Diary · Lumière - -
-
- Lumière -
- - {% if films_per_country %} -
-

Top Countries

-
- {% for item in films_per_country %} -
-
{{ item.count }}
-
{{ item.country }}
+ {% if films_per_country %} +
+
+

Geography

+

Most watched countries

- {% endfor %} -
-
- {% endif %} - - - {% if recent_films %} -
-

Recently Watched

-
- {% for film in recent_films %} -
- {% if film.poster_url %} - {{ film.title }} - {% else %} -
No poster
- {% endif %} -

{{ film.title }}

- {% if film.stars %} -
- {% for i in range(film.stars) %}✦{% endfor %} +
+ {% for item in films_per_country %} +
+ {{ item.count }} + {{ item.country }}
- {% endif %} - {% if film.date_watched %} -
{{ film.date_watched[:10] }}
- {% endif %} + {% endfor %}
- {% endfor %} -
-
- {% endif %} + + {% endif %} + + {% if recent_films %} +
+
+

Recent

+

Recently watched

+
+
+ {% for film in recent_films %} +
+
+ {% if film.poster_url %} + {{ film.title }} poster + {% else %} + {{ film.title[:1] }} + {% endif %} +
+

{{ film.title }}

+

{{ film.year }}{% if film.director %} · {{ film.director }}{% endif %}

+ {% if film.date_watched %} + {{ film.date_watched[:10] }} + {% endif %} +
+ {% endfor %} +
+
+ {% endif %}
- + - - - -
+ -
-- cgit v1.3-2-g0d8e