guestbook-ng/templates/index.html.ep
2022-01-01 21:39:04 -05:00

25 lines
594 B
Plaintext

% layout 'default';
% title 'View';
<h2>Messages from the World Wide Web</h2>
<% for my $row (@$view_posts) { =%>
<div class="articles">
<article>
<h3><%= @$row[0] %></h3>
<section class="message field">
<blockquote><p><%= @$row[2] %></p></blockquote>
</section>
<section class="name field">
<figcaption>
- <%= @$row[1] %>
<% if (@$row[3]) { =%>
(<%= link_to Homepage => @$row[3] %>)
<% } =%>
</figcaption>
</section>
</article>
</div>
<% } =%>
<nav>
<%= pagination($this_page, $last_page, '?page={page}') %>
</nav>