diff options
Diffstat (limited to 'themes/default/layouts/partials/meta.html')
-rw-r--r-- | themes/default/layouts/partials/meta.html | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/themes/default/layouts/partials/meta.html b/themes/default/layouts/partials/meta.html new file mode 100644 index 0000000..6e10754 --- /dev/null +++ b/themes/default/layouts/partials/meta.html @@ -0,0 +1,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 }} + + <b>{{ partial "author-name.html" . }}</b> + + · {{ partial "handle.html" . }} + + {{ if .Draft }} + · <draft-label><em>Draft</em></draft-label> + {{ end }} + + · {{- partial "read-time.html" . -}} + + · {{- partial "word-count.html" . -}} + + {{ if .Params.Unlisted }} + · <unlisted-entry title="This message is off the record"> + {{ safeHTML (readFile "static/icons/feather/eye-off.svg") }} + <span>unlisted</span></unlisted-entry> + {{ end }} + + · <a href="/{{ $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 | time.Format "Jan 2 2006" }} + </time> + </a> + + {{- if .ExpiryDate -}} + · {{- partial "expiry-date.html" . -}} + {{- end -}} + + · <cite><a title="#{{ partial "card-id.html" . }}" href="#{{ partial "card-id.html" . }}">#id</a></cite> + + {{ if not .ExpiryDate }} + · <cite><a title="/raw/{{ $source }}" href="/raw/{{ $source }}">raw</a></cite> + {{- end -}} +</section> |