{{- $page := .page -}} {{- $link := .link -}} {{- $title := .title -}} {{- $icon := .icon -}} {{- $subtitle := .subtitle -}} {{- $image := .image -}} {{- $width := .width -}} {{- $height := .height -}} {{- $imageStyle := .imageStyle -}} {{- $tag := .tag -}} {{- $tagType := .tagType -}} {{ $linkClass := "hx:hover:border-gray-300 hx:bg-transparent hx:shadow-xs hx:dark:border-neutral-800 hx:hover:bg-slate-50 hx:hover:shadow-md hx:dark:hover:border-neutral-700 hx:dark:hover:bg-neutral-900" }} {{- with $image -}} {{ $linkClass = "hx:hover:border-gray-300 hx:bg-gray-100 hx:shadow-sm hx:dark:border-neutral-700 hx:dark:bg-neutral-800 hx:dark:text-gray-50 hx:hover:shadow-lg hx:dark:hover:border-neutral-500 hx:dark:hover:bg-neutral-700" }} {{- end -}} {{- $external := strings.HasPrefix $link "http" -}} {{- $href := cond (strings.HasPrefix $link "/") ($link | relURL) $link -}} {{- with $image -}} {{ $title }} {{- end -}} {{- $padding := "hx:p-4" -}} {{- with $subtitle -}} {{- $padding = "hx:pt-4 hx:px-4" -}} {{- end -}} {{- with $icon }}{{ partial "utils/icon.html" (dict "name" $icon) -}}{{- end -}} {{- $title -}} {{- with $subtitle -}}
{{- $subtitle | markdownify -}}
{{- end -}} {{- if $tag }} {{- partial "shortcodes/badge.html" (dict "content" $tag "type" $tagType "class" "hextra-card-tag" "border" true ) -}} {{- end -}}
{{- /* Strip trailing newline. */ -}}