36 lines
1.8 KiB
HTML
36 lines
1.8 KiB
HTML
<button class="flyout-button" onclick="kub.toggleToc()" aria-label="Toggle table of contents visibility"></button>
|
|
|
|
<script>
|
|
// hide docs nav area if no nav is present, or if nav only contains a link to the current page
|
|
(function () {
|
|
window.addEventListener('DOMContentLoaded', init)
|
|
|
|
// play nice with our neighbors
|
|
function init() {
|
|
window.removeEventListener('DOMContentLoaded', init)
|
|
hideNav()
|
|
}
|
|
|
|
function hideNav(toc){
|
|
if (!toc) toc = document.querySelector('#docsToc')
|
|
if (!toc) return
|
|
var container = toc.querySelector('.container')
|
|
|
|
// container is built dynamically, so it may not be present on the first runloop
|
|
if (container) {
|
|
if (container.childElementCount === 0 || toc.querySelectorAll('a.item').length === 1) {
|
|
toc.style.display = 'none'
|
|
document.getElementById('docsContent').style.width = '100%'
|
|
}
|
|
} else {
|
|
requestAnimationFrame(function () {
|
|
hideNav(toc)
|
|
})
|
|
}
|
|
}
|
|
})();
|
|
</script>
|
|
|
|
<!-- Commenting out AnswerDash for now; we need to work on our list of questions/answers/design first
|
|
<!-- Start of AnswerDash script <script>var AnswerDash;!function(e,t,n,s,a){if(!t.getElementById(s)){var i,r=t.createElement(n),c=t.getElementsByTagName(n)[0];e[a]||(i=e[a]=function(){i.__oninit.push(arguments)},i.__oninit=[]),r.type="text/javascript",r.async=!0,r.src="https://p1.answerdash.com/answerdash.min.js?siteid=756",r.setAttribute("id",s),c.parentNode.insertBefore(r,c)}}(window,document,"script","answerdash-script","AnswerDash");</script> <!-- End of AnswerDash script -->
|