mirror of
https://git.freesoftwareextremist.com/bloat
synced 2024-11-10 00:24:12 +00:00
158 lines
6.7 KiB
Cheetah
158 lines
6.7 KiB
Cheetah
{{with .Data}}
|
|
<div id="status-{{.ID}}" class="status-container-container">
|
|
{{if .Reblog}}
|
|
<div class="retweet-info">
|
|
<a class="img-link" href="/user/{{.Account.ID}}">
|
|
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
|
|
</a>
|
|
<span class="status-dname"> {{EmojiFilter .Account.DisplayName .Account.Emojis}} </span>
|
|
<img class="icon" src="{{GetIcon "retweeted" $.Ctx.DarkMode}}" alt="retweeted" />
|
|
retweeted
|
|
</div>
|
|
{{template "status" (WithContext .Reblog $.Ctx)}}
|
|
{{else}}
|
|
{{block "status" (WithContext . $.Ctx)}}
|
|
{{with $s := .Data}}
|
|
<div class="status-container status-{{.ID}}" data-id="{{.ID}}">
|
|
{{if not .HideAccountInfo}}
|
|
<div class="status-profile-img-container">
|
|
<a class="img-link" href="/user/{{.Account.ID}}">
|
|
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="avatar" />
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
<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>
|
|
<a class="status-visibility">
|
|
{{if eq .Visibility "public"}}
|
|
<img class="icon" src="{{GetIcon "globe" $.Ctx.DarkMode}}" alt="Public" title="Public" />
|
|
{{else if eq .Visibility "unlisted"}}
|
|
<img class="icon" src="{{GetIcon "unlock-alt" $.Ctx.DarkMode}}" alt="Unlisted" title="Unlisted" />
|
|
{{else if eq .Visibility "private"}}
|
|
<img class="icon" src="{{GetIcon "lock" $.Ctx.DarkMode}}" alt="Private" title="Private" />
|
|
{{else if eq .Visibility "direct"}}
|
|
<img class="icon" src="{{GetIcon "envelope" $.Ctx.DarkMode}}" alt="Direct" title="Direct" />
|
|
{{end}}
|
|
</a>
|
|
<a class="remote-link" href="{{.URL}}" target="_blank" title="source">
|
|
<img class="icon" src="{{GetIcon "link" $.Ctx.DarkMode}}" alt="source" />
|
|
</a>
|
|
</div>
|
|
{{end}}
|
|
<div class="status-reply-container">
|
|
{{if .InReplyToID}}
|
|
<div class="status-reply-to">
|
|
<a class="status-reply-to-link" href="{{if not .ShowReplies}}/thread/{{.InReplyToID}}{{end}}#status-{{.InReplyToID}}">
|
|
<img class="icon" src="{{GetIcon "mail-forward" $.Ctx.DarkMode}}" alt="reply to" /> reply to {{.Pleroma.InReplyToAccountAcct}}
|
|
</a>
|
|
</div>
|
|
{{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}}
|
|
<div class="status-reply">
|
|
<a class="status-reply-link" href="#status-{{.ID}}">#{{.Number}}</a>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
<div class="status-content"> {{StatusContentFilter .SpoilerText .Content .Emojis .Mentions}} </div>
|
|
<div class="status-media-container">
|
|
{{range .MediaAttachments}}
|
|
{{if eq .Type "image"}}
|
|
<a class="img-link" href="{{.URL}}" target="_blank">
|
|
<img class="status-image" src="{{.URL}}" alt="status-image" />
|
|
{{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
|
|
<div class="status-nsfw-overlay"></div>
|
|
{{end}}
|
|
</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"}}
|
|
<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 (and $.Ctx.MaskNSFW $s.Sensitive)}}
|
|
<div class="status-nsfw-overlay"></div>
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
<a href="{{.URL}}" target="_blank"> attachment </a>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
<div class="status-action-container">
|
|
<div class="status-action">
|
|
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
|
|
<img class="icon" src="{{GetIcon "reply" $.Ctx.DarkMode}}" alt="reply" />
|
|
</a>
|
|
<a class="status-reply-count" href="/thread/{{.ID}}#status-{{.ID}}" {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}>
|
|
{{DisplayInteractionCount .RepliesCount}}
|
|
</a>
|
|
</div>
|
|
<div class="status-action">
|
|
{{if or (eq .Visibility "private") (eq .Visibility "direct")}}
|
|
<a class="status-retweet" title="this status cannot be retweeted">
|
|
<img class="icon" src="{{GetIcon "retweet" $.Ctx.DarkMode}}" alt="retweet" />
|
|
</a>
|
|
{{else}}
|
|
{{if .Reblogged}}
|
|
<form class="status-retweet" data-action="unretweet" action="/unretweet/{{.ID}}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
|
<input type="image" src="{{GetIcon "retweeted" $.Ctx.DarkMode}}" alt="undo retweet" class="icon" title="undo retweet">
|
|
</form>
|
|
{{else}}
|
|
<form class="status-retweet" data-action="retweet" action="/retweet/{{.ID}}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
|
<input type="image" src="{{GetIcon "retweet" $.Ctx.DarkMode}}" alt="retweet" class="icon" title="retweet">
|
|
</form>
|
|
{{end}}
|
|
{{end}}
|
|
<a class="status-retweet-count" href="/retweetedby/{{.ID}}" title="click to see the the list">
|
|
{{DisplayInteractionCount .ReblogsCount}}
|
|
</a>
|
|
</div>
|
|
<div class="status-action">
|
|
{{if .Favourited}}
|
|
<form class="status-like" data-action="unlike" action="/unlike/{{.ID}}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
|
<input type="image" src="{{GetIcon "liked" $.Ctx.DarkMode}}" alt="unlike" class="icon" title="unlike">
|
|
</form>
|
|
{{else}}
|
|
<form class="status-like" data-action="like" action="/like/{{.ID}}" method="post">
|
|
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
|
|
<input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}">
|
|
<input type="image" src="{{GetIcon "star-o" $.Ctx.DarkMode}}" alt="like" class="icon" title="like">
|
|
</form>
|
|
{{end}}
|
|
<a class="status-like-count" href="/likedby/{{.ID}}" title="click to see the the list">
|
|
{{DisplayInteractionCount .FavouritesCount}}
|
|
</a>
|
|
</div>
|
|
<div class="status-action">
|
|
<a class="status-time" href="{{if not .ShowReplies}}/thread/{{.ID}}{{end}}#status-{{.ID}}" {{if $.Ctx.ThreadInNewTab}}target="_blank"{{end}}>
|
|
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{FormatTimeRFC822 .CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|