blob: e8e3296adb999191ba6cfed1bd1b0844d5b49b45 (
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
|
<div class="product">
{{ $resource := resources.Get .image }}
{{ with $resource }}
<amp-img
class="product__image"
layout="responsive" width="300" height="300"
alt="{{ $.title }}"
src="{{ .Permalink | absURL }}"></amp-img>
{{ else }}
<amp-img
class="product__image"
layout="responsive" width="300" height="300"
alt="{{ $.title }}"
src="{{ $.image | absURL }}"></amp-img>
{{ end }}
<div class="product__content">
<p class="product__title">{{ .title }}</p>
<p class="product__description">{{ .description }}</p>
{{ with .cta }}
<a class="product__cta button"
target="_blank"
rel="nofollow noopener noreferrer"
href="{{ $.link | absURL }}" role="button">{{ . }}</a>
{{ end }}
</div>
</div>
|