From b2b053f5d11094495d55e1d80841f8acf09d6d30 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Mon, 16 Feb 2026 13:49:59 +0100 Subject: [PATCH] bug-fixes --- internal/generator/html.go | 13 +++++++++++++ server | Bin 13649579 -> 13649579 bytes static/css/main.css | 6 ++++++ static/css/responsive.css | 6 ++++++ templates/contact.html | 2 +- templates/feed.html | 6 +++--- 6 files changed, 29 insertions(+), 4 deletions(-) diff --git a/internal/generator/html.go b/internal/generator/html.go index a6c53a1..a5153d5 100644 --- a/internal/generator/html.go +++ b/internal/generator/html.go @@ -845,6 +845,18 @@ func (g *HTMLGenerator) GenerateErrorPage(statusCode int, feedItems []FeedItemIn func (g *HTMLGenerator) GenerateFeedPage(feedItems []FeedItemInfo) (string, error) { canonicalURL := g.siteURL + "/feed" + // Collect pubkeys from feed items + pubkeys := make([]string, 0, len(feedItems)) + for _, item := range feedItems { + if item.Author != "" { + pubkeys = append(pubkeys, item.Author) + } + } + + // Fetch profiles for all authors + ctx := context.Background() + profiles := g.fetchProfilesBatch(ctx, pubkeys) + data := PageData{ Title: "TheForest Feed", Description: "Recent notes from TheForest relay", @@ -857,6 +869,7 @@ func (g *HTMLGenerator) GenerateFeedPage(feedItems []FeedItemInfo) (string, erro WikiPages: []WikiPageInfo{}, FeedItems: feedItems, Content: template.HTML(""), // Content comes from template + Profiles: profiles, } // Use renderTemplate but with custom data for feed diff --git a/server b/server index 71fa4ea3f6b3ec45a523e8e542b4db61491dbfaa..288d13904428281a88422ee65ed0e46f15c82a55 100755 GIT binary patch delta 1049 zcmbWyS6fm60D$4Aq3x(>TG=iu6*!#30o#RA0v1q-MUf1%6cnUTTb30KEt}ZhlZH)- zY}nrQ6M7#0NMC=Ui}&)o_!6yMnF(~XDIB({8iQRIsf|YJjfG|@>NJ;nRMkr+FcAORK^Tl7P+};CVK_!$Bt{_%qcH|!k&ST}j|rHF zNtlc&n2Kr0!F0^POynXD`A|U(4FqT*LV^x5^e~_RvoITTFcvbm3Mb023ajD58mxsI>rf64yvek}*J8<0i;`Zall(qe zsPL=RvQ|@}_ZnoiT(0$tURjg{k4BaZVm$8hWoKv&1(Gh7a{1s#1=gby8?X^os73%m z)Swn2gi(hGHeoZOs7C`Du?1VP4coB;P1uQDXvS{r!Cu6$5BqTd2a_pR%b(8wIg4|a zA5&(v;t&p_4M%Vk$8a1ca1wE};}lNg49?;l&f@|u;u0?73a;WBuHy!7;udZrfjhX1 zd$^AdJitRd!eczaQzY>W&ym6lbmApm;Wgf%3vclb@9_a2@d=;t1z+(E-|+)K@hhp! I`rV%U7tn^Cr~m)} delta 1049 zcmbWyS6fm60D$4Aq3x(_QrRvm6FI<kv z*|5FqC-gl2k-q*y7w_eF@g-V1(-UZKRk7o4Qo7 zE>$;lM-TKw8q(1Vz0n7K(GUGG00Z%_9fZLcf(#7BFbu~CjKnCYF&bkq7MU1_@tA;# zn1sogf~lB>EKJ7?%tSV3AqN`dLJI*p=wX0}JQyJ%AG0wBb1@I|u>dA4gc%kTzzQ2= zEP@@2;eZo`D8drBPz*ObC_yR8P>!Xjz%qET94k-Dea4?zjHvj4PpR+h; zIk60N3l8BhT5$wNaSX?C0w)ni8&2Ug&fqN0;XE$jA}--FuHY)J;W}>MCT`(261aoA zxQF{_#{)dXBRs|vJVg@E@Ej?;KnGsp6<*^FI`J0o@E#xV5uflGU+@**@Et$!6Tgxf J>fdeIe*sXTo}mB$ diff --git a/static/css/main.css b/static/css/main.css index 4967f38..1b4b0aa 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -1505,6 +1505,12 @@ textarea:focus-visible { margin: 0 auto; } +.feed-page { + max-width: 800px; + margin: 0 auto; + padding: 2rem; +} + .feed-about-blurb { background: var(--bg-secondary); padding: 1.5rem; diff --git a/static/css/responsive.css b/static/css/responsive.css index c27560e..b204b6e 100644 --- a/static/css/responsive.css +++ b/static/css/responsive.css @@ -563,6 +563,7 @@ /* Feed */ .feed-page { padding: 1rem; + max-width: 100%; } .feed-about-blurb { @@ -827,6 +828,11 @@ gap: 1.5rem; } + .feed-page { + max-width: 90%; + padding: 1.5rem; + } + h1 { font-size: 2rem; } diff --git a/templates/contact.html b/templates/contact.html index c3470c5..5748b35 100644 --- a/templates/contact.html +++ b/templates/contact.html @@ -16,7 +16,7 @@
  • - + {{icon "user"}} GitCitadel on Alexandria
  • diff --git a/templates/feed.html b/templates/feed.html index 84603bd..13a1c9f 100644 --- a/templates/feed.html +++ b/templates/feed.html @@ -9,9 +9,9 @@

    About TheForest Relay

    TheForest is a Nostr relay operated by GitCitadel. It provides a reliable, fast, and open relay service for the Nostr protocol.

    TheForest relay hosts a variety of content, including longform markdown articles (kind 30023), e-books and structured publications (kind 30040), and short-form notes (kind 1).