adding articles
This commit is contained in:
@@ -83,4 +83,38 @@ layout: default
|
||||
{% include cb/credits.html %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const tocLinks = document.querySelectorAll("#about-toc-list a");
|
||||
const headings = document.querySelectorAll("h1, h2, h3");
|
||||
|
||||
let activeId = null;
|
||||
|
||||
const observer = new IntersectionObserver(
|
||||
entries => {
|
||||
entries.forEach(entry => {
|
||||
if (entry.isIntersecting) {
|
||||
activeId = entry.target.id;
|
||||
|
||||
tocLinks.forEach(link => link.classList.remove("active"));
|
||||
|
||||
const activeLink = document.querySelector(
|
||||
`#about-toc-list a[href="#${activeId}"]`
|
||||
);
|
||||
|
||||
if (activeLink) {
|
||||
activeLink.classList.add("active");
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
{
|
||||
rootMargin: "-20% 0px -60% 0px",
|
||||
threshold: 0
|
||||
}
|
||||
);
|
||||
|
||||
headings.forEach(heading => observer.observe(heading));
|
||||
});
|
||||
</script>
|
||||
@@ -3,5 +3,5 @@
|
||||
layout: default
|
||||
custom-foot: js/map-js.html
|
||||
---
|
||||
<h2 class="visually-hidden">Map of Collection Items</h2>
|
||||
<h2 class="visually-hidden">Mapping The Archive</h2>
|
||||
<div id="mapContainer"></div>
|
||||
|
||||
Reference in New Issue
Block a user