hugo-theme/layouts/partials/block/author.html

24 lines
633 B
HTML
Raw Normal View History

2024-10-21 21:29:11 +02:00
{{ $showAuthor := (.Params.showAuthor) | default .Site.Params.showAuthor }}
{{- if $showAuthor -}}
2024-10-21 13:47:30 +02:00
{{- $author := "" -}}
{{- if .Params.author -}}
{{- $author = .Params.author -}}
{{- else if and .Site.Params.Author .Site.Params.Author.name -}}
{{- $author = .Site.Params.Author.name -}}
{{- end -}}
{{- if $author -}}
<div class="flex flex-col gap-y-1 md:flex-row md:gap-y-0 md:gap-x-4 text-slate-500 dark:text-slate-300">
<div class="flex flex-row text-base gap-x-1">
<i class="h-6 w-6 flex-none">
{{ partial "icon.html" "user" }}
</i>
<span>{{ $author }}</span>
</div>
</div>
{{- end -}}
{{- end -}}