1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Refactor: add webring data from a CSV

The webring list was getting repetitive.
This commit is contained in:
Rohan Kumar 2022-03-15 13:45:21 -07:00
parent 0aefb5d083
commit c0666aa259
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479
3 changed files with 18 additions and 27 deletions

5
csv/webrings.csv Normal file
View file

@ -0,0 +1,5 @@
name,prev,home,next
An Indieweb Webring,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous,https://xn--sr8hvo.ws/,https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next
Fediring,https://fediring.net/previous?host=seirdy.one,https://fediring.net/,https://fediring.net/next?host=seirdy.one
The Yesterweb ring,https://webring.yesterweb.org/noJS/index.php?d=prev&url=https://seirdy.one/,https://yesterweb.org/webring/,https://webring.yesterweb.org/noJS/index.php?d=next&url=https://seirdy.one/
The Retronaut webring,https://webring.dinhe.net/prev/https://seirdy.one,https://webring.dinhe.net/,https://webring.dinhe.net/next/https://seirdy.one
1 name prev home next
2 An Indieweb Webring https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous https://xn--sr8hvo.ws/ https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next
3 Fediring https://fediring.net/previous?host=seirdy.one https://fediring.net/ https://fediring.net/next?host=seirdy.one
4 The Yesterweb ring https://webring.yesterweb.org/noJS/index.php?d=prev&url=https://seirdy.one/ https://yesterweb.org/webring/ https://webring.yesterweb.org/noJS/index.php?d=next&url=https://seirdy.one/
5 The Retronaut webring https://webring.dinhe.net/prev/https://seirdy.one https://webring.dinhe.net/ https://webring.dinhe.net/next/https://seirdy.one

View file

@ -1,30 +1,5 @@
{{ define "main" }}
{{ .Content }}
{{- partial "posts.html" . -}}
<h2 id="part-of">Webrings</h2>
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>:</p>
<p>
<a href="https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/previous" rel="nofollow ugc"></a> ·
<a href="https://xn--sr8hvo.ws/">An IndieWeb Webring</a> ·
<a href="https://xn--sr8hvo.ws/%F0%9F%98%A9%F0%9F%9A%A3%F0%9F%8D%91/next" rel="nofollow ugc"></a>
</p>
<p>
<a href="https://fediring.net/previous?host=seirdy.one" rel="nofollow ugc"></a> ·
<a href="https://fediring.net/">Fediring</a> ·
<a href="https://fediring.net/next?host=seirdy.one" rel="nofollow ugc"></a>
</p>
<p>
<a href="https://webring.yesterweb.org/noJS/index.php?d=prev&url=https://seirdy.one/" rel="nofollow ugc"></a> ·
<a href="https://yesterweb.org/webring/">The Yesterweb ring</a> ·
<a href="https://webring.yesterweb.org/noJS/index.php?d=next&url=https://seirdy.one/" rel="nofollow ugc"></a>
</p>
<p>
<a href="https://webring.dinhe.net/prev/https://seirdy.one" rel="nofollow ugc"></a> ·
<a href="https://webring.dinhe.net/">The retronaut webring</a> ·
<a href="https://webring.dinhe.net/next/https://seirdy.one" rel="nofollow ugc"></a>
</p>
{{ partial "posts.html" . }}
{{ partial "webrings.html" . }}
{{ end }}

View file

@ -0,0 +1,11 @@
<h2 id="part-of">Webrings</h2>
<p>This site is part of some <a href="https://en.wikipedia.org/wiki/Webring">webrings</a>:</p>
{{ range $i, $r := after 1 (getCSV "," "/csv/webrings.csv") }}
<p>
<a href="{{- index $r 1 -}}" rel="nofollow ugc"></a> ·
<a href="{{- index $r 2 -}}">{{- index $r 0 -}}</a> ·
<a href="{{- index $r 3 -}}" rel="nofollow ugc"></a>
</p>
{{ end }}