From a2cb0e96e36fc66dab674043cd9d576d617c9c0c Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 16 Dec 2015 17:23:25 +0100 Subject: [PATCH] [IMP] website_slides: improve not pretty thumbnail In 9.0 image_medium and image_thumb route are used to display thumbnail of website_slides document. These in 9.0 will scale the image, but also crop it so it has a good aspect ratio. In saas-6 this croping feature is not present and these thumbnail will be scaled in diverse ugly way. To improve a little the situation, this commit use some CSS (currently not supported only by internet explorer) which give a similar aspect as 9.0's got. opw-658957 --- .../website_slides/static/src/less/website_slides.less | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/addons/website_slides/static/src/less/website_slides.less b/addons/website_slides/static/src/less/website_slides.less index ae1dd9a2551..93e3b5761bd 100644 --- a/addons/website_slides/static/src/less/website_slides.less +++ b/addons/website_slides/static/src/less/website_slides.less @@ -11,6 +11,11 @@ @navbar-default-bg: #f8f8f8; } .define-color-if-not-defined(); +.top_covered_image { + object-fit: cover; + object-position: top; +} + .oe_slides_panel_footer { background-color: @navbar-default-bg; } @@ -44,6 +49,7 @@ section.oe_slides_promote_box { } img.oe_slides_channel_thumbnail { + .top_covered_image(); height: 250px; width: 100% } @@ -53,6 +59,7 @@ img.oe_slides_opacity { } img.oe_slides_promote_image { + .top_covered_image(); max-height: 300px; width: 100%; overflow: hidden; @@ -64,6 +71,7 @@ img.oe_slides_promote_image { } .oe_slides_apart_small { + .top_covered_image(); height: 60px; width: 90px; } @@ -92,6 +100,7 @@ img.oe_slides_promote_image { } .oe_slides_grid_thumbnail { + .top_covered_image(); height: 200px; width: 100%; overflow: hidden;