1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-07-03 11:00:42 +02:00
muflax65ngodyewp.onion/layouts/category.erb
muflax e58c0665ef * rss feed
* changelog
* basic sanity check for episteme headers
* google analytics
* episteme header
2011-09-04 19:22:08 +02:00

35 lines
797 B
Plaintext

<!-- print all items in a category, nicely formatted -->
<!-- find category index -->
<% cat_match = %r{^/#{@category}/}
cat_index = printed_items.find{|i| i.path.match(cat_match) and i[:is_category]} %>
<!-- header -->
# [<%= cat_index[:title] %>][]
<!-- find items in category -->
<% items = printed_items.select do |i|
not i[:is_category] and
i.path.match cat_match
end %>
<!-- print items in nice list -->
<% items.sort_by{|i| i[:date]}.reverse.each do |i|
techne = "<span class='techne_#{i[:techne]}'>#{i[:date]}</span>"
status = "(#{episteme_cat i[:episteme]}) (#{techne})"
%>
{:.table}
- <span class='align_left'>[<%= i[:title]%>][]</span>
<span class='align_right'><%=status%></span>
<div style='clear: both'></div>
<% end %>
<!-- <div class='category_item'> -->