blog/layouts/partials/home/custom.html
d3vyce 29a6bd78ff
All checks were successful
Build Blog Docker Image / build docker (push) Successful in 1m16s
fix: .Site.Author deprecation
2024-11-11 18:10:03 +01:00

41 lines
1.4 KiB
HTML

{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
<article class="flex flex-col items-center justify-center text-center">
<header class="flex flex-col items-center mb-3">
{{ with .Site.Params.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ if not $disableImageOptimization }}
{{ $authorImage = $authorImage.Fill "288x288" }}
{{ end }}
<img
class="mb-2 rounded-full h-36 w-36"
width="144"
height="144"
alt="{{ $.Site.Params.Author.name | default "Author" }}"
src="{{ $authorImage.RelPermalink }}"
/>
{{ end }}
{{ end }}
<h1 class="text-4xl font-extrabold">
{{ .Site.Params.Author.name | default .Site.Title }}
</h1>
{{ with .Site.Params.Author.headline }}
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
{{ . | markdownify | emojify }}
</h2>
{{ end }}
<div class="mt-1 text-2xl">
{{ partialCached "author-links.html" . }}
</div>
<div class="mt-5">
<a href="about">
<button class="bg-transparent hover:text-primary-500 prose dark:prose-invert font-semibold hover:text-white py-1 px-4 border border-primary-500 hover:border-transparent rounded">About Me</button>
</a>
</div>
</header>
</article>
<section>
{{ .Content | emojify }}
{{ partial "recent-articles/main.html" . }}
</section>