When
onpage_menu: true
is set in the frontmater of the modular.md. The mobile menu is showing up like expected so that i could navigate to the “sections”. But it is not collapsing, when you click on a menu-link. It stays open. I dont know if this is a bug.
I think the part that handle this is in the modular.twig.html
...
{% set show_onpage_menu = header.onpage_menu == true or header.onpage_menu is null %}
...
{% block javascripts %}
{% if show_onpage_menu %}
{% do assets.add('theme://js/singlePageNav.min.js') %}
{% endif %}
{{ parent() }}
{% endblock %}
{% block bottom %}
{{ parent() }}
{% if show_onpage_menu %}
<script>
// singlePageNav initialization & configuration
$('.navbar-nav').singlePageNav({
//offset: $('#header').outerHeight(),
filter: ':not(.external)',
updateHash: true,
currentClass: 'active'
});
</script>
{% endif %}
{% endblock %}
...
Can somebody give me a hint how i can solve this
Thank pgrav