aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Manning <andrew@reticu.li>2016-11-28 06:36:19 -0700
committerAndrew Manning <andrew@reticu.li>2016-11-28 06:36:19 -0700
commit2528f35f008dcc39e2a6c6680ab771a9da7c20f5 (patch)
tree923fadc49dac49ae15c0229abd19943a3c7d7f6b
parent5bcb373c00a500cd8120df41bc0788172fe7e347 (diff)
downloadvolse-hubzilla-2528f35f008dcc39e2a6c6680ab771a9da7c20f5.tar.gz
volse-hubzilla-2528f35f008dcc39e2a6c6680ab771a9da7c20f5.tar.bz2
volse-hubzilla-2528f35f008dcc39e2a6c6680ab771a9da7c20f5.zip
Autoscroll page table of contents near top of side nav menu if on large screens, but set position to static on small screens to fix display bug
-rw-r--r--doc/toc.html16
1 files changed, 11 insertions, 5 deletions
diff --git a/doc/toc.html b/doc/toc.html
index da67ff88b..23eb57b64 100644
--- a/doc/toc.html
+++ b/doc/toc.html
@@ -8,14 +8,18 @@
.doco-list-group-item {
padding-left: 15px;
}
- .widget {
+ #region_1 .widget {
position: fixed;
top:70px;
width: inherit;
height: 80%;
overflow-y: scroll;
}
-
+ @media screen and (max-width: 767px) {
+ #region_1 .widget {
+ position: static;
+ }
+ }
</style>
<div class="panel-group" id="accordion">
@@ -120,11 +124,13 @@
break;
default:
break;
- }
+ }
+ // Generate the table of contents in the side nav menu (see view/tpl/help.tpl)
$(document).ready(function () {
var tocUl = $('#page-toc-container').append('<ul>').find('ul');
- tocUl.removeClass();
+ tocUl.removeClass(); // Classes are automatically added to <ul> elements by something else
tocUl.toc({content: "#doco-content", headings: "h1,h2,h3,h4"});
+ $('#region_1 .widget').scrollTop($(tocUl).offset().top - $('#accordion').offset().top);
});
-</script> \ No newline at end of file
+</script>