using native html

This commit is contained in:
2025-04-30 19:50:12 -03:00
parent 4a4c5ef32a
commit fa21aad65a
4 changed files with 9 additions and 15 deletions

View File

@@ -1,7 +1,5 @@
<div
x-show="open"
<main
class="text-sm/6 text-white/70 space-y-2.5 px-5 pb-3 [&_ul]:list-disc [&_ul]:list-inside"
style="display: none;"
>
<slot />
</div>
</main>

View File

@@ -2,14 +2,12 @@
import { Icon } from "astro-icon/components";
---
<div
<summary
class="cursor-pointer flex items-center justify-between px-5 gap-3 py-3"
x-on:click="open = ! open"
>
<slot />
<Icon
name="chevron-down"
class="size-4 fill-white/60 group-data-[hover]:fill-white/50 shrink-0 transition duration-300"
:class="{'-rotate-180': open === true}"
class="size-4 fill-white/60 group-data-[hover]:fill-white/50 shrink-0 transition duration-300 group-open:-rotate-180"
/>
</div>
</summary>

View File

@@ -1,7 +1,5 @@
<div
x-data="{ open: false }"
class="bg-white/10 w-full hover:bg-white/15 aria-expanded:bg-white/15 rounded-lg transition"
x-bind:aria-expanded="open"
<details
class="bg-white/10 w-full hover:bg-white/15 aria-expanded:bg-white/15 rounded-lg transition group"
>
<slot />
</div>
</details>

View File

@@ -169,6 +169,6 @@ const { Content } = await render(course);
</Container>
{/* Course End */}
<Content test=": tes" />
<Content />
</section>
</Layout>