File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1818{{ $url := .Get "url" }}
1919{{ $class := .Get "class" | default "" }}
2020
21- < a href ="{{ relURL $url }} " class ="image-card-link block no-underline hover:no-underline text-inherit hover:text-inherit h-full ">
21+ {{/* Handle internal vs external URLs */}}
22+ {{ $finalUrl := $url }}
23+ {{ if and (not (hasPrefix $url "http")) (not (hasPrefix $url "//")) }}
24+ {{ $finalUrl = relref . $url }}
25+ {{ end }}
26+
27+ < a href ="{{ $finalUrl }} " class ="image-card-link block no-underline hover:no-underline text-inherit hover:text-inherit h-full ">
2228 < div class ="image-card flex flex-col items-center text-center p-4 border border-redis-pen-300 rounded-lg hover:border-redis-red-500 hover:shadow-md transition-all duration-200 h-full {{ $class }} ">
2329 < div class ="image-card-img-container mb-4 flex-shrink-0 ">
2430 < img src ="{{ relURL $image }} " alt ="{{ $alt }} " class ="image-card-img w-28 h-28 object-contain ">
You can’t perform that action at this time.
0 commit comments