guestbook-ng/templates/index.html.ep

28 lines
698 B
Plaintext

% layout 'default';
% title 'View';
<h2>Messages from the World Wide Web</h2>
<div class="articles">
<% for my $post (@$view_posts) { =%>
<article>
<h3><%= @$post[0] %></h3>
<div class="message field">
<blockquote><p><%= @$post[2] %></p></blockquote>
</div>
<div class="name field">
<p style="margin: 0 0 0 0;">
- <%= @$post[1] %>
<% if (@$post[3]) { =%>
(<%= link_to Homepage => @$post[3] %>)
<% } =%>
</p>
</div>
<span hidden>Message ID: <%= @$post[4] %></span>
</article>
<% } =%>
</div>
<% if ($last_page && $last_page != 1) { =%>
<nav>
<%= pagination $this_page, $last_page, '?page={page}' %>
</nav>
<% } =%>