summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2022-05-23 13:10:26 +0200
committerPatrick Spek <p.spek@tyil.nl>2022-05-23 13:10:26 +0200
commitd4607f59e5f45448ce74c2fb56d992c94c16d13d (patch)
tree71a79c18e32d762c35825cc496bd91ea165806ec /layouts
parent6e0e38ad4e7cf1b30e44b46fad898ce2e128bb4c (diff)
Update recipe layout to allow informative links with ingredients
Diffstat (limited to 'layouts')
-rw-r--r--layouts/recipes/single.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/layouts/recipes/single.html b/layouts/recipes/single.html
index 0a7d1ad..7919970 100644
--- a/layouts/recipes/single.html
+++ b/layouts/recipes/single.html
@@ -60,7 +60,14 @@
<td>
<input id="ingredient{{ $i }}" type="checkbox">
</td>
- <td><label for="ingredient{{ $i }}">{{ .label }}</label></td>
+ <td>
+ <label for="ingredient{{ $i }}">{{ .label }}</label>
+ {{- if .links }}
+ {{- range .links }}
+ <a class="external-link-icon" href="{{ . }}">↗</span></a>
+ {{- end }}
+ {{- end }}
+ </td>
{{- if .unit }}
<td data-unit="{{ $ingredient.unit }}" data-amount="{{ $ingredient.amount }}">{{ .amount }}</td>
<td data-unit="{{ $ingredient.unit }}">{{ $ingredient.unit }}</td>