mirror of
https://github.com/imfing/hextra.git
synced 2025-05-13 15:16:27 -04:00
fix: card links for getting started page
This commit is contained in:
parent
af77173a35
commit
ede8991728
@ -66,7 +66,7 @@ Voila! You can see your new site at `http://localhost:1313/`.
|
|||||||
Explore the following sections to start adding more contents:
|
Explore the following sections to start adding more contents:
|
||||||
|
|
||||||
{{< cards >}}
|
{{< cards >}}
|
||||||
{{< card link="organize-files" title="Organize Files" icon="document-duplicate" >}}
|
{{< card link="../guide/organize-files" title="Organize Files" icon="document-duplicate" >}}
|
||||||
{{< card link="configuration" title="Configuration" icon="adjustments" >}}
|
{{< card link="../guide/configuration" title="Configuration" icon="adjustments" >}}
|
||||||
{{< card link="markdown" title="Markdown" icon="markdown" >}}
|
{{< card link="../guide/markdown" title="Markdown" icon="markdown" >}}
|
||||||
{{< /cards >}}
|
{{< /cards >}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{{- $href := .Get "link" -}}
|
{{- $link := .Get "link" -}}
|
||||||
{{- $title := .Get "title" -}}
|
{{- $title := .Get "title" -}}
|
||||||
{{- $icon := .Get "icon" -}}
|
{{- $icon := .Get "icon" -}}
|
||||||
{{- $subtitle := .Get "subtitle" }}
|
{{- $subtitle := .Get "subtitle" }}
|
||||||
@ -10,9 +10,15 @@
|
|||||||
{{ $linkClass = "hover:border-gray-300 bg-gray-100 shadow dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-50 hover:shadow-lg dark:hover:border-neutral-500 dark:hover:bg-neutral-700" }}
|
{{ $linkClass = "hover:border-gray-300 bg-gray-100 shadow dark:border-neutral-700 dark:bg-neutral-800 dark:text-gray-50 hover:shadow-lg dark:hover:border-neutral-500 dark:hover:bg-neutral-700" }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- $external := strings.HasPrefix $link "http" -}}
|
||||||
|
|
||||||
<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="{{ $href }}"
|
href="{{ $link }}"
|
||||||
|
{{- if $external -}}
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer"
|
||||||
|
{{- end -}}
|
||||||
>
|
>
|
||||||
{{- with $image -}}
|
{{- with $image -}}
|
||||||
<img alt="{{ $title }}" loading="lazy" decoding="async" style="color: transparent;" src="{{ $image }}" />
|
<img alt="{{ $title }}" loading="lazy" decoding="async" style="color: transparent;" src="{{ $image }}" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user