2022-05-14 22:56:35 -04:00
|
|
|
{{ define "main"}}
|
|
|
|
{{ partial "header.html" . }}
|
|
|
|
<main>
|
2022-05-14 23:27:59 -04:00
|
|
|
<style>main { text-align: left; }</style>
|
2022-05-14 22:56:35 -04:00
|
|
|
{{ partial "search.html" . }}
|
|
|
|
<p>
|
2022-05-14 23:27:59 -04:00
|
|
|
This is an experimental page showing my toots from Mastodon.
|
|
|
|
Currently, this does not support boosts and it does not automatically refresh.
|
|
|
|
Feel free to check out
|
2022-05-14 22:56:35 -04:00
|
|
|
<a href="https://fosstodon.org/@brozek">my profile at Fosstodon</a>
|
|
|
|
</p>
|
|
|
|
{{ $listPageDateFormat := .Site.Params.listPageDateFormat | default "January, 2006"}}
|
|
|
|
{{ range $index, $value := .Pages.GroupByDate $listPageDateFormat }}
|
|
|
|
{{ range .Pages }}
|
|
|
|
<article class="toot h-entry">
|
2022-05-14 23:27:59 -04:00
|
|
|
<div rel="author" class="h-card p-author toot-avatar">
|
|
|
|
<img class="u-photo" width=50 src="{{ .Params.account.avatar }}"/>
|
|
|
|
<span style="display: none;">{{ .Params.account.display_name }}</span>
|
|
|
|
</div>
|
|
|
|
<p class="date">Tooted on <time class="dt-published" datetime='{{ .Date }}'>{{ dateFormat "January 2, 2006 15:04" (time .Date) }}</time></p>
|
|
|
|
<div class="e-content p-name">
|
|
|
|
{{ .Content | safeHTML }}
|
|
|
|
{{ if gt (len .Params.media_attachments) 0 }}
|
|
|
|
<div class="toot-photos">
|
|
|
|
{{ range .Params.media_attachments}}
|
|
|
|
{{ if eq .type "image" }}
|
|
|
|
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
2022-05-14 22:56:35 -04:00
|
|
|
{{ end }}
|
2022-05-14 23:27:59 -04:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2022-05-14 22:56:35 -04:00
|
|
|
</div>
|
2022-05-14 23:27:59 -04:00
|
|
|
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
|
|
|
{{ range .Params.tags }}
|
|
|
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
|
|
|
{{ end }}
|
2022-05-14 22:56:35 -04:00
|
|
|
<div class="toot-social">
|
2022-05-15 22:11:38 -04:00
|
|
|
{{ $post_url := urls.Parse .Params.syndication }}
|
|
|
|
{{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
|
|
|
|
{{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
|
|
|
|
{{ $reply_url := printf "%s?type=reply" $social_url }}
|
|
|
|
{{ $favorite_url := printf "%s?type=favourite" $social_url }}
|
|
|
|
{{ $boost_url := printf "%s?type=reblog" $social_url }}
|
|
|
|
<span>
|
|
|
|
<a class='fas fa-share' href="{{ $reply_url }}"></a>
|
|
|
|
{{ .Params.replies_count }}
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<a class='fas fa-retweet' href="{{ $boost_url }}"></a>
|
|
|
|
{{ .Params.reblogs_count }}
|
|
|
|
</span>
|
|
|
|
<span>
|
|
|
|
<a class='fas fa-star' href="{{ $favorite_url }}"></a>
|
|
|
|
{{ .Params.favourites_count }}
|
|
|
|
</span>
|
2022-05-14 23:27:59 -04:00
|
|
|
<span>| Source: <a class="u-syndication" href="{{ .Params.syndication }}">{{ .Params.syndication }}</a></span>
|
2022-05-14 22:56:35 -04:00
|
|
|
</div>
|
2022-05-14 23:27:59 -04:00
|
|
|
</article>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-05-14 22:56:35 -04:00
|
|
|
</main>
|
|
|
|
{{ partial "footer.html" . }}
|
|
|
|
{{ end }}
|