Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/apvarun/showcase-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/footer.html')
-rw-r--r--layouts/partials/footer.html12
1 files changed, 9 insertions, 3 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index 6d8475a..39d8c7f 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -84,6 +84,12 @@
<script>
const allTypes = ["all", {{ range .Site.Sections }}"{{lower .Title}}",{{ end }}];
const filter = (event, type) => {
+ const isMultiPage = !!document.querySelector('nav.multipage');
+
+ if (isMultiPage) {
+ return;
+ }
+
const isActive = event.target.classList.contains("active");
showAll();
@@ -92,7 +98,7 @@
event.target.classList.add("active");
if (type !== "other") {
document
- .querySelectorAll(`.${type}`)
+ .querySelectorAll(`nav:not(.multipage) .${type}`)
.forEach((item) => item.classList.remove("hide"));
} else {
document
@@ -107,10 +113,10 @@
const showAll = () => {
allTypes.forEach((type) => {
document
- .querySelectorAll(`.${type}`)
+ .querySelectorAll(`nav:not(.multipage) .${type}`)
.forEach((item) => item.classList.remove("hide"));
document
- .querySelectorAll(`.filter-${type}`)
+ .querySelectorAll(`nav:not(.multipage) .filter-${type}`)
.forEach((filterItem) => filterItem.classList.remove("active"));
});
};