bloat/templates/status.tmpl

102 lines
3.7 KiB
Cheetah

<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
{{if .Reblog}}
<div class="retweet-info">
<a href="/user/{{.Account.ID}}" >
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
</a>
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
<span class="icon dripicons-retweet retweeted"></span>
retweeted
</div>
{{template "status" .Reblog}}
{{else}}
{{block "status" .}}
<div class="status-container">
<div>
{{if not .HideAccountInfo}}
<a href="/user/{{.Account.ID}}" >
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
</a>
{{end}}
</div>
<div class="status">
{{if not .HideAccountInfo}}
<div class="status-name">
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
<a href="/user/{{.Account.ID}}" >
<span class="status-uname"> {{.Account.Acct}} </span>
</a>
</div>
{{end}}
<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>
<div class="status-content"> {{StatusContentFilter .Content .Emojis .Mentions}} </div>
<div class="status-media-container">
{{range .MediaAttachments}}
{{if eq .Type "image"}}
<a href="{{.URL}}" target="_blank">
<img class="status-image" src="{{.URL}}" alt="status-image" />
</a>
{{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"}}
<video class="status-video" controls preload="none">
<source src="{{.URL}}">
<p> Your browser doesn't support HTML5 video </p>
</video>
{{else}}
<a href="{{.URL}}" target="_blank"> attachment </a>
{{end}}
{{end}}
</div>
<div class="status-action">
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
<span class="icon dripicons-reply"></span>
<span> {{DisplayInteractionCount .RepliesCount}} </span>
</a>
{{if .Reblogged}}
<a class="status-retweet" href="/unretweet/{{.ID}}" title="undo repost">
<span class="icon dripicons-retweet retweeted"></span>
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
</a>
{{else}}
<a class="status-retweet" href="/retweet/{{.ID}}" title="repost">
<span class="icon dripicons-retweet"></span>
<span> {{DisplayInteractionCount .ReblogsCount}} </span>
</a>
{{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}}">
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
</a>
</div>
</div>
</div>
{{end}}
{{end}}
</div>