From 658e35ba7b1b727c8f1e82b15bd4013abc0e4673 Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Thu, 1 May 2014 23:38:33 +0300 Subject: [PATCH] Change news articles to be seperate boxes --- app/assets/stylesheets/layout/_body.scss | 4 ++++ app/assets/stylesheets/pages/_news.scss | 2 +- app/controllers/articles_controller.rb | 1 - app/views/layouts/application.html.erb | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/layout/_body.scss b/app/assets/stylesheets/layout/_body.scss index 6e5ddfb..e596cce 100644 --- a/app/assets/stylesheets/layout/_body.scss +++ b/app/assets/stylesheets/layout/_body.scss @@ -49,6 +49,10 @@ body#tinymce { padding: 20px; } +#main_nobody { + @include span-columns(9 of 12); +} + #sidebar { @include span-columns(3 of 12); @include omega(); diff --git a/app/assets/stylesheets/pages/_news.scss b/app/assets/stylesheets/pages/_news.scss index 0878773..124b021 100644 --- a/app/assets/stylesheets/pages/_news.scss +++ b/app/assets/stylesheets/pages/_news.scss @@ -46,7 +46,7 @@ div.article { &.preview { border-radius: $base-border-radius; - background: lighten($light-gray, 5%); + background: white; padding: 20px; margin-bottom: 20px; box-shadow: $light-shadow; diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb index 382f397..d36f11d 100644 --- a/app/controllers/articles_controller.rb +++ b/app/controllers/articles_controller.rb @@ -24,7 +24,6 @@ class ArticlesController < ApplicationController raise AccessError unless @article.can_show? cuser @article.read_by! cuser if cuser # @article.record_view_count(request.remote_ip, cuser.nil?) - @nobody = true end def new diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 7b1be97..13e4593 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -16,7 +16,7 @@ <%= render partial: "navigation" %>
-
+
<%= render partial: "messages" %> <%= yield %>