summaryrefslogtreecommitdiff
path: root/layouts/_markup/render-heading.html
blob: b93a9aad5c480d604166ad91153ebfd9fc0276aa (plain)
1
2
3
4
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 }}>