add highlight class

This commit is contained in:
Jacky Zhao
2025-03-09 09:20:35 -07:00
parent 50efa14bd2
commit 2802aa91f4
4 changed files with 46 additions and 41 deletions

View File

@@ -81,6 +81,11 @@ function createFileNode(currentSlug: FullSlug, node: FileTrieNode): HTMLLIElemen
a.href = resolveRelative(currentSlug, node.data?.slug!)
a.dataset.for = node.data?.slug
a.textContent = node.displayName
if (currentSlug === node.data?.slug) {
a.classList.add("active")
}
return li
}