Don't include menu.js if no main menu items
This commit is contained in:
parent
1f600c2781
commit
45f0ca00f7
2 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,9 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ partial "footer" . }}
|
{{ partial "footer" . }}
|
||||||
|
{{- with .Site.Menus.main }}
|
||||||
<script src="{{ "js/menu.js" | relURL }}"></script>
|
<script src="{{ "js/menu.js" | relURL }}"></script>
|
||||||
|
{{- end }}
|
||||||
{{- partial "mathjax.html" . -}}
|
{{- partial "mathjax.html" . -}}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
|
@ -10,6 +10,4 @@ function toggleMenu() {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toggle && menu) {
|
|
||||||
toggle.addEventListener('click', toggleMenu, false);
|
toggle.addEventListener('click', toggleMenu, false);
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue