Просмотр исходного кода

Fix `ressource.Fit` not resizing the image properly

Co-authored-by: vlebert <vlebert@tactis.fr>
vlebert 3 лет назад
Родитель
Сommit
3421c99ebf

+ 1 - 1
layouts/partials/cards/project.html

@@ -11,7 +11,7 @@
 
             {{ $logoImage:= resources.Get .logo}}
             {{ if $logoImage }}
-            {{ $logoImage := $logoImage.Fit "24x24" }}
+            {{ $logoImage = $logoImage.Fit "24x24" }}
 
             <img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />
             {{ end }}

+ 1 - 1
layouts/partials/cards/skill.html

@@ -7,7 +7,7 @@
 
           {{/*  svg don't support "Fit" operation   */}}
           {{ if ne $logoImage.MediaType.SubType "svg" }}
-            {{ $logoImage := $logoImage.Fit "24x24" }}
+            {{ $logoImage = $logoImage.Fit "24x24" }}
           {{ end }}
 
           <img class="card-img-xs" src="{{ $logoImage.RelPermalink }}" alt="{{ .name }}" />

+ 1 - 1
layouts/partials/helpers/get-author-image.html

@@ -21,7 +21,7 @@
 {{/* apply image processing. don't use "Fit" in svg because its not supported */}}
 {{ $authorImage:= resources.Get $authorImage}}
 {{ if and $authorImage (ne $authorImage.MediaType.SubType "svg") }}
-  {{ $authorImage := $authorImage.Fit "120x120" }}
+  {{ $authorImage = $authorImage.Fit "120x120" }}
 {{ end }}
 
 {{/*  return the author image link  */}}

+ 1 - 1
layouts/partials/sections/home.html

@@ -26,7 +26,7 @@
   {{ $authorImage = $author.image }}
 {{ end }}
 {{ $authorImage := resources.Get $authorImage }}
-{{ $authorImage := $authorImage.Fit "148x148" }}
+{{ $authorImage = $authorImage.Fit "148x148" }}
 
 {{/* get file that matches the filename as specified as src="" in shortcode */}}
 {{ $src := resources.Get $backgroundImage }}