mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 14:51:22 -04:00
feat: add filetree component for shortcode
chore: update tailwind config and move hugo_stats
This commit is contained in:
17
layouts/shortcodes/filetree/folder.html
Normal file
17
layouts/shortcodes/filetree/folder.html
Normal file
@ -0,0 +1,17 @@
|
||||
{{- $name := .Get "name" -}}
|
||||
{{- $state := .Get "state" | default "open" }}
|
||||
|
||||
<li class="group flex list-none flex-col">
|
||||
<button class="hextra-filetree-folder inline-flex cursor-pointer items-center py-1 hover:opacity-60">
|
||||
<span data-state="{{ $state }}" class="data-[state=open]:hidden">
|
||||
{{- partial "utils/icon" (dict "name" "folder" "attributes" "width=1em") -}}
|
||||
</span>
|
||||
<span data-state="{{ $state }}" class="data-[state=closed]:hidden">
|
||||
{{- partial "utils/icon" (dict "name" "folder-open" "attributes" "width=1em") -}}
|
||||
</span>
|
||||
<span class="ml-1">{{ $name }}</span>
|
||||
</button>
|
||||
<ul data-state="{{ $state }}" class="pl-5 data-[state=closed]:hidden">
|
||||
{{- .Inner -}}
|
||||
</ul>
|
||||
</li>
|
Reference in New Issue
Block a user