aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2013-12-24 14:15:45 +0100
committerHarald Eilertsen <haraldei@anduin.net>2013-12-24 14:15:45 +0100
commit771532124d5486eb78c22f1c638ff647883d46b8 (patch)
tree7f86c54097030021f0870fa39e833abc2e6f2739 /app/views
parentc4e6ef89054b88b6d59f8bf9b6d67ab990cb7906 (diff)
downloadhmnoweb-771532124d5486eb78c22f1c638ff647883d46b8.tar.gz
hmnoweb-771532124d5486eb78c22f1c638ff647883d46b8.tar.bz2
hmnoweb-771532124d5486eb78c22f1c638ff647883d46b8.zip
Populate home page with blog entries.
I would like to just render the refinery/blog/index template for this, but I did not find a way to do it, so I copied it instead. May need to revisit this if upgrading to a new refinery or blog engine.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/refinery/pages/home.html.erb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/refinery/pages/home.html.erb b/app/views/refinery/pages/home.html.erb
new file mode 100644
index 0000000..2e8837c
--- /dev/null
+++ b/app/views/refinery/pages/home.html.erb
@@ -0,0 +1,20 @@
+<% content_for :body_content_left do %>
+ <%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
+
+ <% if @posts.any? %>
+ <section id="blog_posts">
+ <%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
+ <%= will_paginate @posts %>
+ </section>
+ <% else %>
+ <p><%= t('.no_blog_articles_yet') %></p>
+ <% end %>
+<% end %>
+
+<% content_for :body_content_right_prepend do -%>
+ <%= raw @page.content_for(Refinery::Pages.default_parts.second.to_sym) %>
+<% end if Refinery::Pages.default_parts.many? -%>
+<%= render :partial => '/refinery/blog/shared/body_content_right' %>
+
+<%= render :partial => "/refinery/content_page" %>
+<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %>