blob: 1e7830a708cac0107c487a91ca04615838996df7 (
plain) (
tree)
|
|
<% if post.live? %>
<article class="blog_post" id="<%= dom_id(post) %>">
<header>
<h1><%= link_to post.title, blog_post_url(post) %></h1>
<details>
<time datetime="<%= post.published_at.strftime('%Y-%m-%d') %>" class='posted_at'>
<%= t('blog.shared.posts.created_at', :when => post.published_at.strftime('%d %B %Y')) %>.
</time>
<% if (categories = 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>
<section class='clearfix'>
<%= truncate(post.body,
:length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250),
:preserve_html_tags => true) %>
</section>
<footer>
<p>
<%= link_to t('blog.shared.posts.read_more'), blog_post_url(post) %>
<aside class='comment_count'>
<% if post.comments.any? %>
(<%= pluralize(post.comments.approved.count, t('blog.shared.comments.singular')) %>)
<% else %>
(<%= t('blog.shared.comments.none') %>)
<% end %>
</aside>
</p>
</footer>
</article>
<% end %>
|