mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-07-17 11:15:30 -04:00
image height calculations were wrong
This commit is contained in:
@@ -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>
|
||||
|
Reference in New Issue
Block a user