🎨 Improved visuals and code of filters

This commit is contained in:
Florian Sylvain
2022-01-08 15:37:24 +01:00
parent 45baf040da
commit 16469d745d
2 changed files with 9 additions and 4 deletions
+4 -4
View File
@@ -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'
+5
View File
@@ -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;