aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/posts/_nav.html.erb
blob: 50391eea86412ddc5fd583df54a0087a5e99ab0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
<% if next_or_previous?(@blog_post) -%>
  <nav id="next_prev_article">
    <% if @blog_post.next.present? -%>
      <%= link_to raw(truncate(@blog_post.next.title) + "&nbsp;&#187;"), @blog_post.next, :class => 'next' %>
    <% end -%>

    <%= link_to 'Blog Home', blog_root_path, :class => 'home' %>

    <% if @blog_post.prev.present? -%>
      <%= link_to "&#171;&nbsp;".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev' %>
    <% end -%>
  </nav><!-- /next_prev_article -->
<% end -%>