{{- $authors := .Authors -}}
{{- $pageContext := .Context -}}
{{- $modified := partial "function-page-modified.html"
(dict
"Context" $pageContext
)
-}}
{{- if $modified -}}
{{- range $author := $authors -}}
{{- $recent := where $pageContext.Site.RegularPages.ByDate.Reverse "Section" $author -}}
{{- $recent = where $recent "Params.feed" "eq" nil -}}
{{- $data := index $pageContext.Site.Data.authors $author -}}
{{- $date := or (index (first 1 ($recent)) 0).Date 0 -}}
{{- $width := "" -}}
{{- $height := "" -}}
{{- with $metadata := resources.Get (print "public/" $data.user "/author.json") -}}
{{- with $content := $metadata.Content -}}
{{- $metadata = $content | transform.Unmarshal -}}
{{- $width = $metadata.picture.profileWidth -}}
{{- $height = $metadata.picture.profileHeight -}}
{{- end -}}
{{- end -}}
{{- partial "author-card.html" (dict
"Date" ($date)
"Title" ($data.name)
"Name" ($data.name)
"Author" ($data.user)
"Href" ($data.user | relURL)
"HrefTitle" ($data.user | relURL)
"FeedTitle" ("Read with Feed Reader")
"DateTime" ($date | time.Format "2006-01-02T15:04:05Z")
"DateTitle" ($date | time.Format "Monday January 2 2006 at 15:04:05 MST")
"Description" ($data.description | markdownify | plainify | htmlUnescape | truncate 60 "...")
"Expired" (or (not (path.Ext $data.picture.profile)) (not (fileExists (print "public/" (partial "function-paths.html").media "/" $data.user))))
"SourceSet" (print (partial "function-paths.html").media "/" $data.user "/" $data.user "-profile.webp" | relURL)
"Source" (print (partial "function-paths.html").media "/" $data.user "/" $data.user "-profile" (path.Ext $data.picture.profile) | relURL)
)
-}}
{{- end -}}
{{- end -}}