mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2024-11-09 10:50:34 -05:00
Added links to social buttons on toots
This commit is contained in:
parent
69eb301405
commit
0cefeeb270
5 changed files with 181 additions and 85 deletions
|
@ -6,26 +6,48 @@
|
||||||
{{ with $dataJ }}
|
{{ with $dataJ }}
|
||||||
{{ if ne .content "" }}
|
{{ if ne .content "" }}
|
||||||
<article class="toot h-entry">
|
<article class="toot h-entry">
|
||||||
<div class="e-content">
|
<div rel="author" class="h-card p-author toot-avatar">
|
||||||
<img class="toot-avatar" width=50 src="{{ .account.avatar }}"/>
|
<img class="u-photo" width=50 src="{{ .account.avatar }}"/>
|
||||||
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
<span style="display: none;">{{ .account.display_name }}</span>
|
||||||
{{ .content | safeHTML }}
|
|
||||||
{{ if gt (len .media_attachments) 0 }}
|
|
||||||
<div class="toot-photos">
|
|
||||||
{{ range .media_attachments}}
|
|
||||||
{{ if eq .type "image" }}
|
|
||||||
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
||||||
|
<div class="e-content p-name">
|
||||||
|
{{ .content | safeHTML }}
|
||||||
|
{{ if gt (len .media_attachments) 0 }}
|
||||||
|
<div class="toot-photos">
|
||||||
|
{{ range .media_attachments}}
|
||||||
|
{{ if eq .type "image" }}
|
||||||
|
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
||||||
|
{{ range .tags }}
|
||||||
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
||||||
|
{{ end }}
|
||||||
<div class="toot-social">
|
<div class="toot-social">
|
||||||
<span><i class='fas fa-share'></i> {{ .replies_count }} </span>
|
{{ $post_url := urls.Parse .url }}
|
||||||
<span><i class='fas fa-retweet'></i> {{ .reblogs_count }} </span>
|
{{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
|
||||||
<span><i class='fas fa-star'></i> {{ .favourites_count }} </span>
|
{{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
|
||||||
<span>| Source: <a href="{{ .url }}">{{ .url }}</a></span>
|
{{ $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>
|
||||||
|
<span>| Source: <a class="u-syndication" href="{{ .url }}">{{ .url }}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -5,26 +5,48 @@
|
||||||
{{ with $dataJ }}
|
{{ with $dataJ }}
|
||||||
{{ if ne .content "" }}
|
{{ if ne .content "" }}
|
||||||
<article class="toot h-entry">
|
<article class="toot h-entry">
|
||||||
<div class="e-content">
|
<div rel="author" class="h-card p-author toot-avatar">
|
||||||
<img class="toot-avatar" width=50 src="{{ .account.avatar }}"/>
|
<img class="u-photo" width=50 src="{{ .account.avatar }}"/>
|
||||||
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
<span style="display: none;">{{ .account.display_name }}</span>
|
||||||
{{ .content | safeHTML }}
|
|
||||||
{{ if gt (len .media_attachments) 0 }}
|
|
||||||
<div class="toot-photos">
|
|
||||||
{{ range .media_attachments}}
|
|
||||||
{{ if eq .type "image" }}
|
|
||||||
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
||||||
|
<div class="e-content p-name">
|
||||||
|
{{ .content | safeHTML }}
|
||||||
|
{{ if gt (len .media_attachments) 0 }}
|
||||||
|
<div class="toot-photos">
|
||||||
|
{{ range .media_attachments}}
|
||||||
|
{{ if eq .type "image" }}
|
||||||
|
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
||||||
|
{{ range .tags }}
|
||||||
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
||||||
|
{{ end }}
|
||||||
<div class="toot-social">
|
<div class="toot-social">
|
||||||
<span><i class='fas fa-share'></i> {{ .replies_count }} </span>
|
{{ $post_url := urls.Parse .url }}
|
||||||
<span><i class='fas fa-retweet'></i> {{ .reblogs_count }} </span>
|
{{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
|
||||||
<span><i class='fas fa-star'></i> {{ .favourites_count }} </span>
|
{{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
|
||||||
<span>| Source: <a href="{{ .url }}">{{ .url }}</a></span>
|
{{ $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>
|
||||||
|
<span>| Source: <a class="u-syndication" href="{{ .url }}">{{ .url }}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -5,26 +5,48 @@
|
||||||
{{ range sort $dataJ "created_at" "desc" }}
|
{{ range sort $dataJ "created_at" "desc" }}
|
||||||
{{ if ne .content "" }}
|
{{ if ne .content "" }}
|
||||||
<article class="toot h-entry">
|
<article class="toot h-entry">
|
||||||
<div class="e-content">
|
<div rel="author" class="h-card p-author toot-avatar">
|
||||||
<img class="toot-avatar" width=50 src="{{ .account.avatar }}"/>
|
<img class="u-photo" width=50 src="{{ .account.avatar }}"/>
|
||||||
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
<span style="display: none;">{{ .account.display_name }}</span>
|
||||||
{{ .content | safeHTML }}
|
|
||||||
{{ if gt (len .media_attachments) 0 }}
|
|
||||||
<div class="toot-photos">
|
|
||||||
{{ range .media_attachments}}
|
|
||||||
{{ if eq .type "image" }}
|
|
||||||
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
</div>
|
||||||
|
<p class="date">Tooted on <time class="dt-published" datetime='{{ .created_at }}'>{{ dateFormat "January 2, 2006 15:04" (time .created_at) }}</time></p>
|
||||||
|
<div class="e-content p-name">
|
||||||
|
{{ .content | safeHTML }}
|
||||||
|
{{ if gt (len .media_attachments) 0 }}
|
||||||
|
<div class="toot-photos">
|
||||||
|
{{ range .media_attachments}}
|
||||||
|
{{ if eq .type "image" }}
|
||||||
|
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
||||||
|
{{ range .tags }}
|
||||||
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
||||||
|
{{ end }}
|
||||||
<div class="toot-social">
|
<div class="toot-social">
|
||||||
<span><i class='fas fa-share'></i> {{ .replies_count }} </span>
|
{{ $post_url := urls.Parse .url }}
|
||||||
<span><i class='fas fa-retweet'></i> {{ .reblogs_count }} </span>
|
{{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
|
||||||
<span><i class='fas fa-star'></i> {{ .favourites_count }} </span>
|
{{ $social_url := printf "%s://%s/interact/%s" $post_url.Scheme $post_url.Host $status_id }}
|
||||||
<span>| Source: <a href="{{ .url }}">{{ .url }}</a></span>
|
{{ $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>
|
||||||
|
<span>| Source: <a class="u-syndication" href="{{ .url }}">{{ .url }}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -35,9 +35,24 @@
|
||||||
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="toot-social">
|
<div class="toot-social">
|
||||||
<span><i class='fas fa-share'></i> {{ .Params.replies_count }} </span>
|
{{ $post_url := urls.Parse .Params.syndication }}
|
||||||
<span><i class='fas fa-retweet'></i> {{ .Params.reblogs_count }} </span>
|
{{ $status_id := index (last 1 (split $post_url.Path "/")) 0 }}
|
||||||
<span><i class='fas fa-star'></i> {{ .Params.favourites_count }} </span>
|
{{ $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>
|
||||||
<span>| Source: <a class="u-syndication" href="{{ .Params.syndication }}">{{ .Params.syndication }}</a></span>
|
<span>| Source: <a class="u-syndication" href="{{ .Params.syndication }}">{{ .Params.syndication }}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
@ -4,35 +4,50 @@
|
||||||
{{ .Scratch.Set "customTitleHeaderLink" "/toots" }}
|
{{ .Scratch.Set "customTitleHeaderLink" "/toots" }}
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
<main>
|
<main>
|
||||||
<article class="toot h-entry">
|
<article class="toot h-entry">
|
||||||
<div rel="author" class="h-card p-author toot-avatar">
|
<div rel="author" class="h-card p-author toot-avatar">
|
||||||
<img class="u-photo" width=50 src="{{ .Params.account.avatar }}"/>
|
<img class="u-photo" width=50 src="{{ .Params.account.avatar }}"/>
|
||||||
<span style="display: none;">{{ .Params.account.display_name }}</span>
|
<span style="display: none;">{{ .Params.account.display_name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<p class="date">Tooted on <time class="dt-published" datetime='{{ .Date }}'>{{ dateFormat "January 2, 2006 15:04" (time .Date) }}</time></p>
|
<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">
|
<div class="e-content p-name">
|
||||||
{{ .Content | safeHTML }}
|
{{ .Content | safeHTML }}
|
||||||
{{ if gt (len .Params.media_attachments) 0 }}
|
{{ if gt (len .Params.media_attachments) 0 }}
|
||||||
<div class="toot-photos">
|
<div class="toot-photos">
|
||||||
{{ range .Params.media_attachments}}
|
{{ range .Params.media_attachments}}
|
||||||
{{ if eq .type "image" }}
|
{{ if eq .type "image" }}
|
||||||
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
<img src="{{ .preview_url }}" alt="{{ .description }}"/>
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
</div>
|
|
||||||
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
|
||||||
{{ range .Params.tags }}
|
|
||||||
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<div class="toot-social">
|
{{ end }}
|
||||||
<span><i class='fas fa-share'></i> {{ .Params.replies_count }} </span>
|
</div>
|
||||||
<span><i class='fas fa-retweet'></i> {{ .Params.reblogs_count }} </span>
|
{{ end }}
|
||||||
<span><i class='fas fa-star'></i> {{ .Params.favourites_count }} </span>
|
</div>
|
||||||
<span>| Source: <a class="u-syndication" href="{{ .Params.syndication }}">{{ .Params.syndication }}</a></span>
|
<a class="u-url" style="display: none">{{ .Permalink }}</a>
|
||||||
</div>
|
{{ range .Params.tags }}
|
||||||
</article>
|
<a class="p-category" href="{{ .url }}" style="display: none;">{{ .name }}</a>
|
||||||
|
{{ end }}
|
||||||
|
<div class="toot-social">
|
||||||
|
{{ $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>
|
||||||
|
<span>| Source: <a class="u-syndication" href="{{ .Params.syndication }}">{{ .Params.syndication }}</a></span>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
</main>
|
</main>
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in a new issue