From e37d59e43c8efc66ae0ce84515595f24fb768e91 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 28 Aug 2018 14:59:48 +0200 Subject: [PATCH] =?UTF-8?q?am=C3=A9lioration=20affichage=20produits?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/public/boutique.css.scss | 14 ++++++++++++++ app/views/public/products/_product.html.haml | 4 ++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/assets/stylesheets/public/boutique.css.scss b/app/assets/stylesheets/public/boutique.css.scss index f76fe80..7bdfcc9 100644 --- a/app/assets/stylesheets/public/boutique.css.scss +++ b/app/assets/stylesheets/public/boutique.css.scss @@ -43,6 +43,20 @@ $dark_orange:#206e95; float:left; padding:10px; + .img{ + height:250px; + background:no-repeat center center; + background-size:cover; + } + .description{ + height:80px; + text-align:center; + + h3{ + text-align:center; + } + } + .product-price{ color:rgba(0,0,0,0.8); diff --git a/app/views/public/products/_product.html.haml b/app/views/public/products/_product.html.haml index 5b570d6..302e03b 100755 --- a/app/views/public/products/_product.html.haml +++ b/app/views/public/products/_product.html.haml @@ -1,7 +1,7 @@ =link_to public_reseaux_product_path(:reseaux_id => params[:reseaux_id],:id => product.id, :slug => product.lang(I18n.locale).slug) do .product.product-item - .inner.with_ratio{:data => {:ratio => "1.4"}} - =image_tag product.default_image.image_file.file.large.medium.url if product.default_image + .inner.with_ratio + .img{:style => "background-image:url('#{(product.default_image.image_file.file.large.medium.url if product.default_image)}')"} .description %h3.product-title