1
Fork 0

Make header images less pixelated

This commit is contained in:
Jake Howard 2020-09-10 09:21:13 +01:00
parent 7f103b00b7
commit ff2e079dbc
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -2,7 +2,7 @@
{{ .Scratch.Set "image" .Params.image }} {{ .Scratch.Set "image" .Params.image }}
{{ if hasPrefix .Params.image "resource:" }} {{ if hasPrefix .Params.image "resource:" }}
{{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }} {{ $resource := .Resources.GetMatch (replace .Params.image "resource:" "") }}
{{ .Scratch.Set "image" ($resource.Resize "1000x").RelPermalink }} {{ .Scratch.Set "image" ($resource.Resize "2000x").RelPermalink }}
{{ end }} {{ end }}
<div class="mb-3 image header-image" data-image='{{ .Scratch.Get "image" }}'></div> <div class="mb-3 image header-image" data-image='{{ .Scratch.Get "image" }}'></div>