Change homeblob color, smallimg retina fix, and smaller footer icons

This commit is contained in:
Joe Hutchinson
2021-02-02 23:19:47 -05:00
parent ecc2482582
commit 83846edbad
4 changed files with 12 additions and 13 deletions

View File

@@ -3,12 +3,12 @@
<source srcset="{{ replace (.Get "src") (path.Ext (.Get "src")) ".webp" | absURL }}" type="image/webp">
{{- end }}
{{ $image := $.Page.Resources.GetMatch (.Get "src") }}
{{ if or (gt $image.Width 800) (and (isset .Params "width") (gt $image.Width (.Get "width"))) -}}
{{ $.Scratch.Set "imgwidth" "800" }}
{{ if and (isset .Params "width") (lt (.Get "width") 800) -}}
{{ $.Scratch.Set "imgwidth" (trim (.Get "width") "px") }}
{{ if or (gt $image.Width 1600) (and (isset .Params "width") (gt $image.Width (.Get "width"))) -}}
{{ $.Scratch.Set "imgwidth" "1600" }}
{{ if and (isset .Params "width") (lt (.Get "width") 1600) -}}
{{ $.Scratch.Set "imgwidth" (mul (int (trim (.Get "width") "px")) 2) }}
{{- end }}
{{ $resized := $image.Resize (printf "%sx Lanczos" ($.Scratch.Get "imgwidth")) }}
{{ $resized := $image.Resize (printf "%dx Lanczos" ($.Scratch.Get "imgwidth")) }}
<source srcset="{{ $resized.Permalink }}">
<img src="{{ $resized.Permalink }}" class="small-img {{ if isset .Params "smartfloat" -}}
{{- if eq .Params.smartfloat "left" -}}