mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 14:14:48 +00:00
BREAKING CHANGE Module paths moved to `github.com/HugoBlox/kit` with new names: - core `blox-tailwind` → `blox` - analytics → `analytics` - netlify → `integrations/netlify` - slides (reveal) → `slides` Update go.mod, module.yaml/params, scripts, tests, and v0.11 migration guide accordingly.
22 lines
659 B
HTML
22 lines
659 B
HTML
{{/*
|
|
Docs: https://docs.hugoblox.com/reference/markdown/#toggle-lists
|
|
|
|
Parameters
|
|
----------
|
|
text :
|
|
Spoiler title.
|
|
class : optional
|
|
Additional class for <details> tag.
|
|
style : optional
|
|
Additional style for <details> tag.
|
|
*/}}
|
|
|
|
{{- $title := .Get "text" | default "" -}}
|
|
{{- $id := printf "spoiler-%d" .Ordinal -}}
|
|
|
|
<details class="spoiler {{ .Get "class" }}" {{ with .Get "style" }}style="{{ . | safeCSS }}"{{ end }} id="{{$id}}">
|
|
<summary class="cursor-pointer">{{ $title }}</summary>
|
|
<div class="rounded-lg bg-neutral-50 dark:bg-neutral-800 p-2">
|
|
{{ .InnerDeindent | markdownify }}
|
|
</div>
|
|
</details> |