Whitespace in templates.
This commit is contained in:
parent
a7bfa92312
commit
9bdec6ca76
3 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 = "" -}}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
{{ with .OutputFormats.Get "RSS" -}}
|
||||
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
|
||||
{{ end -}}
|
||||
{{ range $pages }}
|
||||
{{ range $pages -}}
|
||||
<item>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
|
|
@ -41,6 +41,6 @@
|
|||
<guid>{{ .Permalink }}</guid>
|
||||
<description>{{ .Content | html }}</description>
|
||||
</item>
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
</channel>
|
||||
</rss>
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
{{ end -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue