Adventskalender (#37)

* Add adventskalender

* Vorbereitung Adventskalender

* Credits

* Update Adventskalender
This commit is contained in:
d11n
2021-11-30 13:11:39 +01:00
committed by GitHub
parent 7f35ef217c
commit 0d3f9850b6
16 changed files with 863 additions and 82 deletions

View File

View File

@@ -43,12 +43,15 @@ document.addEventListener("DOMContentLoaded", () => {
"IntersectionObserverEntry" in window &&
"intersectionRatio" in window.IntersectionObserverEntry.prototype
) {
const headerObserver = new IntersectionObserver(entries => {
const { boundingClientRect: { y, height } } = entries[0]
const fn = Math.abs(y) > height ? 'add' : 'remove'
document.body.classList[fn]('topbar')
})
headerObserver.observe(document.getElementById('header-anchor'))
const headerAnchor = document.getElementById('header-anchor')
if (headerAnchor) {
const headerObserver = new IntersectionObserver(entries => {
const { boundingClientRect: { y, height } } = entries[0]
const fn = Math.abs(y) > height ? 'add' : 'remove'
document.body.classList[fn]('topbar')
})
headerObserver.observe(headerAnchor)
}
}
// List shuffling