diff options
Diffstat (limited to 'themes/default/layouts/partials/author-card.html')
-rw-r--r-- | themes/default/layouts/partials/author-card.html | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/author-card.html b/themes/default/layouts/partials/author-card.html index 2897e62..243d360 100644 --- a/themes/default/layouts/partials/author-card.html +++ b/themes/default/layouts/partials/author-card.html @@ -1,4 +1,5 @@ {{- $metadata := print "public/" .Data.user "/author.json" -}} +{{- $date := .Date.Local.Format "3:04 PM Jan 2 2006" -}} {{- $host := (urls.Parse ("" | absURL)).Host -}} @@ -26,6 +27,10 @@ {{- $sourceset = "" -}} {{- end -}} +{{- if not .Date -}} + {{- $date = "Inactive" -}} +{{- end -}} + <micro-author> <micro-card> <micro-summary> @@ -37,8 +42,8 @@ <source srcset="{{ $sourceset }}" type="image/webp" /> {{- end -}} <img - width="{{ $width }}" - height="{{ $height }}" + width="{{ or $width "64" }}" + height="{{ or $height "64" }}" src="{{ $source }}" alt="{{ $alternate }}" /> @@ -51,8 +56,16 @@ <b>{{ .Data.name }}</b> </h2> <h3> - <a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#">{{ .Data.user }}@{{ $host }}</a> + <a title="{{ .Data.name }}" href="{{ "" | absURL }}/{{ .Data.user }}/#"> + {{ .Data.user }}@{{ $host }} + </a> </h3> + <time + title="{{ .Date.Format "Monday, January 2 2006 at 15:04:05 MST" }}" + datetime="{{ .Date.Format "2006-01-02T15:04:05Z" }}" + > + {{ $date }} + </time> </micro-header> <p>{{ .Data.description | markdownify | plainify | htmlUnescape | truncate 60 "..." }}</p> <a title="Follow with RSS Reader" href="{{ "" | absURL }}/{{ .Data.user }}/rss.xml"> |