feat: improve Cards link behaviour (#153)

* clickable feature-card when a link is provided

* unclickable card when no link is provided

---------

Co-authored-by: Xin <xin@imfing.com>
This commit is contained in:
LLL
2023-10-27 05:13:24 +07:00
committed by GitHub
parent b5ab4ecdcb
commit ae01ac08b6
2 changed files with 8 additions and 5 deletions

View File

@@ -49,9 +49,8 @@
<a
class="hextra-card group flex flex-col justify-start overflow-hidden rounded-lg border border-gray-200 text-current no-underline dark:shadow-none hover:shadow-gray-100 dark:hover:shadow-none shadow-gray-100 active:shadow-sm active:shadow-gray-200 transition-all duration-200 {{ $linkClass }}"
href="{{ $href }}"
{{- if $external }}
target="_blank" rel="noreferrer"
{{- if $link -}}
href="{{ $href }}" {{ with $external }}target="_blank" rel="noreferrer"{{ end -}}
{{- end -}}
>
{{- with $image -}}