7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-27 00:07:43 +00:00
web-ansol.org/themes/academic/layouts/partials/page_author.html

21 lines
866 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{/* Author profile box */}}
{{/* Don't show author box on normal pages or if author box disabled. */}}
{{ if ne .Type "page" | and (not (or (eq site.Params.profile false) (eq .Params.profile false))) }}
{{/* Display superuser if superuser exists and page authors are not explicitly specified. */}}
{{/* Otherwise, display first author if a profile for them exists. */}}
{{ $author_urlized := "" }}
{{ if and (not .Params.authors) (.Scratch.Get "superuser_username") }}
{{ $author_urlized = (.Scratch.Get "superuser_username") }}
{{ partial "page_author_card" (dict "username" $author_urlized) }}
{{ else if .Params.authors }}
{{ range $key, $tmp_username := .Params.authors }}
{{ $author_urlized = urlize $tmp_username }}
{{ partial "page_author_card" (dict "username" $author_urlized) }}
{{ end }}
{{ end }}
{{end}}{{/* Show profile block */}}