bloat/templates/status.tmpl

131 lines
4.9 KiB
Cheetah
Raw Normal View History

<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
2019-12-14 12:57:14 +02:00
{{if .Reblog}}
<div class="retweet-info">
2019-12-22 05:43:25 +02:00
<a class="img-link" href="/user/{{.Account.ID}}">
2019-12-22 18:27:49 +02:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
</a>
2019-12-21 07:48:06 +02:00
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
2019-12-14 12:57:14 +02:00
<span class="icon dripicons-retweet retweeted"></span>
retweeted
2019-12-13 20:08:26 +02:00
</div>
2019-12-14 12:57:14 +02:00
{{template "status" .Reblog}}
{{else}}
{{block "status" .}}
<div class="status-container">
2019-12-22 05:43:25 +02:00
{{if not .HideAccountInfo}}
<div class="status-profile-img-container">
<a class="img-link" href="/user/{{.Account.ID}}">
2019-12-22 18:27:49 +02:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
</a>
2019-12-13 20:08:26 +02:00
</div>
2019-12-22 05:43:25 +02:00
{{end}}
2019-12-14 12:57:14 +02:00
<div class="status">
2019-12-19 00:14:02 +02:00
{{if not .HideAccountInfo}}
2019-12-14 12:57:14 +02:00
<div class="status-name">
2019-12-21 07:48:06 +02:00
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
<a href="/user/{{.Account.ID}}" >
<span class="status-uname"> {{.Account.Acct}} </span>
</a>
2019-12-22 05:43:25 +02:00
<a class="status-visibility">
{{if eq .Visibility "public"}}
<span class="icon dripicons-web" title="Public"></span>
{{else if eq .Visibility "unlisted"}}
<span class="icon dripicons-lock-open" title="Unlisted"></span>
{{else if eq .Visibility "private"}}
<span class="icon dripicons-lock" title="Private"></span>
{{else if eq .Visibility "direct"}}
<span class="icon dripicons-mail" title="Direct"></span>
{{end}}
</a>
2019-12-22 05:43:25 +02:00
<a class="remote-link" href="{{.URL}}" target="_blank" title="source">
<span class="icon dripicons-link"></span>
</a>
2019-12-14 12:57:14 +02:00
</div>
2019-12-15 19:37:58 +02:00
{{end}}
2019-12-19 00:14:02 +02:00
<div class="status-reply-container">
{{if .InReplyToID}}
<span class="icon dripicons-forward"></span>
<a class="status-reply-to" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}"> reply to {{.Pleroma.InReplyToAccountAcct}} </a>
{{if index .ReplyMap .ID}} <span class="status-reply-info-divider"> - </span> {{end}}
{{end}}
{{if .ShowReplies}}
{{if index .ReplyMap .ID}} <span class="status-reply-text"> replies: </span> {{end}}
{{range index .ReplyMap .ID}}
<a class="status-reply" href="#status-{{.ID}}">#{{.Number}}</a>
{{end}}
{{end}}
</div>
2019-12-21 09:22:21 +02:00
<div class="status-content"> {{StatusContentFilter .SpoilerText .Content .Emojis .Mentions}} </div>
2019-12-14 12:57:14 +02:00
<div class="status-media-container">
{{range .MediaAttachments}}
{{if eq .Type "image"}}
2019-12-22 05:43:25 +02:00
<a class="img-link" href="{{.URL}}" target="_blank">
2019-12-14 12:57:14 +02:00
<img class="status-image" src="{{.URL}}" alt="status-image" />
2019-12-22 06:25:56 +02:00
{{if $.Sensitive}}
<div class="status-nsfw-overlay"></div>
{{end}}
2019-12-13 20:08:26 +02:00
</a>
2019-12-14 12:57:14 +02:00
{{else if eq .Type "audio"}}
<audio class="status-audio" controls preload="none">
<source src="{{.URL}}">
<p> Your browser doesn't support HTML5 audio </p>
</audio>
{{else if eq .Type "video"}}
2019-12-22 06:25:56 +02:00
<div class="status-video-container">
<video class="status-video" controls preload="none">
<source src="{{.URL}}">
<p> Your browser doesn't support HTML5 video </p>
</video>
{{if $.Sensitive}}
<div class="status-nsfw-overlay"></div>
{{end}}
</div>
2019-12-13 20:08:26 +02:00
{{else}}
2019-12-14 12:57:14 +02:00
<a href="{{.URL}}" target="_blank"> attachment </a>
2019-12-13 20:08:26 +02:00
{{end}}
{{end}}
2019-12-14 12:57:14 +02:00
</div>
<div class="status-action">
2019-12-14 19:48:54 +02:00
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
2019-12-14 12:57:14 +02:00
<span class="icon dripicons-reply"></span>
<span> {{DisplayInteractionCount .RepliesCount}} </span>
</a>
{{if or (eq .Visibility "private") (eq .Visibility "direct")}}
<a class="status-retweet" title="this status cannot be retweeted">
2019-12-14 12:57:14 +02:00
<span class="icon dripicons-retweet"></span>
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
</a>
{{else}}
{{if .Reblogged}}
<a class="status-retweet" href="/unretweet/{{.ID}}" title="undo retweet">
<span class="icon dripicons-retweet retweeted"></span>
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
</a>
{{else}}
<a class="status-retweet" href="/retweet/{{.ID}}" title="retweet">
<span class="icon dripicons-retweet"></span>
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
</a>
{{end}}
2019-12-14 12:57:14 +02:00
{{end}}
{{if .Favourited}}
<a class="status-like" href="/unlike/{{.ID}}" title="unlike">
<span class="icon dripicons-star liked"></span>
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
</a>
{{else}}
<a class="status-like" href="/like/{{.ID}}" title="like">
<span class="icon dripicons-star"></span>
<span> {{DisplayInteractionCount .FavouritesCount}} </span>
</a>
{{end}}
<a class="status-time" href="/thread/{{.ID}}#status-{{.ID}}">
2019-12-14 12:57:14 +02:00
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
</a>
</div>
2019-12-13 20:08:26 +02:00
</div>
</div>
2019-12-14 12:57:14 +02:00
{{end}}
{{end}}
2019-12-13 20:08:26 +02:00
</div>