blob: 7eb7920fbb07be3572e1bb9ad08bf7b3990dc251 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{{- $text := default "react" (.Get "text" | default (.Get 0)) -}}
{{- $source := default "" (.Get "source" | default (.Get 1)) -}}
{{- $title := default $text (.Get "title" | default (.Get 2)) -}}
{{- $alternate := default $title (.Get "alternate" | default (.Get 3)) -}}
{{- $author := .Page.Section -}}
{{- $image := partial "function-caches-images.html"
(dict
"Source" $source
"Fit" "100x100"
"Target" (print (partial "function-paths.html" "media") "/" $author "/")
"Copy" (print (partial "function-paths.html" "media") "/" $author "/react-" (path.Base $source))
"AlternateCopy" (print (partial "function-paths.html" "media") "/" $author "/react-" (path.BaseName $source) ".webp")
)
-}}
<reaction-hover title="{{ $title }}">
{{ $text | markdownify }}
<a href="{{ $image.Permalink }}">
<img
width="{{ $image.Width }}"
height="{{ $image.Height }}"
title="{{ $title }}"
alt="{{ $alternate }}"
src="{{ $image.Permalink }}"
/>
</a>
</reaction-hover>
|