forked from drowl87/hextra_mirror
fix: use relative url for card link (#52)
* fix: cards links should not redirect to 404 * docs: update card links * fix: use relURL for card link
This commit is contained in:
parent
4a9a2850fc
commit
f70ba59ca0
@ -6,7 +6,7 @@ linkTitle: Cards
|
|||||||
## Example
|
## Example
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
{{< card link="/" title="Callout" icon="warning" >}}
|
{{< card link="../callout" title="Callout" icon="warning" >}}
|
||||||
{{< card link="/" title="No Icon" >}}
|
{{< card link="/" title="No Icon" >}}
|
||||||
{{< /cards >}}
|
{{< /cards >}}
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ linkTitle: Cards
|
|||||||
|
|
||||||
```
|
```
|
||||||
{{</* cards */>}}
|
{{</* cards */>}}
|
||||||
{{</* card link="/" title="Callout" icon="warning" */>}}
|
{{</* card link="../callout" title="Callout" icon="warning" */>}}
|
||||||
{{</* card link="/" title="No Icon" */>}}
|
{{</* card link="/" title="No Icon" */>}}
|
||||||
{{</* /cards */>}}
|
{{</* /cards */>}}
|
||||||
```
|
```
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<a
|
<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 }}"
|
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="{{ $link }}"
|
href="{{ $link | relURL }}"
|
||||||
{{- if $external }}
|
{{- if $external }}
|
||||||
target="_blank" rel="noreferrer"
|
target="_blank" rel="noreferrer"
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user