congo/layouts/partials/author.html

28 lines
1.3 KiB
HTML

{{ if .Params.showAuthor | default (.Site.Params.article.showAuthor | default true) }}
<div class="flex">
{{ $lazy := .Params.enableImageLazyLoading|default .Site.Params.enableImageLazyLoading | default true }}
{{ $altText := ($.Site.Language.Params.Author.name | default "Author") }}
{{ with .Site.Language.Params.Author.image }}
{{ $authorImage := resources.Get . }}
{{ if $authorImage }}
{{ $imgClass := "!mb-0 !mt-0 me-4 w-24 h-auto rounded-full" }}
{{ partial "picture.html" (dict "img" $authorImage "alt" $altText "class" $imgClass "lazy" $lazy ) }}
{{ end }}
{{ end }}
<div class="place-self-center">
{{ with .Site.Language.Params.Author.name | markdownify | emojify }}
<div class="text-[0.6rem] uppercase leading-3 text-neutral-500 dark:text-neutral-400">
{{ i18n "author.byline_title" | markdownify | emojify }}
</div>
<div class="font-semibold leading-6 text-neutral-800 dark:text-neutral-300">
{{ . }}
</div>
{{ end }}
{{ with .Site.Language.Params.Author.bio | markdownify | emojify }}
<div class="text-sm text-neutral-700 dark:text-neutral-400">{{ . }}</div>
{{ end }}
<div class="text-2xl sm:text-lg">{{ partialCached "author-links.html" . }}</div>
</div>
</div>
{{ end }}