From 7a9baa1c509ee1eacf43aefa1419f76ae4529a14 Mon Sep 17 00:00:00 2001 From: Alex Haslam Date: Sat, 31 Jan 2026 19:56:37 +0000 Subject: [PATCH] Update to use existing compiled classes --- layouts/shortcodes/accordion.html | 17 +++++++++++++ layouts/shortcodes/accordionItem.html | 36 ++++++--------------------- 2 files changed, 24 insertions(+), 29 deletions(-) diff --git a/layouts/shortcodes/accordion.html b/layouts/shortcodes/accordion.html index cf20c79a..07ef7f2c 100644 --- a/layouts/shortcodes/accordion.html +++ b/layouts/shortcodes/accordion.html @@ -4,3 +4,20 @@
{{- .Inner -}}
+{{ if eq $mode "collapse" }} + +{{ end }} diff --git a/layouts/shortcodes/accordionItem.html b/layouts/shortcodes/accordionItem.html index f4ebbbc9..4bea785c 100644 --- a/layouts/shortcodes/accordionItem.html +++ b/layouts/shortcodes/accordionItem.html @@ -1,37 +1,15 @@ -{{ $parent := .Parent }} -{{ $groupID := "" }} -{{ $mode := "collapse" }} -{{ if $parent }} - {{ $groupID = delimit (slice "accordion" (partial "functions/uid.html" $parent)) "-" }} - {{ $mode = $parent.Get "mode" | default "collapse" }} -{{ else }} - {{ $groupID = delimit (slice "accordion" (partial "functions/uid.html" .)) "-" }} -{{ end }} - -{{ $id := delimit (slice "accordion-item" (partial "functions/uid.html" .)) "-" }} {{ $title := .Get "title" | default (.Get "header") }} {{ $open := .Get "open" | default false }} {{ $isOpen := or (eq $open true) (eq $open "true") }} -
- -
+