diff --git a/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike b/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike index 37420a4a3de226a5e7dc65b42ab737d6c9ce62c6..f8b1b633d87113f1586ba83124b5becfd3bf2198 100644 --- a/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike +++ b/lib/modules/Tools.pmod/Standalone.pmod/autodoc_to_split_html.pike @@ -1525,7 +1525,7 @@ int low_main(string doc_file, string template_file, string outdir, "$version$":"", "$date$":"", "$generated$":"", - "$nodynamic$":"" + "$nodynamic$":"<script>PikeDoc.NO_DYNAMIC = true;</script>" ]) ); } else { template = replace(template, diff --git a/refdoc/structure/modref.css b/refdoc/structure/modref.css index e6e1962b9ef7df9c65ac31aede80d2a8d89f6d28..7d78a0cba93869f96bc5790563c8f678c0581231 100644 --- a/refdoc/structure/modref.css +++ b/refdoc/structure/modref.css @@ -270,7 +270,7 @@ em { opacity: 0; } -.navbar .sidebar a { display: block; text-decoration: none; } +.navbar .sidebar a { display: block; text-decoration: none; overflow: hidden; text-overflow: ellipsis; } .sidebar a.mod-protected { color: #999; @@ -402,7 +402,7 @@ hr { h1, h2, h3, h4 { color: #323232; - line-height: 1; + line-height: 1.1; } h1 { @@ -560,7 +560,56 @@ pre code .nested:hover { opacity: 1; } } } -@media screen and (max-width: 800px) { +@media screen and (max-width: 767px) { + .sidebar { + opacity: 1; + } + + // .sidebar { + // display: none; + // } + // .sidebar.open { + // display: block; + // } + + .sidebar > div { + columns: 3; + } + + // .navbar .head { + // display: block; + // vertical-align: middle; + // } + // .navbar .head:hover { + // background: #4c4c4c; + // border-left-color: #3c3c3c; + // } + // .navbar .head:before { + // content: '+'; + // display: inline-block; + // background: #666; + // border-radius: 16px; + // color: #333; + // width: 19px; + // height: 19px; + // padding: 0px 5px 0px 5px; + // margin-right: 8px; + // // vertical-align: middle; + // transition: background .2s ease-out; + // } + // .navbar .head.open:before { + // background: #999; + // } + // .navbar .head.top:before { + // content: ''; + // display: inline; + // background: transparent; + // margin: 0; + // padding: 0; + // width: inital; + // height: initial; + // } + .content { width: 100%; float: none; @@ -623,10 +672,10 @@ pre code .nested:hover { opacity: 1; } margin-top: 5px; } - header a { + body header a { + display: block; height: 26px; - width: 120px; - transition: transform .3s ease-in; + transition: all .3s ease-in; } body.scrolled { @@ -635,11 +684,12 @@ pre code .nested:hover { opacity: 1; } body.scrolled header { box-shadow: 0px 1px 5px 0px rgba(0,0,0,.4); - padding: 0px 20px; + padding: 1px 20px; } body.scrolled header a { - transform: scale(.9); + // transform: scale(.8); + height: 22px; } .menu-open { @@ -720,6 +770,13 @@ pre code .nested:hover { opacity: 1; } } } +/* iPhone 6 and smaller */ +@media screen and (max-width: 414px) { + .sidebar > div { + columns: 2; + } +} + @media screen and (max-width: 600px) { .traditional { padding: 10px; diff --git a/refdoc/structure/modref.js b/refdoc/structure/modref.js index d644339c59b675cccb8e15d735dbf809062253c5..209a21c560ddc09ddcb6c398d0e60b320f989ce6 100644 --- a/refdoc/structure/modref.js +++ b/refdoc/structure/modref.js @@ -152,12 +152,69 @@ function onBurgerClick() { return false; } +// function nextElem(node, type) { +// var n = node.nextSibling; + +// if (!n) { +// return null; +// } + +// if (type) { +// if (type[1] === '.') { +// while (n && !n.classList.contains(type)) { +// n = n.nextSibling; +// } +// } +// else if (type[1] === '#') { +// while (n && n.getAttribute('id') !== type) { +// n = n.nextSibling; +// } +// } +// else { +// while (n && n.nodeName.toLowerCase() !== type) { +// n = n.nextSibling; +// } +// } +// } +// else { +// while (n && n.nodeType !== 1) { +// n = n.nextSibling; +// } +// } + +// return n; +// } + +// function onNavbarHeadClick(e) { +// e.stopPropagation(); +// e.preventDefault(); + +// var x = this; + +// if (this.parentNode.nodeName === 'A') { +// x = this.parentNode; +// } + +// var nb = nextElem(x, 'div'); +// if (nb) { +// this.classList.toggle('open'); +// nb.classList.toggle('open'); +// } +// } + function setMobileMode() { document.removeEventListener('scroll', onPageScroll); document.addEventListener('scroll', onMobilePageScroll, false); burger.removeEventListener('click', onBurgerClick); burger.addEventListener('click', onBurgerClick, false); navbar.classList.remove('sticky'); + // navbar.querySelectorAll('b.head').forEach(function(el) { + // if (el.classList.contains('top')) { + // return; + // } + + // el.addEventListener('click', onNavbarHeadClick, false); + // }); iAmSticky = false; }