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 | 07f6e08a2c841111456c30c00abf437f2ca6ac62 (patch) | |
| tree | af32edd7aa17ede3ab7543dcdcccf1748fcd3b1a /layouts/_markup/render-heading.html | |
| parent | 7f89e1b5cfc8d95c36e9addba3bf750b047f4ee7 (diff) | |
refactor: replace _fictions.scss with unocss
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 }}> |
