on master help sign in
site-hiding now uses display:none
commit9f59f584c2f1556759b3613dff3c2d833718c7b2 authorDYM <re@dym.sh> dateSun 8 Sep 2019, 19:10 (7 years ago) parent80f8b9a
1 file changed+2−2
index.html+2−2
index.html+2−2
@@ -21,8 +21,8 @@
2121 const selectedType = navLink.dataset.type
2222 document.querySelector(`nav a.current`).classList.remove('current')
2323 navLink.classList.add('current')
24− document.querySelectorAll(`main li`).forEach(el => el.style.visibility = 'visible')
25− if(selectedType) { document.querySelectorAll(`main li:not([data-type='${selectedType}'])`).forEach(el => el.style.visibility = 'hidden') }
24+ document.querySelectorAll(`main li`).forEach(el => el.style.display = 'block')
25+ if(selectedType) { document.querySelectorAll(`main li:not([data-type='${selectedType}'])`).forEach(el => el.style.display = 'none') }
2626 }
2727 </script>
2828</body>