2023-09-26 08:15:31 +01:00
|
|
|
{{- $title := .Get "title" -}}
|
|
|
|
{{- $subtitle := .Get "subtitle" -}}
|
|
|
|
{{- $class := .Get "class" -}}
|
|
|
|
{{- $image := .Get "image" -}}
|
|
|
|
{{- $imageClass := .Get "imageClass" -}}
|
|
|
|
{{- $style := .Get "style" -}}
|
|
|
|
{{- $icon := .Get "icon" -}}
|
2023-10-27 05:13:24 +07:00
|
|
|
{{- $link := .Get "link" -}}
|
2023-09-26 08:15:31 +01:00
|
|
|
|
2023-10-27 05:13:24 +07:00
|
|
|
{{- $external := hasPrefix $link "http" -}}
|
|
|
|
{{- $href := cond (strings.HasPrefix $link "/") ($link | relURL) $link -}}
|
2023-09-26 08:15:31 +01:00
|
|
|
|
2023-11-10 12:45:44 -05:00
|
|
|
{{- if hasPrefix $image "/" -}}
|
|
|
|
{{- $image = relURL (strings.TrimPrefix "/" $image) -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
2023-10-27 05:13:24 +07:00
|
|
|
<a
|
|
|
|
{{ with $link }}href="{{ $href }}" {{ with $external }} target="_blank" rel="noreferrer"{{ end }}{{ end }}
|
2023-09-26 08:15:31 +01:00
|
|
|
{{ with $style }}style="{{ . | safeCSS }}"{{ end }}
|
2023-10-29 11:19:31 -04:00
|
|
|
class="{{ $class }} hextra-feature-card not-prose block relative overflow-hidden rounded-3xl border border-gray-200 hover:border-gray-300 dark:border-neutral-800 dark:hover:border-neutral-700 before:pointer-events-none before:absolute before:inset-0 before:bg-glass-gradient"
|
2023-09-26 08:15:31 +01:00
|
|
|
>
|
|
|
|
<div class="relative w-full p-6">
|
|
|
|
<h3 class="text-2xl font-medium leading-6 mb-2 flex items-center">
|
|
|
|
{{ with $icon -}}
|
|
|
|
<span class="pr-2">
|
|
|
|
{{- partial "utils/icon.html" (dict "name" . "attributes" "height=1.5rem") -}}
|
|
|
|
</span>
|
|
|
|
{{ end -}}
|
|
|
|
<span>{{ $title }}</span>
|
|
|
|
</h3>
|
|
|
|
<p class="text-gray-500 dark:text-gray-400 text-sm leading-6">{{ $subtitle | markdownify }}</p>
|
|
|
|
</div>
|
|
|
|
{{- with $image -}}
|
|
|
|
<img src="{{ . }}" class="absolute max-w-none {{ $imageClass }}" alt="{{ $title }}" />
|
|
|
|
{{- end -}}
|
2023-10-27 05:13:24 +07:00
|
|
|
</a>
|