PostText/templates/view_page.html.ep
2022-08-22 23:09:48 -04:00

22 lines
643 B
Plaintext

% layout 'main';
% title 'View Threads';
<h2><%= title %></h2>
<div class="threads">
<% for my $thread (@$threads) { =%>
<article class="thread">
<span class="id">
<%= link_to '#' . %$thread{'id'}, '/thread/' . %$thread{'id'} %>
</span>
<h3 class="title"><%= %$thread{'title'} %></h3>
<h4 class="date"><%= %$thread{'date'} %></h4>
<h5 class="author"><%= %$thread{'author'} %></h5>
<p class="body"><%= %$thread{'body'} %></p>
</article>
<% } =%>
</div>
<% if ($last_page && $last_page != 1) { =%>
<nav>
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
</nav>
<% } =%>