Move menu items from settings into partial
Better ability to set active and enabled values
This commit is contained in:
parent
2c67e11bf7
commit
4030b0ed14
3 changed files with 37 additions and 31 deletions
|
@ -6,20 +6,6 @@
|
|||
</a>
|
||||
</div>
|
||||
|
||||
<nav role="navigation" aria-labelledby="block-dcb2017-main-menu-menu" id="block-dcb2017-main-menu" class="block block-menu navigation menu--main">
|
||||
<h2 class="visually-hidden" id="block-dcb2017-main-menu-menu">Main navigation</h2>
|
||||
<ul class="tw-list-reset tw-flex tw-flex-wrap tw-justify-center tw--ml-8">
|
||||
{% for item in site.main_menu if item.enabled == true %}
|
||||
<li class="tw-mb-2 tw-mx-4 md:tw-m-0 md:tw-ml-8">
|
||||
<a
|
||||
class="tw-uppercase tw-no-underline hocus:tw-text-green-600 {{ item.pattern and page.url matches item.pattern ? 'tw-text-green-600' : 'tw-text-black' }}"
|
||||
href="{{ item.url }}"
|
||||
>
|
||||
{{ item.title }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% include 'nav' %}
|
||||
</div>
|
||||
</header>
|
||||
|
|
Reference in a new issue