aboutsummaryrefslogtreecommitdiff
path: root/themes/default/layouts/partials/meta.html
blob: 608f3dcdf43dfc12c5bae73ac40dc1fcaf7d2178 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{{ $author := index .Site.Data.authors ((or .Params.author .Site.Author.default.user) | default "default") }}
{{ $source := print $author.user "/messages/" .File.LogicalName }}

<micro-thumbnail hidden>
  {{ partial "profile-picture.html" . }}
</micro-thumbnail>

<section>
  {{ if or .Weight .Params.Liked }}
  <anchored-entry>

    {{ if .Weight }}
    <anchored-pinned>
     {{ safeHTML (readFile "static/icons/tabler/pinned.svg") }}
    </anchored-pinned>
     <span>Pinned</span>
   {{ end }}

    {{ if .Params.Liked }}
    <anchored-liked>
     {{ safeHTML (readFile "static/icons/feather/heart.svg") }}
    </anchored-liked>
     <span>Liked</span>
   {{ end }}

  </anchored-entry>
  {{ end }}

  <h2><b>{{ partial "author-name.html" . }}</b></h2>

  &middot; {{ partial "handle.html" . }}

  {{ if .Draft }}
  &middot; <draft-label><em>Draft</em></draft-label>
  {{ end }}

  &middot; {{- partial "read-time.html" . -}}

  &middot; {{- partial "word-count.html" . -}}

  {{ if .Params.Unlisted }}
  &middot; <unlisted-entry title="This message is off the record">
           {{ safeHTML (readFile "static/icons/feather/eye-off.svg") }}
           <span>unlisted</span></unlisted-entry>
  {{ end }}

  &middot; <a href="{{ .Site.BaseURL }}/{{ $author.user }}/messages/{{ path.Base .Permalink }}#{{ partial "card-id.html" . }}">
              <time
                datetime="{{ .Date | time.Format "2006-01-02T15:04:05Z" }}"
                title="{{ .Date | time.Format "Monday, January 2, 2006 at 15:04:05 MST" }}">
                {{ (.Date.Local | time.Format "3:04 PM Jan 2 2006") }}
              </time>
            </a>

  {{- if .ExpiryDate -}}
  &middot; {{- partial "expiry-date.html" . -}}
  {{- end -}}

  &middot; <cite><a title="#{{ partial "card-id.html" . }}" href="#{{ partial "card-id.html" . }}">#id</a></cite>

  {{ if not .ExpiryDate }}
  &middot; <cite><a title="{{ .Site.BaseURL }}/raw/{{ $source }}" href="{{ .Site.BaseURL }}/raw/{{ $source }}">raw</a></cite>
  {{- end -}}
</section>