diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-15 11:40:37 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-15 11:40:37 +0800 |
| commit | 34aaa3d8c48731bc74c53b089fee936bff815925 (patch) | |
| tree | af32edd7aa17ede3ab7543dcdcccf1748fcd3b1a /layouts/_markup/render-heading.html | |
| parent | 1cf1ba74eab662685e4fde1ea9ad0a1e60d02a09 (diff) | |
refactor: replace _fictions.scss with unocss
Former-commit-id: 07f6e08a2c841111456c30c00abf437f2ca6ac62
Diffstat (limited to 'layouts/_markup/render-heading.html')
| -rw-r--r-- | layouts/_markup/render-heading.html | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/layouts/_markup/render-heading.html b/layouts/_markup/render-heading.html new file mode 100644 index 00000000..b93a9aad --- /dev/null +++ b/layouts/_markup/render-heading.html @@ -0,0 +1,5 @@ +{{ $size := index (dict "1" "text-4xl" "2" "text-2xl" "3" "text-xl" "4" "text-lg" "5" "text-base" "6" "text-sm") (printf "%d" .Level) }} +<h{{ .Level }} id="{{ .Anchor }}" + class="{{ if eq .Level 2 }}font-extrabold{{ else }}font-bold{{ end }} my-5 {{ $size }}{{ with .Attributes.class }} {{ . }}{{ end }}"> + {{- .Text -}} +</h{{ .Level }}> |
