From 8d19bc3f4a8f30f8c52c0cd05afd0e8a1063c650 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 29 Jul 2025 17:05:01 +0000
Subject: [PATCH] chore(deps): bump sigstore/cosign-installer in the ci-dependencies group (#2057)
---
quartz/components/scripts/toc.inline.ts | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/quartz/components/scripts/toc.inline.ts b/quartz/components/scripts/toc.inline.ts
index 6c5ad1c..4148fa2 100644
--- a/quartz/components/scripts/toc.inline.ts
+++ b/quartz/components/scripts/toc.inline.ts
@@ -1,13 +1,13 @@
const observer = new IntersectionObserver((entries) => {
for (const entry of entries) {
const slug = entry.target.id
- const tocEntryElement = document.querySelector(`a[data-for="${slug}"]`)
+ const tocEntryElements = document.querySelectorAll(`a[data-for="${slug}"]`)
const windowHeight = entry.rootBounds?.height
- if (windowHeight && tocEntryElement) {
+ if (windowHeight && tocEntryElements.length > 0) {
if (entry.boundingClientRect.y < windowHeight) {
- tocEntryElement.classList.add("in-view")
+ tocEntryElements.forEach((tocEntryElement) => tocEntryElement.classList.add("in-view"))
} else {
- tocEntryElement.classList.remove("in-view")
+ tocEntryElements.forEach((tocEntryElement) => tocEntryElement.classList.remove("in-view"))
}
}
}
--
Gitblit v1.10.0