Whitespace in templates.
This commit is contained in:
parent
a7bfa92312
commit
9bdec6ca76
1 changed files with 30 additions and 26 deletions
|
|
@ -11,7 +11,7 @@
|
|||
{{ $realheight := 0 -}}
|
||||
{{ $resource := false -}}
|
||||
{{ $src := .Destination -}}
|
||||
{{ $srcsetw := (slice) }}
|
||||
{{ $srcsetw := (slice) -}}
|
||||
{{ $static := false -}}
|
||||
|
||||
{{ if and $src (fileExists (path.Join "/static" $src)) -}}
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
{{ $width = $image.Width -}}
|
||||
{{ $height = $image.Height -}}
|
||||
{{ if $srcset -}}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) }}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $src (strings.TrimRight "x" $size)) -}}
|
||||
{{ end -}}
|
||||
{{ else -}}
|
||||
{{ $src = $resource.RelPermalink -}}
|
||||
|
|
@ -48,7 +48,7 @@
|
|||
{{ if $srcset -}}
|
||||
{{ range $set := split $srcset " " -}}
|
||||
{{ $image := $resource.Resize (printf "%sx" $set) -}}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) }}
|
||||
{{ $srcsetw = $srcsetw | append (printf "%s %sw" $image.RelPermalink $set) -}}
|
||||
{{ end }}
|
||||
{{ $width = "" -}}
|
||||
{{ $height = "" -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue