From 3fba29e9db554eaf6ba41466a246d0d2c250de2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20FAMIBELLE-PRONZOLA?= Date: Thu, 10 Apr 2025 06:30:59 +0400 Subject: [PATCH] scroll to to top on clicking on footer logo --- css/styles.css | 2 ++ js/main.js | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/css/styles.css b/css/styles.css index 4f1eee7..f837cbf 100644 --- a/css/styles.css +++ b/css/styles.css @@ -666,11 +666,13 @@ img { .footer-logo { margin: 0; + cursor: pointer; } .footer-logo img { height: 90px; transition: transform 0.3s; + cursor: pointer; } .footer-logo img:hover { diff --git a/js/main.js b/js/main.js index ddad529..2ea4cb4 100644 --- a/js/main.js +++ b/js/main.js @@ -215,4 +215,15 @@ document.addEventListener('DOMContentLoaded', function() { }); }); }); + + // Scroll vers le haut avec effet moderne quand on clique sur le logo du footer + const footerLogo = document.querySelector('.footer-logo'); + if (footerLogo) { + footerLogo.addEventListener('click', function() { + window.scrollTo({ + top: 0, + behavior: 'smooth' + }); + }); + } }); \ No newline at end of file