Change news articles to be seperate boxes

This commit is contained in:
Ari Timonen 2014-05-01 23:38:33 +03:00
parent db34717173
commit 658e35ba7b
4 changed files with 6 additions and 3 deletions

View file

@ -49,6 +49,10 @@ body#tinymce {
padding: 20px; padding: 20px;
} }
#main_nobody {
@include span-columns(9 of 12);
}
#sidebar { #sidebar {
@include span-columns(3 of 12); @include span-columns(3 of 12);
@include omega(); @include omega();

View file

@ -46,7 +46,7 @@ div.article {
&.preview { &.preview {
border-radius: $base-border-radius; border-radius: $base-border-radius;
background: lighten($light-gray, 5%); background: white;
padding: 20px; padding: 20px;
margin-bottom: 20px; margin-bottom: 20px;
box-shadow: $light-shadow; box-shadow: $light-shadow;

View file

@ -24,7 +24,6 @@ class ArticlesController < ApplicationController
raise AccessError unless @article.can_show? cuser raise AccessError unless @article.can_show? cuser
@article.read_by! cuser if cuser @article.read_by! cuser if cuser
# @article.record_view_count(request.remote_ip, cuser.nil?) # @article.record_view_count(request.remote_ip, cuser.nil?)
@nobody = true
end end
def new def new

View file

@ -16,7 +16,7 @@
<%= render partial: "navigation" %> <%= render partial: "navigation" %>
<div class="wrapper"> <div class="wrapper">
<div id="content"> <div id="content">
<div id="main"> <div id="<%= @nobody ? 'main_nobody' : 'main' %>">
<%= render partial: "messages" %> <%= render partial: "messages" %>
<%= yield %> <%= yield %>
</div> </div>