Make chevron rotate
This commit is contained in:
@@ -27,6 +27,15 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
<style>
|
||||||
|
#{{ $id }} details[data-accordion-item] > summary .accordion-chevron {
|
||||||
|
transform: rotate(-90deg);
|
||||||
|
transition: transform 200ms ease-in-out;
|
||||||
|
}
|
||||||
|
#{{ $id }} details[data-accordion-item][open] > summary .accordion-chevron {
|
||||||
|
transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
{{ if eq $mode "collapse" }}
|
{{ if eq $mode "collapse" }}
|
||||||
<script>
|
<script>
|
||||||
(() => {
|
(() => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
{{ $isOpen := or (eq $open true) (eq $open "true") }}
|
{{ $isOpen := or (eq $open true) (eq $open "true") }}
|
||||||
|
|
||||||
<details
|
<details
|
||||||
class="{{ if $isSeparated }}rounded-lg border border-neutral-200 dark:border-neutral-700 overflow-hidden{{ else }}border-none{{ end }}"
|
class="group {{ if $isSeparated }}rounded-lg border border-neutral-200 dark:border-neutral-700 overflow-hidden{{ else }}border-none{{ end }}"
|
||||||
data-accordion-item
|
data-accordion-item
|
||||||
{{ if $isOpen }}open{{ end }}
|
{{ if $isOpen }}open{{ end }}
|
||||||
>
|
>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
<span>{{ $title }}</span>
|
<span>{{ $title }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span class="accordion-chevron ms-auto flex h-5 w-5 items-center justify-center print:hidden">
|
||||||
{{ partial "icon" "chevron-down" }}
|
{{ partial "icon.html" "chevron-down" }}
|
||||||
</span>
|
</span>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="px-4 pb-4 text-neutral-700 dark:text-neutral-300">
|
<div class="px-4 pb-4 text-neutral-700 dark:text-neutral-300">
|
||||||
|
|||||||
Reference in New Issue
Block a user