37 lines
920 B
Plaintext
37 lines
920 B
Plaintext
---
|
|
title: Random Rants
|
|
---
|
|
|
|
<div class="news">
|
|
<h1>Rants Archive</h1>
|
|
|
|
<div class="archive">
|
|
<%
|
|
GemSmith::get_collection("rants").
|
|
map { |f|
|
|
{ title: f["title"],
|
|
author: f["author"],
|
|
path: f[:out_path],
|
|
date: f[:date]
|
|
}
|
|
}.
|
|
group_by { |data| data[:date].year }.
|
|
to_a.sort_by { |year, data| -year }.
|
|
each do |year, records_for_year| %>
|
|
<h2><%=year%></h2>
|
|
<ul class="article_list">
|
|
<% records_for_year.
|
|
sort_by { |data| -data[:date].to_i }.
|
|
each do |data| %>
|
|
<li class="article">
|
|
<span class="date"><%= data[:date].strftime("%b %e") %>: </span>
|
|
<a href="<%= root_path(data[:path]) %>">
|
|
<span class="title"><%= data[:title] %></span>
|
|
</a>
|
|
<% unless data[:author].nil? %><span class="author">(by <%= data[:author] %>)</span><% end %>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
<% end %>
|
|
</div>
|
|
</div> |