guestbook-ng/templates/index.html.ep

28 lines
707 B
Plaintext
Raw Normal View History

2021-12-04 05:11:37 +00:00
% layout 'default';
2021-12-19 22:43:58 +00:00
% title 'View';
<h2>Messages from the World Wide Web</h2>
2022-01-02 02:39:04 +00:00
<div class="articles">
2022-01-04 23:27:05 +00:00
<% for my $post (@$view_posts) { =%>
2022-01-02 02:39:04 +00:00
<article>
2022-01-04 23:27:05 +00:00
<h3><%= @$post[0] %></h3>
2022-01-02 02:39:04 +00:00
<section class="message field">
2022-01-04 23:27:05 +00:00
<blockquote><p><%= @$post[2] %></p></blockquote>
2022-01-02 02:39:04 +00:00
</section>
<section class="name field">
<figcaption>
2022-01-04 23:27:05 +00:00
- <%= @$post[1] %>
<% if (@$post[3]) { =%>
(<%= link_to Homepage => @$post[3] %>)
2022-01-02 02:39:04 +00:00
<% } =%>
</figcaption>
</section>
<span hidden>Message ID: <%= @$post[4] %></span>
2022-01-02 02:39:04 +00:00
</article>
2022-01-04 23:27:05 +00:00
<% } =%>
2022-01-02 02:39:04 +00:00
</div>
<% if ($last_page && $last_page != 1) { =%>
2022-01-02 02:39:04 +00:00
<nav>
2022-01-04 23:27:05 +00:00
<%= pagination $this_page, $last_page, '?page={page}' %>
2022-01-02 02:39:04 +00:00
</nav>
2022-01-04 23:27:05 +00:00
<% } =%>