Fix ressource.Fit
not resizing the image properly
Co-authored-by: vlebert <vlebert@tactis.fr>
This commit is contained in:
parent
b5fe77f876
commit
3421c99ebf
4 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
{{ $logoImage:= resources.Get .logo}}
|
{{ $logoImage:= resources.Get .logo}}
|
||||||
{{ if $logoImage }}
|
{{ if $logoImage }}
|
||||||
{{ $logoImage := $logoImage.Fit "24x24" }}
|
{{ $logoImage = $logoImage.Fit "24x24" }}
|
||||||
|
|
||||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
{{/* svg don't support "Fit" operation */}}
|
{{/* svg don't support "Fit" operation */}}
|
||||||
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
{{ if ne $logoImage.MediaType.SubType "svg" }}
|
||||||
{{ $logoImage := $logoImage.Fit "24x24" }}
|
{{ $logoImage = $logoImage.Fit "24x24" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
<img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
{{/* apply image processing. don't use "Fit" in svg because its not supported */}}
|
{{/* apply image processing. don't use "Fit" in svg because its not supported */}}
|
||||||
{{ $authorImage:= resources.Get $authorImage}}
|
{{ $authorImage:= resources.Get $authorImage}}
|
||||||
{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }}
|
{{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }}
|
||||||
{{ $authorImage := $authorImage.Fit "120x120" }}
|
{{ $authorImage = $authorImage.Fit "120x120" }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{/* return the author image link */}}
|
{{/* return the author image link */}}
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
{{ $authorImage = $author.image }}
|
{{ $authorImage = $author.image }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ $authorImage := resources.Get $authorImage }}
|
{{ $authorImage := resources.Get $authorImage }}
|
||||||
{{ $authorImage := $authorImage.Fit "148x148" }}
|
{{ $authorImage = $authorImage.Fit "148x148" }}
|
||||||
|
|
||||||
{{/* get file that matches the filename as specified as src="" in shortcode */}}
|
{{/* get file that matches the filename as specified as src="" in shortcode */}}
|
||||||
{{ $src := resources.Get $backgroundImage }}
|
{{ $src := resources.Get $backgroundImage }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue