all repos — flounder @ 976db1036ed6aa057228c685bcd74a15a38180b6

A small site builder for the Gemini protocol

Finish feed support
alex wennerberg alex@alexwennerberg.com
Tue, 15 Dec 2020 20:41:28 -0800
commit

976db1036ed6aa057228c685bcd74a15a38180b6

parent

9c0e563853c52e7790c21f7b740e01ef0c344f0d

3 files changed, 4 insertions(+), 3 deletions(-)

jump to
M gemfeed.gogemfeed.go

@@ -17,7 +17,7 @@

type Gemfeed struct { Title string Creator string - FeedUrl *url.URL + Url *url.URL Entries []*FeedEntry }

@@ -46,7 +46,7 @@ feed, err := ParseGemfeed(f, baseUrl, maxUserItems) // TODO make configurable

f.Close() if err == nil { feed.Creator = creator - feed.FeedUrl = &baseUrl + feed.Url = &baseUrl feedEntries = append(feedEntries, feed.Entries...) } }
M templates/feed.htmltemplates/feed.html

@@ -9,7 +9,7 @@ <h2>Feed:</h2>

{{ range .FeedEntries}} <p> {{.DateString}} <a href="//{{.Feed.Creator}}.{{$domain}}">{{.Feed.Creator}}</a> -{{ if .Feed.Title }}<a href="{{.Url}}" class='person-link'>({{.Feed.Title}}){{end}} {{.Title}}</a> +{{ if .Feed.Title }}<em><a href="{{.Feed.Url}}" class='person-link'>{{.Feed.Title}}</a></em>{{end}} <a href="{{.Url}}">{{.Title}}</a> </p> {{end}} {{template "footer" .}}
M templates/nav.htmltemplates/nav.html

@@ -1,5 +1,6 @@

<nav> <a href="/">home</a> + <a href="/feed">feed</a> {{ if .AuthUser.LoggedIn }} <a href="/my_site">my_site</a> <a href="/me">me</a>