From 0c80215ab02976d0de62c242e72136f62a5ad612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nu=C5=A1a=20Puk=C5=A1i=C4=8D?= Date: Thu, 11 Dec 2025 11:49:40 +0100 Subject: [PATCH] Follows --- .../event/_kind39089_followPack.html.twig | 39 ++++++++++++++++ templates/event/index.html.twig | 2 + templates/follows/index.html.twig | 45 +++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 templates/event/_kind39089_followPack.html.twig create mode 100644 templates/follows/index.html.twig diff --git a/templates/event/_kind39089_followPack.html.twig b/templates/event/_kind39089_followPack.html.twig new file mode 100644 index 0000000..f04761a --- /dev/null +++ b/templates/event/_kind39089_followPack.html.twig @@ -0,0 +1,39 @@ +{% set peeps = [] %} +{% set description = '' %} +{% set cover = null %} +{% for tag in event.tags %} + {% if tag[0] == 'description' %} + {% set description = tag[1] %} + {% endif %} + {% if tag[0] == 'image' %} + {% set cover = tag[1] %} + {% endif %} + {% if tag[0] == 'p' %} + {% set peeps = peeps|merge([tag[1]]) %} + {% endif %} +{% endfor %} + +{% if not description is empty %} +
+

{{ description }}

+
+{% endif %} + +{% if cover %} +
+ Event Cover Image +
+{% endif %} + +{% if peeps %} +
+

People

+
+ {% for person in peeps %} + {# Use pre-fetched profile if available #} + {% set userProfile = followPackProfiles[person] ?? null %} + + {% endfor %} +
+
+{% endif %} diff --git a/templates/event/index.html.twig b/templates/event/index.html.twig index 184e2f6..0d0790c 100644 --- a/templates/event/index.html.twig +++ b/templates/event/index.html.twig @@ -117,6 +117,8 @@ {% include 'event/_kind1450_tabular.html.twig' %} {% elseif event.kind == 10015 %} {% include 'event/_kind10015_tags.html.twig' %} + {% elseif event.kind == 39089 %} + {% include 'event/_kind39089_followPack.html.twig' %} {% else %} {# Regular event content for non-picture and non-video events #}
diff --git a/templates/follows/index.html.twig b/templates/follows/index.html.twig new file mode 100644 index 0000000..c02dd81 --- /dev/null +++ b/templates/follows/index.html.twig @@ -0,0 +1,45 @@ +{% extends 'layout.html.twig' %} + +{% block body %} +
+
+

Following

+

articles from people you follow

+
+
+ +
+ {% if not isLoggedIn %} +
+

Sign in to see articles from people you follow

+

You need to be logged in to view articles from your follow list.

+ Sign In +
+ {% elseif error is defined %} +
+

Error

+

{{ error }}

+
+ {% elseif followCount is defined and followCount == 0 %} +
+

You're not following anyone yet

+

Start following people on Nostr to see their articles here. Your follow list will be synced automatically.

+
+ {% elseif articles is empty %} +
+

No articles found

+

The people you follow haven't published any articles yet, or they haven't been synced to this newsroom.

+
+ {% else %} +
+ +
+ {% endif %} +
+{% endblock %} + +{% block aside %} + + +{% endblock %} +