page resources are returned in reverse, so get the last image rather than the first
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
856ff9851e
commit
a722904938
@ -19,7 +19,8 @@
|
||||
</div>
|
||||
{{end}}
|
||||
{{ else if (.Resources.ByType "image") }}
|
||||
{{ with (index (.Resources.ByType "image") 0) }}
|
||||
{{/* Somehow the image resources are iterated in reverse, so we need to get the last one*/}}
|
||||
{{ range last 1 (.Resources.ByType "image") }}
|
||||
{{ $img := . }}
|
||||
{{ $height := add .Height 0.0}}
|
||||
{{ $ratio := div $height .Width}}
|
||||
|
Loading…
Reference in New Issue
Block a user