Update dokka docs to v1.16.4_R19

This commit is contained in:
bluefireoly
2020-12-23 04:21:44 +01:00
parent a509e7e5bf
commit cbc0c79da6
1226 changed files with 21496 additions and 45574 deletions

View File

@@ -4,6 +4,7 @@ filteringContext = {
activeFilters: []
}
let highlightedAnchor;
let topNavbarOffset;
window.addEventListener('load', () => {
document.querySelectorAll("div[data-platform-hinted]")
@@ -18,6 +19,11 @@ window.addEventListener('load', () => {
initTabs()
handleAnchor()
initHidingLeftNavigation()
document.getElementById('main').addEventListener("scroll", (e) => {
document.getElementsByClassName("navigation-wrapper")[0].classList.toggle("sticky-navigation", e.target.scrollTop > 0)
})
topNavbarOffset = document.getElementById('navigation-wrapper')
})
const initHidingLeftNavigation = () => {
@@ -38,6 +44,27 @@ const initHidingLeftNavigation = () => {
// If this is not present user is forced to refresh the site in order to use an anchor
window.onhashchange = handleAnchor
function scrollToElementInContent(element){
const scrollToElement = () => document.getElementById('main').scrollTo({ top: element.offsetTop - topNavbarOffset.offsetHeight, behavior: "smooth"})
const waitAndScroll = () => {
setTimeout(() => {
if(topNavbarOffset){
scrollToElement()
} else {
waitForScroll()
}
}, 50)
}
if(topNavbarOffset){
scrollToElement()
} else {
waitAndScroll()
}
}
function handleAnchor() {
if(highlightedAnchor){
highlightedAnchor.classList.remove('anchor-highlight')
@@ -64,7 +91,8 @@ function handleAnchor() {
content.classList.add('anchor-highlight')
highlightedAnchor = content
}
element.scrollIntoView({behavior: "smooth"})
scrollToElementInContent(element)
}
}
}
@@ -260,4 +288,3 @@ function refreshFilterButtons() {
}
})
}