diff options
author | tdro <tdro@noreply.example.com> | 2022-05-26 19:00:56 -0400 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-05-26 19:00:56 -0400 |
commit | c424664740830fda3aa7cccaf2b44d6e4c2405f6 (patch) | |
tree | e842b2bf5817790e4ee3232e40cd251e07578c4d /themes/default/layouts/partials/author-picture.html | |
parent | 3d8a3b0f52a55e706187b83dafa292999fec8295 (diff) | |
download | canory-c424664740830fda3aa7cccaf2b44d6e4c2405f6.tar.gz canory-c424664740830fda3aa7cccaf2b44d6e4c2405f6.tar.bz2 canory-c424664740830fda3aa7cccaf2b44d6e4c2405f6.zip |
themes/default/layouts/partials/feeds-generate: Generate thumbnails
Diffstat (limited to 'themes/default/layouts/partials/author-picture.html')
-rw-r--r-- | themes/default/layouts/partials/author-picture.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/author-picture.html b/themes/default/layouts/partials/author-picture.html index b8e5489..326708a 100644 --- a/themes/default/layouts/partials/author-picture.html +++ b/themes/default/layouts/partials/author-picture.html @@ -1,10 +1,24 @@ {{- $file := "/profile/picture.png" -}} {{- $image := imageConfig (print "content/" (partial "author-media-path.html" .) $file) -}} +{{- with .Params.feed -}} +{{ else }} +<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png" type="image/png" /> +<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.jpg" type="image/jpeg" /> +<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.webp" type="image/webp" /> +{{ end }} + <img loading="lazy" + {{- with .Params.feed -}} + width="64" + height="64" + alt="{{ .name }}" + src="{{ $.Site.BaseURL }}{{ .image }}" + {{ else }} width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{ partial "author-name.html" . }}" src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}{{ $file }}" + {{ end }} /> |