aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog/posts/_post.html.erb
blob: 3af89a8d202d5960027269df9a714731322d4a02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<% flash.each do |key, value| %>
 <div id='flash' class="flash flash_<%= key %>">
   <%= value %>
 </div>
<% end %>
<article id="blog_post">
  <header>
    <h1><%= @blog_post.title %></h1>
    <details>
      <time datetime="<%= @blog_post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
        <%= t('blog.shared.posts.created_at', :when => @blog_post.published_at.strftime('%d %B %Y')) %>.        
      </time>
      <% if (categories = @blog_post.categories).any? %>
        <aside class='filed_in'>
          <%= t('.filed_in') %>
          <% categories.each_with_index do |category, index| %>
              <%= link_to category.title, blog_category_url(category) -%><%= ',' if index < ((categories.length) - 1) %>
          <% end %>
        </aside>
      <% end %>
    </details>
  </header>
  <%= @blog_post.body.html_safe %>

  <% if BlogPost::ShareThis.enabled? %>
    <span class="st_sharethis" displayText="ShareThis"></span>
  <% end %>
</article>
<% if next_or_previous?(@blog_post) -%>
  <nav id="next_prev_article">
    <%= render 'nav' %>
  </nav><!-- /next_prev_article -->
<% end -%>