Add RSS feeds (#194)

Closes #179

Reviewed-on: https://codeberg.org/rimgo/rimgo/pulls/194
Reviewed-by: orangix <orangix@noreply.codeberg.org>
Co-authored-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
Co-committed-by: video-prize-ranch <cb.8a3w5@simplelogin.co>
This commit is contained in:
video-prize-ranch
2025-02-24 02:48:56 +00:00
committed by video-prize-ranch
parent 65e4a5f08e
commit 4e3022ce1a
11 changed files with 195 additions and 49 deletions

View File

@@ -5,6 +5,9 @@
<title>{{tag.Display}} - rimgo</title>
{{> partials/head }}
<link href="/t/{{tag.Tag}}.rss" rel="alternate" title={{tag.Display}} type="application/rss+xml"
<link href="/t/{{tag.Tag}}.atom" rel="alternate" title={{tag.Display}} type="application/atom+xml">
<link href="/t/{{tag.Tag}}.json" rel="alternate" title={{tag.Display}} type="application/feed+json">
</head>
<body class="font-sans text-lg bg-slate-800 text-white">
@@ -16,7 +19,12 @@
<header class="p-4 rounded-xl text-white mb-4" style="background-image: url('{{tag.Background}}');">
<div class="flex flex-col items-center justify-center text-center">
<h2 class="text-2xl font-bold">{{tag.Display}}</h2>
<div class="flex gap-2 items-center">
<h2 class="text-2xl font-bold">{{tag.Display}}</h2>
<a href="/t/{{tag.Tag}}.rss" label="RSS">
<img src="/static/icons/PhRss.svg" width="24px" height="24px" class="invert" />
</a>
</div>
<p>{{tag.PostCount}} posts</p>
</div>
<div class="flex flex-col">
@@ -37,7 +45,7 @@
{{/equal}}
</div>
</header>
<main>
<div class="posts">
{{#each tag.Posts}}

View File

@@ -5,6 +5,9 @@
<title>Trending - rimgo</title>
{{> partials/head }}
<link href="/trending.rss" rel="alternate" title="Trending" type="application/rss+xml">
<link href="/trending.atom" rel="alternate" title="Trending" type="application/atom+xml">
<link href="/trending.json" rel="alternate" title="Trending" type="application/feed+json">
</head>
<body class="font-sans text-lg bg-slate-800 text-white">
@@ -15,8 +18,11 @@
</section>
<header class="p-4 rounded-xl text-white mb-4 bg-gradient-to-r from-blue-400 to-emerald-400">
<div class="flex flex-col items-center justify-center text-center">
<div class="flex items-center justify-center text-center gap-2">
<h2 class="text-2xl font-extrabold">Trending</h2>
<a href="/trending.rss" label="RSS">
<img src="/static/icons/PhRss.svg" width="24px" height="24px" class="invert" />
</a>
</div>
<div class="flex flex-col sm:flex-row sm:justify-between">
<div class="flex flex-col">

View File

@@ -5,6 +5,9 @@
<title>{{user.Username}} - rimgo</title>
{{> partials/head }}
<link href="/user/{{user.Username}}.rss" rel="alternate" title={{user.Username}} type="application/rss+xml">
<link href="/user/{{user.Username}}.atom" rel="alternate" title={{user.Username}} type="application/atom+xml">
<link href="/user/{{user.Username}}.json" rel="alternate" title={{user.Username}} type="application/feed+json">
</head>
<body class="font-sans text-lg bg-slate-800 text-white">
@@ -18,7 +21,12 @@
<div class="flex flex-col sm:flex-row items-center gap-2">
<img class="rounded-full" src="{{user.Avatar}}" width="72" height="72">
<div class="items-center sm:items-start text-center sm:text-left">
<h2 class="font-bold text-2xl">{{user.Username}}</h2>
<div class="flex flex-row gap-2 items-center">
<h2 class="font-bold text-2xl">{{user.Username}}</h2>
<a href="/user/{{user.Username}}.rss" label="RSS">
<img src="/static/icons/PhRss.svg" width="24px" height="24px" class="invert" />
</a>
</div>
<p>{{user.Points}} pts · {{user.CreatedAt}}</p>
</div>
<hr class="sm:border-0 flex-grow">