Merge pull request #2816 from richtefee/feature/accordion-align

Add optional align parameter to accordion items shortcode.
This commit is contained in:
Nuno C.
2026-03-11 00:21:13 +00:00
committed by GitHub
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -10,6 +10,7 @@
{{ $md := .Get "md" | default true }}
{{ $open := .Get "open" | default false }}
{{ $isOpen := or (eq $open true) (eq $open "true") }}
{{ $align := .Get "align" }}
<details
class="{{ if $isSeparated }}rounded-lg border border-neutral-200 dark:border-neutral-700 overflow-hidden{{ else }}border-none{{ end }}"
@@ -27,7 +28,7 @@
{{ partial "icon" "chevron-down" }}
</span>
</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{{ if $align }} text-{{ $align }}{{ end }}">
{{ if $md }}
{{- .Inner | markdownify -}}
{{ else }}