Skip to content

Commit 861182e

Browse files
committed
Fix amazon shortcode
1 parent a5473a9 commit 861182e

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

layouts/shortcodes/amazon.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
{{- $tag := site.Params.amazonJpAffiliate }}
22
{{- $asin := .Get "asin" -}}
33
{{- $title := .Get "title" -}}
4-
{{- $destination := "no_image_square.jpg" -}}
5-
{{- $img := (.Page.Resources.ByType "image").GetMatch $destination -}}
6-
{{- if not $img -}}
7-
{{- $img = resources.Get (path.Join "media" $destination) -}}
8-
{{- end -}}
9-
<div class="amazon-widget">
4+
<div class="border-2 rounded-lg amazon-widget">
105
<a target="_blank" href="https://www.amazon.co.jp/gp/product/{{ $asin }}/?tag={{ $tag }}"></a>
116
<div class="amazon-widget-img">
12-
<img src="{{ $img }}" />
7+
<img src="/media/no_image_square.webp" />
138
</div>
149
<div class="amazon-widget-info">
1510
<span class="amazon-widget-title">

static/media/no_image_square.webp

4.3 KB
Loading

0 commit comments

Comments
 (0)