From fad73a9fab227dd809df9d4a9388baa669779d6f Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Wed, 3 Jun 2026 10:07:45 +0200 Subject: [PATCH] feat: add embed_profile.html template --- .../templates/embed_profile.html | 189 ++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 crates/adapters/template-askama/templates/embed_profile.html diff --git a/crates/adapters/template-askama/templates/embed_profile.html b/crates/adapters/template-askama/templates/embed_profile.html new file mode 100644 index 0000000..9f28404 --- /dev/null +++ b/crates/adapters/template-askama/templates/embed_profile.html @@ -0,0 +1,189 @@ +{% extends "embed_base.html" %} +{% block content %} +
+ +
+
{{ profile_display_name }}
+
+
+
{{ stats.total_movies }}
+
movies
+
+
+
{{ avg_rating_display }}★
+
avg rating
+
+
+
{{ favorite_director_display }}
+
fav director
+
+
+
{{ most_active_month_display }}
+
most active
+
+
+
+ + + + {% if view == "recent" || view == "ratings" %} +
+ + + +
+ +
+
+ {% endif %} + + {% if view == "history" %} + {% if let Some(hist) = history %} +
+
Movies watched this year
+
+ {% for cell in heatmap %} +
+
{{ cell.count }}
+
{{ cell.month_label }}
+
+ {% endfor %} +
+
+ {% for month in hist %} +
+

{{ month.month_label }} {{ month.count }}

+
+ {% for entry in month.entries %} +
+ {% if let Some(poster) = entry.movie().poster_path() %} +
+ {% endif %} +
+
{{ entry.movie().title().value() }} ({{ entry.movie().release_year().value() }})
+ {% if let Some(dir) = entry.movie().director() %}
{{ dir }}
{% endif %} +
+ {% for filled in entry.review().stars() %} + + {% endfor %} +
+
{{ entry.review().watched_at().format("%b %-d") }}
+
+
+ {% endfor %} +
+
+ {% else %} +

No movies logged yet.

+ {% endfor %} + {% endif %} + + {% elif view == "trends" %} + {% if let Some(t) = trends %} + + {% endif %} + + {% else %} + {% if let Some(paged) = entries %} +
+ {% for entry in paged.items %} +
+ {% if let Some(poster) = entry.movie().poster_path() %} +
+ +
+ {% endif %} +
+
+ {{ entry.movie().title().value() }} + ({{ entry.movie().release_year().value() }}) +
+ {% if let Some(dir) = entry.movie().director() %} +
{{ dir }}
+ {% endif %} +
+ {% for filled in entry.review().stars() %} + + {% endfor %} +
+ {% if let Some(comment) = entry.review().comment() %} +
{{ comment.value() }}
+ {% endif %} +
{{ entry.review().watched_at().format("%Y-%m-%d") }}
+
+
+ {% else %} +

No reviews yet.

+ {% endfor %} +
+ + {% endif %} + {% endif %} + + + +
+{% endblock %}