1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-26 10:26:48 +02:00
muflax65ngodyewp.onion/layouts/category.erb
muflax 8ba3958797 * added explanation of epistemic states
* added basic techne/episteme to categories
* port categorie template to erb
2011-09-04 14:30:09 +02:00

35 lines
793 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 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'> -->