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" }}
|
2023-03-18 06:54:27 +00:00
|
|
|
<div class="site__list post__meta" aria-hidden="true">
|
2023-02-27 08:46:11 +00:00
|
|
|
{{- if .PublishDate -}}
|
2023-03-16 10:02:42 +00:00
|
|
|
<span class="post__meta-icon-label">
|
2023-04-03 03:40:24 +00:00
|
|
|
{{ partial "components/heroicon.html" (dict "id" "calendar") }}
|
2023-03-16 10:02:42 +00:00
|
|
|
<time datetime="{{ .PublishDate.Format $RFC3339 }}" title="{{ i18n "published_on" }}">
|
2023-02-27 08:46:11 +00:00
|
|
|
{{ .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") }}
|
2023-03-16 10:02:42 +00:00
|
|
|
<span class="post__meta-icon-label">
|
2023-04-03 05:01:12 +00:00
|
|
|
{{ partial "components/heroicon.html" (dict "id" "arrow-path") }}
|
2023-03-16 10:02:42 +00:00
|
|
|
<time datetime="{{ .Lastmod.Format $RFC3339 }}" title="{{ i18n "updated_on" }}">
|
2023-02-27 08:46:11 +00:00
|
|
|
{{ .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 }}
|
2023-03-16 10:02:42 +00:00
|
|
|
<span class="post__meta-icon-label" data-authors="{{ jsonify $names }}" title="{{ i18n "published_by" }}">
|
2023-04-03 03:40:24 +00:00
|
|
|
{{ partial "components/heroicon.html" (dict "id" "pencil") }}
|
2023-03-16 10:02:42 +00:00
|
|
|
<span>
|
2023-02-27 08:46:11 +00:00
|
|
|
{{ $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 }}
|