mirror of
https://github.com/imfing/hextra.git
synced 2025-05-13 07:48:37 -04:00
Implement header size
This commit is contained in:
parent
9e684fa313
commit
368c20e935
@ -1,8 +1,10 @@
|
|||||||
{{- $style := .Get "style" -}}
|
{{- $style := .Get "style" -}}
|
||||||
|
{{- $header := int (strings.TrimPrefix "h" (.Get "header" | default "h2")) -}}
|
||||||
|
{{- $size := cond (ge $header 4) "xl" (cond (eq $header 3) "2xl" "4xl") -}}
|
||||||
|
|
||||||
<h2
|
<h{{ $header }}
|
||||||
class="not-prose hx-text-4xl hx-font-bold hx-leading-none hx-tracking-tighter md:hx-text-3xl hx-py-2 hx-bg-clip-text hx-text-transparent hx-bg-gradient-to-r hx-from-gray-900 hx-to-gray-600 dark:hx-from-gray-100 dark:hx-to-gray-400"
|
class="not-prose hx-text-{{ $size }} hx-font-bold hx-leading-none hx-tracking-tighter md:hx-text-3xl hx-py-2 hx-bg-clip-text hx-text-transparent hx-bg-gradient-to-r hx-from-gray-900 hx-to-gray-600 dark:hx-from-gray-100 dark:hx-to-gray-400"
|
||||||
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
||||||
>
|
>
|
||||||
{{ .Inner | markdownify }}
|
{{ .Inner | markdownify }}
|
||||||
</h2>
|
</h{{ $header }}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user