1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-29 10:36:48 +02:00
muflax65ngodyewp.onion/layouts/cat-nav.erb
2012-05-30 07:58:30 +02:00

34 lines
1.1 KiB
Plaintext

<div id="cat-nav">
<h2>Categories</h2>
<ul>
<% @site.categories(false).each do |cat| %>
<li><%= cat.link true %></li>
<% if @item.category == cat or (@item.root? and @site.latest_category? cat) %>
<ul>
<% items = @site.items_by_date(cat).reverse
size = items.size
num = 20 %>
<% items.slice!(0, num/2).each do |i| %>
<%= render 'list-item', :item => i, :episteme => false %>
<% end %>
<% if size > num %>
<li>...<%= size - num %> more...</li>
<% end %>
<% items.reverse.slice(0, num/2).reverse.each do |i| %>
<%= render 'list-item', :item => i, :episteme => false %>
<% end %>
</ul>
<% end %>
<% end %>
</ul>
<h2>All Posts</h2>
<ul>
<li><a href='/categories/'>All Posts By Category</a></li>
<li><a href='/date/'>All Posts By Date</a></li>
<li><a href='/rss.xml'>RSS feed</a></li>
<li><a href='http://<%= @site.disqus_site %>.disqus.com/latest.rss'>RSS feed (comments)</a></li>
</ul>
</div>