diff options
-rw-r--r-- | app/assets/stylesheets/hmno_sidebars.scss | 16 | ||||
-rw-r--r-- | app/views/common/_right_sidebar.html.erb | 7 | ||||
-rw-r--r-- | app/views/sidebar_modules/_sidebar_blog_category.html.erb | 5 | ||||
-rw-r--r-- | app/views/sidebar_modules/_sidebar_module.html.erb | 2 |
4 files changed, 26 insertions, 4 deletions
diff --git a/app/assets/stylesheets/hmno_sidebars.scss b/app/assets/stylesheets/hmno_sidebars.scss index 223f1cf..20d9895 100644 --- a/app/assets/stylesheets/hmno_sidebars.scss +++ b/app/assets/stylesheets/hmno_sidebars.scss @@ -16,7 +16,6 @@ top: 0; bottom: $spacing; border: 1px groove $dark-border-fg; - padding: 5px; background-color: $bg2; h2 { @include sidebar-headers; @@ -37,4 +36,19 @@ font-size: 12pt; @include sidebar-headers; } + + p { + margin-top: 0; + } + + header { + font: { + weight: 600; + size: 110%; + } + } + + .inner { + padding: 5px; + } } diff --git a/app/views/common/_right_sidebar.html.erb b/app/views/common/_right_sidebar.html.erb index 023730d..3b17356 100644 --- a/app/views/common/_right_sidebar.html.erb +++ b/app/views/common/_right_sidebar.html.erb @@ -1,5 +1,10 @@ <div id="right_sidebar"> - <%= raw @page.content_for(:side_body) %> + <% unless @page.part_with_title("Side Body").body.empty? %> + <div class="sidebar_module"> + <h1>Sjefen melder</h1> + <div class="inner"><%= raw @page.content_for(:side_body) %></div> + </div> + <% end %> <%= render_sidebar_modules @sidebar_modules, :position => 2 %> <%= render "/refinery/blog/shared/rss_feed" %> <%= render "/refinery/blog/shared/categories" %> diff --git a/app/views/sidebar_modules/_sidebar_blog_category.html.erb b/app/views/sidebar_modules/_sidebar_blog_category.html.erb index 53556e7..5dc0a27 100644 --- a/app/views/sidebar_modules/_sidebar_blog_category.html.erb +++ b/app/views/sidebar_modules/_sidebar_blog_category.html.erb @@ -1,8 +1,11 @@ <% content_for "sidebar_module_#{sidebar_module.title}_body" do %> <% sidebar_module.body.each do |post| %> - <%= content_tag :div, :class => :sidebar_blog_headline do %> + <%= content_tag :header, :class => :sidebar_blog_headline do %> <%= link_to post.title, refinery.blog_post_path(post) %> <% end %> + <%= content_tag :article, :class => :sidebar_blog_content do %> + <%= blog_post_teaser(post) %> + <% end %> <% end %> <% end %> <%= render 'sidebar_modules/sidebar_module', :sidebar_module => sidebar_module %> diff --git a/app/views/sidebar_modules/_sidebar_module.html.erb b/app/views/sidebar_modules/_sidebar_module.html.erb index 2fb989c..ecd5375 100644 --- a/app/views/sidebar_modules/_sidebar_module.html.erb +++ b/app/views/sidebar_modules/_sidebar_module.html.erb @@ -1,5 +1,5 @@ <div id="sidebar_module_<%= sidebar_module.title.parameterize %>" class="sidebar_module"> <h1><%= sidebar_module.title %></h1> - <div><%= content_for "sidebar_module_#{sidebar_module.title}_body" %></div> + <div class="inner"><%= content_for "sidebar_module_#{sidebar_module.title}_body" %></div> </div> |