start nav mobile
This commit is contained in:
parent
e3680dcefb
commit
a23a5ba06b
6 changed files with 95 additions and 14 deletions
|
|
@ -49,9 +49,11 @@
|
|||
</a>
|
||||
<ul class="expanded-nav__columns">
|
||||
<?php foreach($site->children()->listed() as $category): ?>
|
||||
<li>
|
||||
<h4 class="expanded-nav__category"><a href="<?= $category->url() ?>"><?= $category->title() ?></a></h4>
|
||||
<ul>
|
||||
<li x-data="{
|
||||
open: false
|
||||
}">
|
||||
<h4 class="expanded-nav__category"><a href="<?= $category->url() ?>"><?= $category->title() ?></a><button class="toggle" :class="open ? 'open': ''" @click="open = !open">→</button></h4>
|
||||
<ul class="expanded-nav__subcategories" :class="open ? 'open': ''">
|
||||
<?php foreach($category->children() as $subcategory): ?>
|
||||
<?php if ($subcategory->isIndexed() == 'true'): ?>
|
||||
<li><a class="expanded-nav__subcategory" href="<?= $category->url() . '/#' . $subcategory->slug() ?>"><?= $subcategory->title() ?></a></li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue