Some cleanup and /new route for new session
This commit is contained in:
parent
5f0f32c443
commit
5635d73d89
|
@ -110,6 +110,13 @@ sub startup($self) {
|
||||||
# Root redirect
|
# Root redirect
|
||||||
$r->get('/', sub ($c) { $c->redirect_to('threads_list') });
|
$r->get('/', sub ($c) { $c->redirect_to('threads_list') });
|
||||||
|
|
||||||
|
# Shortcut to new session cookie/identity
|
||||||
|
$r->get('/new', sub ($c) {
|
||||||
|
$c->session(expires => 1);
|
||||||
|
|
||||||
|
$c->redirect_to('threads_list');
|
||||||
|
});
|
||||||
|
|
||||||
# Static pages
|
# Static pages
|
||||||
$r->get('/about')->to('page#about')->name('about_page');
|
$r->get('/about')->to('page#about')->name('about_page');
|
||||||
|
|
||||||
|
|
|
@ -34,13 +34,11 @@
|
||||||
<h3 class="page-title">Thread</h3>
|
<h3 class="page-title">Thread</h3>
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<h3 class="post__title">
|
<h3 class="post__title">
|
||||||
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
|
<span>
|
||||||
<%= $thread->{'title'} %>
|
<%= $thread->{'title'} %>
|
||||||
<% end %>
|
|
||||||
<span class="post__id">
|
|
||||||
<%= link_to "#$thread->{'id'}",
|
|
||||||
single_thread => {thread_id => $thread->{'id'}} %>
|
|
||||||
</span>
|
</span>
|
||||||
|
<%= link_to "#$thread->{'id'}", single_thread =>
|
||||||
|
{thread_id => $thread->{'id'}}, (class => 'post__id') %>
|
||||||
</h3>
|
</h3>
|
||||||
<h4 class="post__date"><%= $thread->{'date'} %></h4>
|
<h4 class="post__date"><%= $thread->{'date'} %></h4>
|
||||||
<h5 class="post__author"><%= $thread->{'author'} %></h5>
|
<h5 class="post__author"><%= $thread->{'author'} %></h5>
|
||||||
|
@ -54,8 +52,9 @@
|
||||||
<h3 class="page-title">Last Remark</h3>
|
<h3 class="page-title">Last Remark</h3>
|
||||||
<article class="post">
|
<article class="post">
|
||||||
<h4 class="post__title">
|
<h4 class="post__title">
|
||||||
<%= link_to $last_remark->{'date'}, single_remark =>
|
<span>
|
||||||
{remark_id => $last_remark_id} %>
|
<%= $last_remark->{'date'} %>
|
||||||
|
</span>
|
||||||
<%= link_to "#$last_remark_id", single_remark =>
|
<%= link_to "#$last_remark_id", single_remark =>
|
||||||
{remark_id => $last_remark_id}, (class => 'post__id') %>
|
{remark_id => $last_remark_id}, (class => 'post__id') %>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user