aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/blog_posts/index.html.erb
blob: 4e0cdbb430b0f2361f091fec926a94606087fd66 (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
<% content_for :body_content_left do %>
  <%= @page[Page.default_parts.first.to_sym] %>

  <ul id="blog_posts">
    <% @blog_posts.each do |blog_post| %>
      <li>
        <h2><%= link_to blog_post.title, blog_post_url(blog_post) %></h2>
        <%= blog_post.created_at.strftime('%d %B %Y') %>
        <%= truncate(blog_post.body, 
                     :length => RefinerySetting.find_or_set(:blog_post_teaser_length, 250), 
                     :preserve_html_tags => true) %>
        <%= link_to t('.read_more'), blog_post_url(blog_post) %>
      </li>
    <% end %>
  </ul>
<% end %>

<% content_for :body_content_right do %>
  <%= @page[Page.default_parts.second.to_sym] %>

  <%= render :partial => "side_bar" %>
<% end %>

<%= render :partial => "/shared/content_page" %>
<% content_for :head do %>
  <%= stylesheet_link_tag 'refinerycms-blog' %>
<% end %>