7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-10-19 06:23:05 +00:00
web-ansol.org/themes/academic/layouts/partials/page_metadata_authors.html

24 lines
893 B
HTML
Raw Normal View History

2020-06-11 11:46:16 +00:00
{{/* Display author list. */}}
{{- $taxonomy := "authors" }}
{{ with .Param $taxonomy }}
{{ $link_authors := site.Params.link_authors | default true }}
{{ range $index, $name_raw := . }}
{{- $profile_page := site.GetPage (printf "/%s/%s" $taxonomy .) -}}
{{- $name := $profile_page.Title | default $name_raw -}}
{{- if gt $index 0 }}, {{ end -}}
<span {{ if site.Params.highlight_superuser | and (eq $profile_page.Params.superuser true) }}class="font-weight-bold"{{end}}>
{{- if and $profile_page $link_authors -}}
<a href="{{$profile_page.RelPermalink}}">{{$name}}</a>
{{- else -}}
{{$name}}
{{- end -}}
</span>
{{- if isset $.Params "author_notes" -}}
{{- with (index $.Params.author_notes $index) -}}
<span title="{{.}}" class="author-notes">(?)</span>
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}