image height calculations were wrong

This commit is contained in:
jake committed 2019-11-18 14:15:04 -05:00
1 parent afd5e36047
commit d42a00247f
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -24,8 +24,9 @@
{{- $image := .Scratch.Get "image" -}}
{{- $origRatio := (div (float $image.Height) $image.Width) }}
{{- $displayWidth := $setWidth -}}
{{- $displayHeight := (math.Round (div $image.Height 2)) -}}
{{- $displayHeight := (math.Ceil (mul $origRatio $setWidth)) -}}
{{- if .Get "caption" -}}
<figure>