Better formatting
This commit is contained in:
parent
905e885041
commit
c2c77adad6
|
@ -104,16 +104,15 @@ sub announcements ($self) {
|
||||||
$next_page = $page + 1;
|
$next_page = $page + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my @chosen = (sort keys %announcements)[$start_index..$end_index];
|
||||||
|
my @items;
|
||||||
|
for my $key (@chosen) {
|
||||||
|
push @items, $announcements{$key};
|
||||||
|
}
|
||||||
|
|
||||||
$self->stash(
|
$self->stash(
|
||||||
announcements => \%announcements,
|
next_page => $next_page,
|
||||||
total_items => $total_items,
|
items => \@items,
|
||||||
items_per_page => $items_per_page,
|
|
||||||
page => $page,
|
|
||||||
start_index => $start_index,
|
|
||||||
end_index => $end_index,
|
|
||||||
next_page => $next_page,
|
|
||||||
);
|
);
|
||||||
$self->render();
|
$self->render();
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,25 +7,23 @@
|
||||||
<p>
|
<p>
|
||||||
These announcements are also avaiable over RSS. Just add .rss to the path here.
|
These announcements are also avaiable over RSS. Just add .rss to the path here.
|
||||||
<br>
|
<br>
|
||||||
Also, all announcements are signed with the following PGP key:
|
Also, all announcements are signed with the following <a href="/alpha.asc">PGP key</a>:
|
||||||
</p>
|
</p>
|
||||||
<pre>67A3 9437 8618 B72E B4D5 CC69 B0EB E117 49B9 9367 alpha@unix.dog</pre>
|
<pre>67A3 9437 8618 B72E B4D5 CC69 B0EB E117 49B9 9367 alpha@unix.dog</pre>
|
||||||
<p>
|
<p>
|
||||||
so you can verify their authenticity. When a new announcement is out, you should
|
so you can verify their authenticity. When a new announcement is out, you should
|
||||||
also recieve an email if you're registered.
|
also recieve an email if you're registered.
|
||||||
</p>
|
</p>
|
||||||
<% my @sorted = sort (keys %$announcements); %>
|
% foreach my $entry (@$items) {
|
||||||
<% foreach my $key (@sorted[$start_index..$end_index]) { %>
|
|
||||||
<% my $value = $announcements->{$key}; %>
|
|
||||||
<article>
|
<article>
|
||||||
<h2><%= $value->{"title"} %></h2>
|
<h2><%= $entry->{"title"} %></h2>
|
||||||
<p>
|
<p>
|
||||||
Posted <%= localtime($value->{"date"})->strftime() %>.
|
Posted <%= localtime($entry->{"date"})->strftime() %>.
|
||||||
<a href="/announcement/<%= $value->{"filename"} %>">Download PGP signature.</a>
|
<a href="/announcement/<%= $entry->{"filename"} %>">Download PGP signature.</a>
|
||||||
<p>
|
<p>
|
||||||
<pre><%= $value->{"text"} %></pre>
|
<pre><%= $entry->{"text"} %></pre>
|
||||||
</article>
|
</article>
|
||||||
<% } %>
|
% }
|
||||||
<% if ($next_page != -1) { %>
|
% if ($next_page != -1) {
|
||||||
<a href="/announcements?page=<%= $next_page %>">Next page...</a>
|
<a href="/announcements?page=<%= $next_page %>">Next page...</a>
|
||||||
<% } %>
|
% }
|
||||||
|
|
Loading…
Reference in New Issue