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
|
||||
$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
|
||||
$r->get('/about')->to('page#about')->name('about_page');
|
||||
|
||||
|
|
|
@ -34,13 +34,11 @@
|
|||
<h3 class="page-title">Thread</h3>
|
||||
<article class="post">
|
||||
<h3 class="post__title">
|
||||
<%= link_to single_thread => {thread_id => $thread->{'id'}}, begin %>
|
||||
<span>
|
||||
<%= $thread->{'title'} %>
|
||||
<% end %>
|
||||
<span class="post__id">
|
||||
<%= link_to "#$thread->{'id'}",
|
||||
single_thread => {thread_id => $thread->{'id'}} %>
|
||||
</span>
|
||||
<%= link_to "#$thread->{'id'}", single_thread =>
|
||||
{thread_id => $thread->{'id'}}, (class => 'post__id') %>
|
||||
</h3>
|
||||
<h4 class="post__date"><%= $thread->{'date'} %></h4>
|
||||
<h5 class="post__author"><%= $thread->{'author'} %></h5>
|
||||
|
@ -54,8 +52,9 @@
|
|||
<h3 class="page-title">Last Remark</h3>
|
||||
<article class="post">
|
||||
<h4 class="post__title">
|
||||
<%= link_to $last_remark->{'date'}, single_remark =>
|
||||
{remark_id => $last_remark_id} %>
|
||||
<span>
|
||||
<%= $last_remark->{'date'} %>
|
||||
</span>
|
||||
<%= link_to "#$last_remark_id", single_remark =>
|
||||
{remark_id => $last_remark_id}, (class => 'post__id') %>
|
||||
</h4>
|
||||
|
|
Loading…
Reference in a new issue