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

31 lines
976 B
Plaintext

% layout 'main';
% title "View Thread - #$thread->{'id'}";
<h2><%= title %></h2>
<% if (my $thread_body = %$thread{'body'}) { =%>
<div class="threads">
<article class="thread">
<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 (my $first_remark = @$remarks[0]) { =%>
<div class="remarks">
<% for my $remark (@$remarks) { =%>
<article class="remark">
<span class="id">#<%= %$remark{'id'} %></span>
<h4 class="date"><%= %$remark{'date'} %></h4>
<h5 class="author"><%= %$remark{'author'} %></h5>
<p class="body"><%= %$remark{'body'} %></p>
</article>
<% } =%>
</div>
<% if ($last_page && $last_page != 1) { =%>
<nav>
<%= pagination $this_page, $last_page, ($base_path . '/{page}') %>
</nav>
<% } %>
<% } =%>