7
1
mirror of https://gitlab.com/ansol/web-ansol.org.git synced 2024-11-22 22:31:32 +00:00
web-ansol.org/themes/academic/layouts/partials/page_metadata_authors.html
2020-06-11 12:46:16 +01:00

24 lines
893 B
HTML

{{/* 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 -}}