🚚 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 }}
+11 -1
View File
@@ -5,7 +5,17 @@
>
<header class="flex flex-col items-center mb-3">
{{ with .Site.Author.image }}
<img class="mb-2 rounded-full w-36 h-36" alt="Author" src="{{ . | relURL }}" />
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $authorImage := $authorImage.Fill "288x288" }}
<img
class="mb-2 rounded-full w-36 h-36"
width="144"
height="144"
alt="Author"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Author.name | default .Site.Title }}