{{ define "main" }} {{ $slug := .Data.Term | urlize }} {{ $profile := partial "functions/get_author_profile" (dict "slug" $slug) }} {{ $avatar := $profile.avatar }} {{ $avatar_shape := site.Params.hugoblox.layout.avatar_shape | default "circle" }}
{{ if $avatar }} {{ if not (reflect.IsImageResourceProcessable $avatar) }} {{ $profile.title }} {{ else }} {{ $responsive := partial "functions/process_responsive_image.html" (dict "image" $avatar "mode" "fill" "aspect_ratio" "1:1" "anchor" "Center" "sizes" (slice 160 240 320 480) ) }} {{ $profile.title }} {{ end }} {{ else }}
{{ partial "functions/get_icon" (dict "name" "hero/user" "attributes" "class=\"h-12 w-12 text-gray-400\"") }}
{{ end }}

{{ $profile.title }}

{{ with $profile.status }} {{ with .icon }} {{ end }} {{ end }}
{{ with $profile.role }}
{{ . | markdownify | emojify }}
{{ end }} {{ with $profile.affiliations }}
{{ range $index, $org := . }} {{ if gt $index 0 }} ยท {{ end }} {{ if $org.url }}{{ $org.name }}{{ else }}{{ $org.name }}{{ end }} {{ end }}
{{ end }} {{ with $profile.bio }}
{{ . | markdownify | emojify }}
{{ end }} {{ if $profile.links }}
{{ partial "social_links" (dict "Params" (dict "profiles" $profile.links)) }}
{{ end }}
{{ $view := "card" }} {{ $block := . }} {{ $paginator := .Paginate .Pages.ByDate.Reverse }} {{ $config := dict "columns" 2 "len" (len $paginator.Pages) "fill_image" true "show_date" true "show_read_time" true "show_read_more" true }}
{{ partial "functions/render_view" (dict "fragment" "start" "page" $block "item" . "view" $view "config" $config) }} {{ range $index, $item := $paginator.Pages }} {{ partial "functions/render_view" (dict "page" . "item" . "view" $view "index" $index "config" $config) }} {{ end }} {{ partial "functions/render_view" (dict "fragment" "end" "page" $block "item" . "view" $view) }} {{ partial "components/paginator" . }}
{{ end }}