diff --git a/ProjetProgWeb/app.js b/ProjetProgWeb/app.js index 273a09b..421b2b7 100644 --- a/ProjetProgWeb/app.js +++ b/ProjetProgWeb/app.js @@ -302,10 +302,10 @@ function updateFilter(f) { } filters.forEach(elem => { - elem.style.boxShadow = 'none' + elem.classList.remove('selected') }) - document.querySelector('#f-' + queryOption).style.boxShadow = 'inset rgba(0, 0, 0, 0.40) 0 0 5px' + document.querySelector('#f-' + queryOption).classList.add('selected') } function scrollTop() { @@ -367,8 +367,8 @@ navbarForm.addEventListener('submit', e => { submitForm(0) }) -document.addEventListener('scroll', e => { - if (window.scrollY != 0) { +document.addEventListener('scroll', () => { + if (window.scrollY !== 0) { document.querySelector('#scrollToTop').style.display = 'block' } else { document.querySelector('#scrollToTop').style.display = 'none' diff --git a/ProjetProgWeb/stylesheet.css b/ProjetProgWeb/stylesheet.css index 3d3d482..f9ab1cd 100644 --- a/ProjetProgWeb/stylesheet.css +++ b/ProjetProgWeb/stylesheet.css @@ -203,6 +203,11 @@ header { background-color: #6dc1e3; } +.selected { + background-color: #1c6480 !important; + box-shadow: inset #0003 0 0 5px; +} + .slide-in { animation: slide-in 200ms; animation-fill-mode: forwards;