redesign 2023
This commit is contained in:
23
themes/FixIt/layouts/partials/single/post-author.html
Normal file
23
themes/FixIt/layouts/partials/single/post-author.html
Normal file
@ -0,0 +1,23 @@
|
||||
{{- $params := .Scratch.Get "params" -}}
|
||||
{{- $author := .Scratch.Get "author" -}}
|
||||
|
||||
<span class="post-author">
|
||||
{{- $content := $author.name -}}
|
||||
{{- $icon := dict "Class" "fa-solid fa-user-circle" -}}
|
||||
{{- if $author.avatar | and $params.authorAvatar -}}
|
||||
{{- $content = printf "%v %v" (dict "Src" $author.avatar "Class" "avatar" "Alt" $author.name | partial "plugin/image.html") $author.name -}}
|
||||
{{- $icon = "" -}}
|
||||
{{- end -}}
|
||||
{{- if $author.link -}}
|
||||
{{- $options := dict "Class" "author" "Destination" $author.link "Title" (T "single.author") "Rel" "author" "Icon" $icon "Content" $content -}}
|
||||
{{- partial "plugin/link.html" $options -}}
|
||||
{{- else -}}
|
||||
<span class="author">
|
||||
{{- with $icon -}}
|
||||
{{- . | partial "plugin/icon.html" }}
|
||||
{{ end -}}
|
||||
{{- $content | safeHTML -}}
|
||||
</span>
|
||||
{{- end -}}
|
||||
</span>
|
||||
{{- /* EOF */ -}}
|
Reference in New Issue
Block a user