Added a 'feeds' page for links to the feeds

This commit is contained in:
swagg boi 2023-09-25 23:33:23 -04:00
parent 8594ce0fae
commit 2a41696244
5 changed files with 36 additions and 5 deletions

View file

@ -135,6 +135,8 @@ sub startup($self) {
$r->get('/rules')->to('page#rules')->name('rules_page');
$r->get('/feeds')->to('page#feeds')->name('feeds_page');
$r->any([qw{GET POST}], '/captcha/*return_url')
->to('page#captcha')
->name('captcha_page');

View file

@ -8,6 +8,8 @@ sub about($self) { $self->render }
sub rules($self) { $self->render }
sub feeds($self) { $self->render }
sub captcha($self) {
my $v;

View file

@ -8,4 +8,6 @@ $t->get_ok('/about')->status_is(200)->text_like(h2 => qr/About Post::Text/);
$t->get_ok('/rules')->status_is(200)->text_like(h2 => qr/The Rules/);
$t->get_ok('/feeds')->status_is(200)->text_like(h2 => qr/Feeds/);
done_testing;

View file

@ -40,11 +40,7 @@
<%= link_to New => post_thread => (class => 'click') %>
<%= link_to About => about_page => (class => 'click') %>
<%= link_to Rules => rules_page => (class => 'click') %>
<%= link_to RSS => threads_feed => {format => 'rss'},
(class => 'click') %>
<% if (is_mod) { =%>
<%= link_to Logout => mod_logout => (class => 'click') %>
<% } =%>
<%= link_to Feeds => feeds_page => (class => 'click') %>
</nav>
<% if (is_mod) { =%>
<nav class="site-nav">
@ -52,6 +48,7 @@
<%= link_to Flagged => flagged_list => (class => 'click') %>
<%= link_to Hidden => hidden_list => (class => 'click') %>
<%= link_to Reset => mod_reset => (class => 'click') %>
<%= link_to Logout => mod_logout => (class => 'click') %>
</nav>
<% } =%>
<% if (is_admin) { =%>

View file

@ -0,0 +1,28 @@
% layout 'default';
% title 'Feeds';
% content_for open_graph => begin
<meta property="og:type" content="website">
<meta property="og:title" content="<%= title %>">
<meta
property="og:description"
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
>
% end
% content_for twitter_card => begin
<meta name="twitter:title" content="<%= title %>">
<meta
name="twitter:description"
content="Post::Text is a textboard a bit like 2channel. You can post whatever you want anonymously just please mind the rules."
>
% end
<h2 class="page-title"><%= title %></h2>
<main class="page-body">
<p>You can stay up-to-date with the latest mindless drivel by
subscribing to these feeds using the <a
href="https://duckduckgo.com/?q=feed+readers&ia=web">feed
reader</a> of your choice!</p>
<ul>
<li><%= link_to Threads => threads_feed => {format => 'rss'} %></li>
<li><%= link_to Remarks => remarks_feed => {format => 'rss'} %></li>
</ul>
</main>