Fixed pagination and scene poster overflowing page on small screens. Fixed back reload interfering with tag page hashes.

This commit is contained in:
2024-03-19 20:50:50 +01:00
parent 21eaa98de4
commit 52708b5d70
12 changed files with 141 additions and 77 deletions

View File

@@ -120,7 +120,16 @@ onMounted(() => {
categories.value.scrollLeft += event.deltaY;
});
content.value.addEventListener('scroll', calculateActiveCategory);
content.value.addEventListener('scroll', () => calculateActiveCategory());
window.addEventListener('popstate', () => {
if (window.location.hash) {
const categoryTitle = document.querySelector(window.location.hash);
activeCategory.value = window.location.hash.slice(1);
categoryTitle?.scrollIntoView();
}
});
calculateActiveCategory();
});