aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta-date-time.html
blob: f1e49d011b9b5a40137d62ceb0a714c985fdd921 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<micro-metadata-datetime>
  {{- $author := index .Site.Data ((or .Params.author .Site.Author.default.user) | default "default") -}}
  {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/calendar.svg")) -}}

  {{- with .Params.feed.self -}}
  <a href="{{ $.Site.BaseURL }}/{{ . }}">
  {{ else }}
  <a href="{{ .Site.BaseURL }}/{{ $author.user }}/messages/{{ path.Base .Permalink }}/#{{ partial "card-id.html" . }}">
  {{ end }}
    <time
      datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}"
      title="{{ .Date | time.Format "Posted: Monday, January 2, 2006 at 15:04:05 MST" }}
{{ if .Lastmod.After .Date }}{{ .Lastmod | time.Format "Edited: Monday, January 2, 2006 at 15:04:05 MST" }}{{ end }}">
      {{ (.Date.Local | time.Format "3:04 PM Jan 2 2006") -}}
    </time>
    {{ if .Lastmod.After .Date }}
      <span>(edited)</span>
    {{- end -}}
{{- /* This comment removes trailing newlines and white spaces. */ -}}
  </a>
{{- /* This comment removes trailing newlines and white spaces. */ -}}
</micro-metadata-datetime>
{{- /* This comment removes trailing newlines and white spaces. */ -}}