Skip to content

Commit 097d7cc

Browse files
committed
Fix: Hide sub menu if empty
1 parent 84df2f6 commit 097d7cc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/_templates/page.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
<title>{{ title|striptags|e }}{%- for parent in parents %} – {{ parent.title }}{%- endfor %}{{ titlesuffix }}</title>
55
{%- endblock %}
66

7+
78
{% block footer %}
89
<script type="text/javascript">
910
$(document).ready(function() {
1011
// Hide empty sub menu.
11-
if ($.trim($(".topbar-contents .bd-toc").html()) === "") {
12-
$(".topbar-contents .bd-toc").css("visibility", "hidden");
12+
if ($.trim($(".sticky-top .bd-toc").html()) === "") {
13+
$(".sticky-top .bd-toc").css("visibility", "hidden");
1314
}
1415
});
1516
</script>

0 commit comments

Comments
 (0)