Add announcement page
parent
91512b48be
commit
905e885041
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="TemplateDataLanguageMappings">
|
||||
<file url="file://$PROJECT_DIR$/templates/main/announcements.rss.ep" dialect="XML" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,31 @@
|
||||
% layout 'default';
|
||||
% title 'UNIX.dog Announcements';
|
||||
% use Time::Piece;
|
||||
<h1>
|
||||
Announcements
|
||||
</h1>
|
||||
<p>
|
||||
These announcements are also avaiable over RSS. Just add .rss to the path here.
|
||||
<br>
|
||||
Also, all announcements are signed with the following PGP key:
|
||||
</p>
|
||||
<pre>67A3 9437 8618 B72E B4D5 CC69 B0EB E117 49B9 9367 alpha@unix.dog</pre>
|
||||
<p>
|
||||
so you can verify their authenticity. When a new announcement is out, you should
|
||||
also recieve an email if you're registered.
|
||||
</p>
|
||||
<% my @sorted = sort (keys %$announcements); %>
|
||||
<% foreach my $key (@sorted[$start_index..$end_index]) { %>
|
||||
<% my $value = $announcements->{$key}; %>
|
||||
<article>
|
||||
<h2><%= $value->{"title"} %></h2>
|
||||
<p>
|
||||
Posted <%= localtime($value->{"date"})->strftime() %>.
|
||||
<a href="/announcement/<%= $value->{"filename"} %>">Download PGP signature.</a>
|
||||
<p>
|
||||
<pre><%= $value->{"text"} %></pre>
|
||||
</article>
|
||||
<% } %>
|
||||
<% if ($next_page != -1) { %>
|
||||
<a href="/announcements?page=<%= $next_page %>">Next page...</a>
|
||||
<% } %>
|
@ -0,0 +1,26 @@
|
||||
% use Time::Piece;
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>UNIX.dog Announcements</title>
|
||||
<link>https://unix.dog/announcements</link>
|
||||
<atom:link href="https://unix.dog/announcements.rss" rel="self" type="application/rss+xml"/>
|
||||
<description>UNIX.dog Announcements</description>
|
||||
<language>en-us</language>
|
||||
<image>
|
||||
<title>UNIX.dog Announcements</title>
|
||||
<url>https://unix.dog/favicon.ico</url>
|
||||
<link>https://unix.dog/announcements</link>
|
||||
</image>
|
||||
% foreach my $item (@$items) {
|
||||
<item>
|
||||
<title><![CDATA[<%= $item->{'title'} %>]]></title>
|
||||
<link>https://unix.dog/announcement/<%= $item->{'filename'} %></link>
|
||||
<guid isPermaLink="true">https://unix.dog/announcement/<%= $item->{'filename'} %></guid>
|
||||
<description><![CDATA[<%== $item->{'text'} %>]]></description>
|
||||
<author>Alpha</author>
|
||||
<pubDate><%= localtime($item->{'date'})->strftime("%a, %d %b %Y %H:%M:%S %z") %></pubDate>
|
||||
</item>
|
||||
% }
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue