mirror of
https://github.com/Floriansylvain/projet_programmation_web.git
synced 2026-08-19 11:43:16 +02:00
🎨 Improved visuals and code of filters
This commit is contained in:
@@ -302,10 +302,10 @@ function updateFilter(f) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
filters.forEach(elem => {
|
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() {
|
function scrollTop() {
|
||||||
@@ -367,8 +367,8 @@ navbarForm.addEventListener('submit', e => {
|
|||||||
submitForm(0)
|
submitForm(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
document.addEventListener('scroll', e => {
|
document.addEventListener('scroll', () => {
|
||||||
if (window.scrollY != 0) {
|
if (window.scrollY !== 0) {
|
||||||
document.querySelector('#scrollToTop').style.display = 'block'
|
document.querySelector('#scrollToTop').style.display = 'block'
|
||||||
} else {
|
} else {
|
||||||
document.querySelector('#scrollToTop').style.display = 'none'
|
document.querySelector('#scrollToTop').style.display = 'none'
|
||||||
|
|||||||
@@ -203,6 +203,11 @@ header {
|
|||||||
background-color: #6dc1e3;
|
background-color: #6dc1e3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.selected {
|
||||||
|
background-color: #1c6480 !important;
|
||||||
|
box-shadow: inset #0003 0 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.slide-in {
|
.slide-in {
|
||||||
animation: slide-in 200ms;
|
animation: slide-in 200ms;
|
||||||
animation-fill-mode: forwards;
|
animation-fill-mode: forwards;
|
||||||
|
|||||||
Reference in New Issue
Block a user