1
0
Fork 0
mirror of https://github.com/fmap/muflax65ngodyewp.onion synced 2024-06-02 06:46:50 +02:00
muflax65ngodyewp.onion/layouts/next-prev.erb
muflax 1b781a23f6 transition complete
* word count
* categories in nav-bar
* next / prev item
* robots.txt (including sitemap)
* many minor tweaks
2012-04-18 23:06:03 +02:00

27 lines
700 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% if @item.article? %>
<div id="next_prev">
<p>
<% items = @site.items_by_date @category
index = items.index(@item)
next_item = items[index + 1]
prev_item = index > 0 ? items[index - 1] : nil %>
<% unless prev_item.nil? %>
<span class="align_left">
<a class='next_prev' href='<%= prev_item.path %>'>
<%= prev_item[:title] %>
</a>
</span>
<% end %>
<% unless next_item.nil? %>
<span class="align_right">
<a class='next_prev' href='<%= next_item.path %>'>
<%= next_item[:title] %>
</a>
</span>
<% end %>
</p>
</div>
<% end %>