2022-04-30 07:46:47 +00:00
|
|
|
{{- /*
|
|
|
|
The component where it will display the metadata of the post.
|
|
|
|
*/ -}}
|
2023-02-27 08:46:11 +00:00
|
|
|
{{- if or .PublishDate .Lastmod }}
|
|
|
|
{{- $RFC3339 := "2006-01-02T15:04:05Z07:00" }}
|
|
|
|
<div class="list post__meta" aria-hidden="true">
|
|
|
|
{{- if .PublishDate -}}
|
|
|
|
<span>
|
|
|
|
{{ partial "components/heroicon.html" "calendar" }}
|
|
|
|
<time datetime="{{ .PublishDate.Format $RFC3339 }}" title="{{ i18n "published_on" }}" style="margin-left: 0.5em;">
|
|
|
|
{{ .PublishDate.Format "2006-01-02" }}
|
|
|
|
</time>
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
2022-04-30 07:46:47 +00:00
|
|
|
|
2023-02-27 08:46:11 +00:00
|
|
|
{{- if ne (.PublishDate.Format "2006-01-02") (.Lastmod.Format "2006-01-02") }}
|
|
|
|
<span>
|
|
|
|
{{ partial "components/heroicon.html" "arrow-path" }}
|
|
|
|
<time datetime="{{ .Lastmod.Format $RFC3339 }}" title="{{ i18n "updated_on" }}" style="margin-left: 0.5em;">
|
|
|
|
{{ .Lastmod.Format "2006-01-02" }}
|
|
|
|
</time>
|
|
|
|
</span>
|
|
|
|
{{- end }}
|
2022-04-30 07:46:47 +00:00
|
|
|
|
2023-02-27 08:46:11 +00:00
|
|
|
{{- /* The authors are appended with 'et al' if there's more than one author in the map. */ -}}
|
|
|
|
{{- with .Params.author }}
|
|
|
|
{{- $names := slice }}
|
|
|
|
{{- range . }}{{ $names = $names | append .name }}{{ end }}
|
|
|
|
{{- $author := index (first 1 $names) 0 }}
|
|
|
|
<span data-authors="{{ jsonify $names }}" title="{{ i18n "published_by" }}">
|
|
|
|
{{ partial "components/heroicon.html" "pencil" }}
|
|
|
|
<span style="margin-left: 0.5em;">
|
|
|
|
{{ $author }}{{ if ge (len .) 2 }}, et al.{{ end }}
|
|
|
|
</span>
|
2022-04-30 07:46:47 +00:00
|
|
|
</span>
|
2023-02-27 08:46:11 +00:00
|
|
|
{{- end }}
|
|
|
|
</div>
|
|
|
|
{{- end }}
|