mirror of
https://github.com/imfing/hextra.git
synced 2025-06-20 19:01:21 -04:00
feat: configurable cols for feature-grid shortcode (#342)
* feat: configurable cols for feature-grid shortcode * chore: update css files * chore: add hextra prefix to cards css var * chore: rebuild css
This commit is contained in:
@ -1,9 +1,12 @@
|
||||
{{- $style := .Get "style" -}}
|
||||
{{- $cols := .Get "cols" | default 3 -}}
|
||||
{{- $style := .Get "style" | default "" -}}
|
||||
|
||||
{{- $css := printf "--hextra-feature-grid-cols: %v; %s" $cols $style -}}
|
||||
|
||||
|
||||
<div
|
||||
class="hx-grid sm:hx-grid-cols-2 lg:hx-grid-cols-3 hx-grid-cols-1 hx-gap-4 hx-w-full not-prose"
|
||||
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
||||
class="hextra-feature-grid hx-grid sm:max-lg:hx-grid-cols-2 max-sm:hx-grid-cols-1 hx-gap-4 hx-w-full not-prose"
|
||||
{{ with $css }}style="{{ . | safeCSS }}"{{ end }}
|
||||
>
|
||||
{{ .Inner }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user