small pixel drawing of a pufferfish vore

files/feeds.tmpl.html

{{ define "feeds" }}
{{ template "head" . }}
{{ template "nav" . }}
<h3>subscribed feeds</h3>
{{ if .LoggedIn }}
{{ $length := len .Data }}
{{ if eq $length 1 }}
<p>you're subscribed to 1 feed
{{ else }}
<p>you're subscribed to {{ len .Data }} feeds
{{ end }}
<form method="POST" action="/feeds/submit">
<textarea name="submit" rows="10" cols="50">
{{ range .Data -}}
{{ .UpdateURL }}
{{ end -}}
</textarea>
<br>
<input type="submit" value="update feeds">
</form>
{{ $length := len .Data }}
{{ if eq $length 0 }}
<pre>
              ‼️ tutorial ‼️

vore supports one type of action: submitting feeds

when you submit feeds:
  - the feeds are validated and fetched
  - the feeds are saved to the vore database
  - your user is subscribed to the feeds

once you have subscribed to some feeds,
their posts will appear on your <a href="/{{ .Username }}">homepage</a>

note that your homepage is public ‼️

here are some feed urls to play with - copy them into
the text box above, then press [update feeds]

https://100r.co/links/rss.xml
https://begriffs.com/atom.xml
https://cyberia.club/blog/blog.xml
https://davebucklin.com/feed.xml
https://facklambda.dev/atom.xml
https://herman.bearblog.dev/feed/
https://j3s.sh/feed.atom
https://katherine.cox-buday.com/rss.xml
https://sequentialread.com/rss



  /)/)
( . .)
( づ♡
</pre>
{{ else if gt $length 0 }}
<h3>feed details</h3>
{{ end }}
{{ range .Data }}
<pre>
{{ if .Title }}{{ .Title }}{{ else }}{{ .UpdateURL }}{{ end }} {
    title = {{ .Title }}
     desc = {{ .Description }}
      url = {{ .UpdateURL }}
    items = {{ len .Items }}
}
</pre>
{{ end }}
{{ else }}
	<p>⚠️ unauthorized: please log in
{{ end }}
{{ template "tail" . }}
{{ end }}