expanded nav - add program subcategories

This commit is contained in:
isUnknown 2024-09-10 18:36:50 +02:00
parent 952c81aaff
commit 3076394e19
3 changed files with 30 additions and 2 deletions

View file

@ -24,7 +24,17 @@
x-data="{title: 'Calendrier'}"
x-text="title"
:class="tab === title ? 'strong' : ''"
@click="if (tab === title) { tab = 'Programme' } else {tab = title}"
@click="
if (tab === title) {
tab = 'Programme'
} else {
tab = title
}
const url = new URL(window.location.href);
url.searchParams.set('tab', tab);
window.history.pushState({}, '', url);
"
></button>
<?php foreach($page->categories()->split() as $filter): ?>
<button
@ -36,7 +46,17 @@
}"
x-text="title"
:class="tab === filterTitle ? 'strong' : ''"
@click="if (tab === filterTitle) { tab = 'Programme' } else { tab = filterTitle; filter = title }"
@click="
if (tab === filterTitle) {
tab = 'Programme'
} else {
tab = filterTitle; filter = title
}
const url = new URL(window.location.href);
url.searchParams.set('tab', tab);
window.history.pushState({}, '', url);
"
></button>
<?php endforeach ?>
</section>