Browse Source

bug-fixes

master
Silberengel 4 weeks ago
parent
commit
b2b053f5d1
  1. 13
      internal/generator/html.go
  2. BIN
      server
  3. 6
      static/css/main.css
  4. 6
      static/css/responsive.css
  5. 2
      templates/contact.html
  6. 6
      templates/feed.html

13
internal/generator/html.go

@ -845,6 +845,18 @@ func (g *HTMLGenerator) GenerateErrorPage(statusCode int, feedItems []FeedItemIn
func (g *HTMLGenerator) GenerateFeedPage(feedItems []FeedItemInfo) (string, error) { func (g *HTMLGenerator) GenerateFeedPage(feedItems []FeedItemInfo) (string, error) {
canonicalURL := g.siteURL + "/feed" 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{ data := PageData{
Title: "TheForest Feed", Title: "TheForest Feed",
Description: "Recent notes from TheForest relay", Description: "Recent notes from TheForest relay",
@ -857,6 +869,7 @@ func (g *HTMLGenerator) GenerateFeedPage(feedItems []FeedItemInfo) (string, erro
WikiPages: []WikiPageInfo{}, WikiPages: []WikiPageInfo{},
FeedItems: feedItems, FeedItems: feedItems,
Content: template.HTML(""), // Content comes from template Content: template.HTML(""), // Content comes from template
Profiles: profiles,
} }
// Use renderTemplate but with custom data for feed // Use renderTemplate but with custom data for feed

BIN
server

Binary file not shown.

6
static/css/main.css

@ -1505,6 +1505,12 @@ textarea:focus-visible {
margin: 0 auto; margin: 0 auto;
} }
.feed-page {
max-width: 800px;
margin: 0 auto;
padding: 2rem;
}
.feed-about-blurb { .feed-about-blurb {
background: var(--bg-secondary); background: var(--bg-secondary);
padding: 1.5rem; padding: 1.5rem;

6
static/css/responsive.css

@ -563,6 +563,7 @@
/* Feed */ /* Feed */
.feed-page { .feed-page {
padding: 1rem; padding: 1rem;
max-width: 100%;
} }
.feed-about-blurb { .feed-about-blurb {
@ -827,6 +828,11 @@
gap: 1.5rem; gap: 1.5rem;
} }
.feed-page {
max-width: 90%;
padding: 1.5rem;
}
h1 { h1 {
font-size: 2rem; font-size: 2rem;
} }

2
templates/contact.html

@ -16,7 +16,7 @@
</a> </a>
</li> </li>
<li> <li>
<a href="https://alexandria.gitcitadel.eu/events?id=npub1m3xdppkd0njmrqe2ma8a6ys39zvgp5k8u22mev8xsnqp4nh80srqhqa5sf" target="_blank" rel="noopener noreferrer"> <a href="https://alexandria.gitcitadel.eu/events?id=npub1s3ht77dq4zqnya8vjun5jp3p44pr794ru36d0ltxu65chljw8xjqd975wz" target="_blank" rel="noopener noreferrer">
<span class="icon-inline">{{icon "user"}}</span> GitCitadel on Alexandria <span class="icon-inline">{{icon "user"}}</span> GitCitadel on Alexandria
</a> </a>
</li> </li>

6
templates/feed.html

@ -9,9 +9,9 @@
<h2>About TheForest Relay</h2> <h2>About TheForest Relay</h2>
<p>TheForest is a Nostr relay operated by GitCitadel. It provides a reliable, fast, and open relay service for the Nostr protocol.</p> <p>TheForest is a Nostr relay operated by GitCitadel. It provides a reliable, fast, and open relay service for the Nostr protocol.</p>
<ul> <ul>
<li><strong>Relay URL:</strong> <a href="https://theforest.nostr1.com" target="_blank" rel="noopener noreferrer"><code>wss://theforest.nostr1.com</code></a></li> <li><strong>Relay URL: </strong> <a href="https://theforest.nostr1.com" target="_blank" rel="noopener noreferrer"><code>wss://theforest.nostr1.com</code></a></li>
<li><strong>Status:</strong> Online and operational</li> <li><strong>Status: </strong> Online and operational</li>
<li><strong>Features:</strong> Supports all standard Nostr event kinds</li> <li><strong>Features: </strong> Supports all standard Nostr event kinds</li>
</ul> </ul>
<p>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).</p> <p>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).</p>
</div> </div>

Loading…
Cancel
Save