🚚 Move author image to assets

This commit is contained in:
James Panther
2022-01-11 12:29:21 +11:00
parent 6eab5f95fb
commit 1b9b660abe
6 changed files with 25 additions and 9 deletions
+11 -7
View File
@@ -1,13 +1,17 @@
{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex">
{{ with .Site.Author.image }}
<img
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full"
width="96"
height="96"
alt="Author"
src="{{ . | relURL }}"
/>
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "192x192" }}
<img
class="w-24 h-24 !mt-0 !mb-0 mr-4 rounded-full"
width="96"
height="96"
alt="Author"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<div class="place-self-center">
{{ with .Site.Author.name | markdownify | emojify }}