From a9a60b5a9f810304a3414025cd65094198f034c3 Mon Sep 17 00:00:00 2001 From: Naomi Pentrel <5212232+npentrel@users.noreply.github.com> Date: Thu, 20 Jun 2024 23:38:54 +0100 Subject: [PATCH] Fix link based on website feedback (#3047) --- docs/get-started/_index.md | 8 +++++++- layouts/partials/card.html | 4 ++++ layouts/shortcodes/manualcard.html | 9 +++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/get-started/_index.md b/docs/get-started/_index.md index 46c31d789c..4d0fe164db 100644 --- a/docs/get-started/_index.md +++ b/docs/get-started/_index.md @@ -20,6 +20,12 @@ If you need any help along the way, join our community: {{< cards >}} {{% card link="/get-started/installation/" %}} -{{% card link="https://discord.gg/viam" customDescription="Have questions, or want to meet other people working on smart machines? Join us in the Community Discord!" customTitle="Community" webm_src="/heart.webm" mp4_src="/heart.mp4" alt="A robot drawing a heart" %}} +{{% manualcard link="https://discord.gg/viam" webm_src="/heart.webm" mp4_src="/heart.mp4" alt="A robot drawing a heart" %}} + +#### Community + +Have questions, or want to meet other people working on smart machines? Join us in the Community Discord! + +{{% /manualcard %}} {{< /cards >}} diff --git a/layouts/partials/card.html b/layouts/partials/card.html index 5bbd3f7a9d..77ffa921de 100644 --- a/layouts/partials/card.html +++ b/layouts/partials/card.html @@ -64,7 +64,11 @@ {{- end -}} {{- else -}} {{- if strings.HasPrefix ($link | string) "http" -}} + {{- if $customCanonicalLink -}} + + {{- else -}} + {{- end -}} {{- if $imageOverwrite -}}
{{- partial "imgproc.html" (dict "src" ($imageOverwrite) "resize" "400x" "alt" (.alt) "style" "") -}} diff --git a/layouts/shortcodes/manualcard.html b/layouts/shortcodes/manualcard.html index ab2c578e95..fd8e8431bb 100644 --- a/layouts/shortcodes/manualcard.html +++ b/layouts/shortcodes/manualcard.html @@ -1,6 +1,15 @@ {{ $size := (.Get "size") }} +{{- $webm_src := (.Get "webm_src") -}} +{{- $mp4_src := (.Get "mp4_src") -}} +{{- $alt := (.Get "alt") -}} +
{{ if .Get "link" }}{{ end }} + {{- if $webm_src -}} +
+ {{- partial "gif.html" (dict "webm_src" $webm_src "mp4_src" $mp4_src "alt" $alt "maxWidth" "100%" "class" "" ) -}} +
+ {{- end -}} {{ if .Get "img" }}
{{ $img := resources.GetMatch (.Get "img") }}