Added a 'feeds' page for links to the feeds
This commit is contained in:
parent
8594ce0fae
commit
2a41696244
|
@ -135,6 +135,8 @@ sub startup($self) {
|
||||||
|
|
||||||
$r->get('/rules')->to('page#rules')->name('rules_page');
|
$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')
|
$r->any([qw{GET POST}], '/captcha/*return_url')
|
||||||
->to('page#captcha')
|
->to('page#captcha')
|
||||||
->name('captcha_page');
|
->name('captcha_page');
|
||||||
|
|
|
@ -8,6 +8,8 @@ sub about($self) { $self->render }
|
||||||
|
|
||||||
sub rules($self) { $self->render }
|
sub rules($self) { $self->render }
|
||||||
|
|
||||||
|
sub feeds($self) { $self->render }
|
||||||
|
|
||||||
sub captcha($self) {
|
sub captcha($self) {
|
||||||
my $v;
|
my $v;
|
||||||
|
|
||||||
|
|
2
t/page.t
2
t/page.t
|
@ -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('/rules')->status_is(200)->text_like(h2 => qr/The Rules/);
|
||||||
|
|
||||||
|
$t->get_ok('/feeds')->status_is(200)->text_like(h2 => qr/Feeds/);
|
||||||
|
|
||||||
done_testing;
|
done_testing;
|
||||||
|
|
|
@ -40,11 +40,7 @@
|
||||||
<%= link_to New => post_thread => (class => 'click') %>
|
<%= link_to New => post_thread => (class => 'click') %>
|
||||||
<%= link_to About => about_page => (class => 'click') %>
|
<%= link_to About => about_page => (class => 'click') %>
|
||||||
<%= link_to Rules => rules_page => (class => 'click') %>
|
<%= link_to Rules => rules_page => (class => 'click') %>
|
||||||
<%= link_to RSS => threads_feed => {format => 'rss'},
|
<%= link_to Feeds => feeds_page => (class => 'click') %>
|
||||||
(class => 'click') %>
|
|
||||||
<% if (is_mod) { =%>
|
|
||||||
<%= link_to Logout => mod_logout => (class => 'click') %>
|
|
||||||
<% } =%>
|
|
||||||
</nav>
|
</nav>
|
||||||
<% if (is_mod) { =%>
|
<% if (is_mod) { =%>
|
||||||
<nav class="site-nav">
|
<nav class="site-nav">
|
||||||
|
@ -52,6 +48,7 @@
|
||||||
<%= link_to Flagged => flagged_list => (class => 'click') %>
|
<%= link_to Flagged => flagged_list => (class => 'click') %>
|
||||||
<%= link_to Hidden => hidden_list => (class => 'click') %>
|
<%= link_to Hidden => hidden_list => (class => 'click') %>
|
||||||
<%= link_to Reset => mod_reset => (class => 'click') %>
|
<%= link_to Reset => mod_reset => (class => 'click') %>
|
||||||
|
<%= link_to Logout => mod_logout => (class => 'click') %>
|
||||||
</nav>
|
</nav>
|
||||||
<% } =%>
|
<% } =%>
|
||||||
<% if (is_admin) { =%>
|
<% if (is_admin) { =%>
|
||||||
|
|
28
templates/page/feeds.html.ep
Normal file
28
templates/page/feeds.html.ep
Normal 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>
|
Loading…
Reference in a new issue