Expand the width and heigh argument checks
They are more readable when they are not squashed on one line.
This commit is contained in:
parent
84bf9b3a32
commit
c256179803
1 changed files with 11 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue