mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 15:11:24 -04:00
feat: add detail box and update styles
chore: update 404 page style chore: update icon to use global site variable
This commit is contained in:
11
layouts/shortcodes/details.html
Normal file
11
layouts/shortcodes/details.html
Normal file
@ -0,0 +1,11 @@
|
||||
{{- $title := .Get "title" | default "" -}}
|
||||
{{- $closed := eq (.Get "closed") "true" | default false -}}
|
||||
|
||||
<details class="last-of-type:mb-0 rounded-lg bg-neutral-50 dark:bg-neutral-800 p-2 mt-4" data-expanded="true" {{ if not $closed }}open{{ end }}>
|
||||
<summary class="flex items-center cursor-pointer select-none list-none p-1 transition-colors hover:bg-gray-100 dark:hover:bg-neutral-800 before:mr-1 before:inline-block before:transition-transform before:content-[''] dark:before:invert rtl:before:rotate-180 [[data-expanded]>&]:before:rotate-90">
|
||||
<strong class="text-lg">{{ $title | markdownify }}</strong>
|
||||
</summary>
|
||||
<div class="p-2 overflow-hidden">
|
||||
{{ .InnerDeindent | markdownify }}
|
||||
</div>
|
||||
</details>
|
Reference in New Issue
Block a user