FAQ: animate answers open and closed
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb239a97cb
commit
87ff1c477f
2 files changed
+21
-1
No files matched your search
@@ -72,7 +72,7 @@ class="w-full h-auto lg:sticky lg:top-42"
|
||||
@foreach ($section->items as $faq)
|
||||
@php $number++; @endphp
|
||||
|
||||
<details id="{{ $faq->slug }}" class="group scroll-mt-28">
|
||||
<details id="{{ $faq->slug }}" class="faq-item group scroll-mt-28">
|
||||
<summary class="flex cursor-pointer list-none items-center gap-4 border-b border-transparent py-4 font-display text-2xl font-bold group-open:border-black [&::-webkit-details-marker]:hidden">
|
||||
<span class="w-8 shrink-0 tabular-nums" aria-hidden="true">{{ str_pad($number, 2, '0', STR_PAD_LEFT) }}</span>
|
||||
<span class="flex-1" data-stoic="faqs/{{ $faq->slug }}#name">{{ $faq->name }}</span>
|
||||
|
||||
Reference in new issue
Block a user