Skip to content

Commit

Permalink
Merge pull request #942 from gethinode/image
Browse files Browse the repository at this point in the history
Fix conversion of image dimensions
  • Loading branch information
markdumay authored May 20, 2024
2 parents ed6c415 + cba7768 commit 0660a4c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/assets/helpers/image-definition.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

{{ $widths := partial "assets/helpers/GetDimension.html" (dict "ratio" "auto") }}
{{ range $width := $widths -}}
{{- $dims = $dims | append (printf "%sx%d" $width (int (math.Round (mul (div (float $width) $img.Width) $img.Height)))) -}}
{{- $dims = $dims | append (printf "%dx%d" (int $width) (int (math.Round (mul (div (float $width) $img.Width) $img.Height)))) -}}
{{- end -}}
{{ end }}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gethinode/hinode",
"version": "0.24.0-alpha",
"version": "0.24.0-alpha2",
"description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator",
"keywords": [
"hugo",
Expand Down

0 comments on commit 0660a4c

Please sign in to comment.