From 615f25c88d5ae4c86c779e323320c25240d5ec45 Mon Sep 17 00:00:00 2001 From: Sebastien Hattry Date: Mon, 7 Mar 2022 12:09:03 +0100 Subject: [PATCH] Debrief-2 | zoom effect advanced --- public/css/preload-front.css | 4 ++-- public/js/preload-front.js | 2 +- resources/js/frontend/custom.js | 4 ++-- resources/sass/frontend/_carrousel.scss | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/css/preload-front.css b/public/css/preload-front.css index 84c092c..4c11e8f 100644 --- a/public/css/preload-front.css +++ b/public/css/preload-front.css @@ -5597,10 +5597,10 @@ input[type=text]{ overflow:hidden; } .jumbotron img{ - transition:scale 0.3s ease-in-out; + transition:transform 0.3s ease-in-out; } .jumbotron img.zoomed{ - scale:1.05; + transform:scale(1.05); } .jumbotron .item__title{ position:absolute; diff --git a/public/js/preload-front.js b/public/js/preload-front.js index 8de3e91..c544fca 100644 --- a/public/js/preload-front.js +++ b/public/js/preload-front.js @@ -354,7 +354,7 @@ docReady(function () { var imgZoom = document.querySelectorAll('.img-zoom'); var index = 0; - if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) { + if (document.body.scrollTop > 50 || document.documentElement.scrollTop > 50) { document.getElementById("backtotop").style.display = "flex"; for (index = 0; index < imgZoom.length; index++) { diff --git a/resources/js/frontend/custom.js b/resources/js/frontend/custom.js index 3b47c39..a955afa 100644 --- a/resources/js/frontend/custom.js +++ b/resources/js/frontend/custom.js @@ -15,8 +15,8 @@ docReady(function () { let imgZoom = document.querySelectorAll('.img-zoom'); let index = 0; if ( - document.body.scrollTop > 100 || - document.documentElement.scrollTop > 100 + document.body.scrollTop > 50 || + document.documentElement.scrollTop > 50 ) { document.getElementById("backtotop").style.display = "flex"; for (index = 0; index < imgZoom.length; index++) { diff --git a/resources/sass/frontend/_carrousel.scss b/resources/sass/frontend/_carrousel.scss index 32ffa54..9349994 100644 --- a/resources/sass/frontend/_carrousel.scss +++ b/resources/sass/frontend/_carrousel.scss @@ -5,10 +5,10 @@ overflow: hidden; img { - transition: scale 0.3s ease-in-out; + transition: transform 0.3s ease-in-out; &.zoomed { - scale: 1.05; + transform: scale(1.05); } } .item__title {