Fixed case where table of contents icon is missing on mobile navigation

This commit is contained in:
squidfunk 2017-03-16 15:57:46 +01:00 committed by Martin Donath
parent 3c1cfa86e0
commit c4c7beaefa
2 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@
<li class="{{ class }}"> <li class="{{ class }}">
{% set toc_ = page.toc %} {% set toc_ = page.toc %}
<input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc"> <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="toc">
{% if toc_ | first is defined %} {% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %} {% set toc_ = (toc_ | first).children %}
{% endif %} {% endif %}
{% if toc_ | first is defined %} {% if toc_ | first is defined %}

View File

@ -71,7 +71,7 @@
type="checkbox" id="toc" /> type="checkbox" id="toc" />
<!-- Hack: see partials/toc.html for more information --> <!-- Hack: see partials/toc.html for more information -->
{% if toc_ | first is defined %} {% if toc_ | first is defined and "\x3ch1 id=" in page.content %}
{% set toc_ = (toc_ | first).children %} {% set toc_ = (toc_ | first).children %}
{% endif %} {% endif %}