Skip to content

Commit

Permalink
Fix link based on website feedback (#3047)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Jun 20, 2024
1 parent ee94830 commit a9a60b5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/get-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
4 changes: 4 additions & 0 deletions layouts/partials/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@
{{- end -}}
{{- else -}}
{{- if strings.HasPrefix ($link | string) "http" -}}
{{- if $customCanonicalLink -}}
<a href="{{$customCanonicalLink}}">
{{- else -}}
<a href="{{.RelPermalink}}">
{{- end -}}
{{- if $imageOverwrite -}}
<div class="hover-card-img">
{{- partial "imgproc.html" (dict "src" ($imageOverwrite) "resize" "400x" "alt" (.alt) "style" "") -}}
Expand Down
9 changes: 9 additions & 0 deletions layouts/shortcodes/manualcard.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{{ $size := (.Get "size") }}
{{- $webm_src := (.Get "webm_src") -}}
{{- $mp4_src := (.Get "mp4_src") -}}
{{- $alt := (.Get "alt") -}}

<div class="col hover-card">
{{ if .Get "link" }}<a href="{{ .Get "link" }}" {{ if .Get "target" }} target="{{ .Get "target" }}"{{ end }} class="noanchor">{{ end }}
{{- if $webm_src -}}
<div class="hover-card-video">
{{- partial "gif.html" (dict "webm_src" $webm_src "mp4_src" $mp4_src "alt" $alt "maxWidth" "100%" "class" "" ) -}}
</div>
{{- end -}}
{{ if .Get "img" }}
<div class="hover-card-img">
{{ $img := resources.GetMatch (.Get "img") }}
Expand Down

0 comments on commit a9a60b5

Please sign in to comment.