diff --git a/layouts/shortcodes/hextra/hero-container.html b/layouts/shortcodes/hextra/hero-container.html new file mode 100644 index 00000000..1b7e54c6 --- /dev/null +++ b/layouts/shortcodes/hextra/hero-container.html @@ -0,0 +1,38 @@ +{{- $class := .Get "class" -}} +{{- $cols := .Get "cols" | default 2 -}} +{{- $image := .Get "image" -}} +{{- $imageCard := .Get "imageCard" | default false -}} +{{- $imageClass := .Get "imageClass" -}} +{{- $imageLink := .Get "imageLink" -}} +{{- $imageLinkExternal := hasPrefix $imageLink "http" -}} +{{- $imageStyle := .Get "imageStyle" -}} +{{- $imageTitle := .Get "imageTitle" -}} +{{- $imageWidth := .Get "imageWidth" | default 350 -}} +{{- $imageHeight := .Get "imageHeight" | default 350 -}} +{{- $style := .Get "style" -}} + +{{- $css := printf "--hextra-feature-grid-cols: %v; %s" $cols $style -}} +{{- $href := cond (hasPrefix $imageLink "/") ($imageLink | relURL) $imageLink -}} +{{- if hasPrefix $image "/" -}} + {{- $image = relURL (strings.TrimPrefix "/" $image) -}} +{{- end -}} + +
+
+ {{ .Inner }} +
+ {{- with $image }} +
+ + + +
+ {{ end -}} +