mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-02 19:52:40 +00:00
✨ Feat: add open and center params for details shortcode
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
<details>
|
||||
<summary>{{ .Get "summary" | default (.Get 0) | .Page.RenderString }}</summary>
|
||||
{{- $summary := .Get "summary" | default (.Get 0) -}}
|
||||
{{- $open := .Get "open" | default (.Get 1) | default false -}}
|
||||
{{- $center := .Get "center" | default (.Get 2) | default false -}}
|
||||
<details
|
||||
{{- with $open }} open{{ end -}}
|
||||
>
|
||||
<summary
|
||||
{{- if $center }} class="text-center"{{ end -}}
|
||||
>{{ $summary | .Page.RenderString }}</summary>
|
||||
{{ .Inner | .Page.RenderString }}
|
||||
</details>
|
||||
{{- /* EOF */ -}}
|
||||
{{- /* EOF */ -}}
|
||||
Reference in New Issue
Block a user