1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

Fixed JavaScript errors on 404 page

This commit is contained in:
squidfunk 2017-04-06 12:49:37 +02:00 committed by Martin Donath
parent 5b1bbea2a3
commit 2ab6083ebe
4 changed files with 12 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -150,7 +150,7 @@
{% endblock %}
</div>
{% block scripts %}
<script src="{{ base_url }}/assets/javascripts/application-c6f9af8d0c.js"></script>
<script src="{{ base_url }}/assets/javascripts/application-ae2e7c9801.js"></script>
<script>app.initialize({url:{base:"{{ base_url }}"}})</script>
{% for path in extra_javascript %}
<script src="{{ path }}"></script>

View File

@ -105,8 +105,8 @@ function initialize(config) { // eslint-disable-line func-style
"[data-md-component=navigation]",
"[data-md-component=header]")))
/* Component: sidebar with table of contents - register two separate
listeners, as the offset at the top might change */
/* Component: sidebar with table of contents (missing on 404 page) */
if (document.querySelector("[data-md-component=toc]"))
new Material.Event.MatchMedia("(min-width: 960px)",
new Material.Event.Listener(window, [
"scroll", "resize", "orientationchange"