hide inactive slides

This commit is contained in:
Philipp Lang 2023-12-26 01:56:20 +01:00
parent 94bb663ae1
commit 7df1938b0d
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@
<div class="py-4 xs:py-8">
<carousel v-model="active">
<slide v-for="(section, index) in v.sections" :key="index">
<div class="w-full flex-none px-3 xs:px-6">
<div v-if="active === index" class="w-full flex-none px-3 xs:px-6">
<div class="text-sm sm_text-base text-gray-800 leading-tight mb-5" v-text="section.intro"></div>
<div class="grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 gap-4 mt-6 items-start">
<div
@ -114,7 +114,7 @@
</div>
</div>
<navigation v-model="active" :last="v.sections.length"></navigation>
<navigation v-if="active === index" v-model="active" :last="v.sections.length"></navigation>
</slide>
</carousel>
</div>