<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>
          <% @site.items_by_date(cat).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>
