From c256179803136f0e02d8c329e2a1c110781bcdbe Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Thu, 6 Apr 2023 08:42:09 -0700 Subject: [PATCH] Expand the width and heigh argument checks They are more readable when they are not squashed on one line. --- layouts/partials/photos/thumbnail.html | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/layouts/partials/photos/thumbnail.html b/layouts/partials/photos/thumbnail.html index 12f8224..dbd9e1f 100644 --- a/layouts/partials/photos/thumbnail.html +++ b/layouts/partials/photos/thumbnail.html @@ -9,9 +9,18 @@ {{ $orientation := partial "images/orientation_angle.html" $thumbnailResource }} {{ $targetWidth := 0 }} -{{ if isset . "Width" }}{{ $targetWidth = .Width }}{{ else }}{{ $targetWidth = $thumbnailResource.Width }}{{ end }} +{{ if isset . "Width" }} + {{ $targetWidth = .Width }} +{{ else }} + {{ $targetWidth = $thumbnailResource.Width }} +{{ end }} + {{ $targetHeight := 0 }} -{{ if isset . "Height" }}{{ $targetHeight = .Height }}{{ else }}{{ $targetHeight = $thumbnailResource.Height }}{{ end }} +{{ if isset . "Height" }} + {{ $targetHeight = .Height }} +{{ else }} + {{ $targetHeight = $thumbnailResource.Height }} +{{ end }} {{ $thumbnail := false }} {{ if not (and (eq $orientation 0)