From 2e79ee6b61124330b5cdeb192fbd4caf23511225 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Fri, 6 Nov 2015 22:55:17 +0100 Subject: [PATCH] public css --- app/assets/stylesheets/public.scss | 12 ++++++------ app/views/layouts/public.html.haml | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss index 5372a0e..3645a5e 100644 --- a/app/assets/stylesheets/public.scss +++ b/app/assets/stylesheets/public.scss @@ -38,7 +38,7 @@ body{ margin:0; font-size:15px; color:#333333; - + background:rgba(241,240,238,1); } @@ -313,7 +313,7 @@ margin:auto; #corps{ width:68%; float:left; - + background:white; } @@ -510,11 +510,11 @@ article{ .image{ float:left; width:65%; - img{ - - display:block; - } + background: #757575 center center no-repeat; + background-size:100%; + background-size:cover; margin-bottom:5px; + height:400px; } .description{ diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index f08c864..7666680 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -73,7 +73,7 @@ -if article %a{:href => public_article_path(:id => article.slug)} .first_article - .image=image_tag article.image_file.file.large.medium.url if article.image_file + .image{:style => "background-image:url('"+(article.image_file.file.large.medium.url if article.image_file).to_s+"');"} .description %h1=article.title