bloat/templates/status.tmpl

83 lines
2.9 KiB
Cheetah
Raw Normal View History

<div id="status-{{if .Reblog}}{{.Reblog.ID}}{{else}}{{.ID}}{{end}}" class="status-container-container">
2019-12-14 10:57:14 +00:00
{{if .Reblog}}
<div class="retweet-info">
2019-12-13 18:08:26 +00:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
2019-12-14 10:57:14 +00:00
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
<span class="icon dripicons-retweet retweeted"></span>
retweeted
2019-12-13 18:08:26 +00:00
</div>
2019-12-14 10:57:14 +00:00
{{template "status" .Reblog}}
{{else}}
{{block "status" .}}
<div class="status-container">
<div>
2019-12-15 17:37:58 +00:00
{{if ne .Account.ID ""}}
2019-12-14 10:57:14 +00:00
<img class="status-profile-img" src="{{.Account.AvatarStatic}}" alt="profile-avatar" />
2019-12-15 17:37:58 +00:00
{{end}}
2019-12-13 18:08:26 +00:00
</div>
2019-12-14 10:57:14 +00:00
<div class="status">
2019-12-15 17:37:58 +00:00
{{if ne .Account.ID ""}}
2019-12-14 10:57:14 +00:00
<div class="status-name">
<span class="status-dname"> {{WithEmojis .Account.DisplayName .Account.Emojis}} </span>
<span class="status-uname"> {{.Account.Acct}} </span>
</div>
2019-12-15 17:37:58 +00:00
{{end}}
2019-12-14 10:57:14 +00:00
<div class="status-content"> {{WithEmojis .Content .Emojis}} </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" />
2019-12-13 18:08:26 +00:00
</a>
2019-12-14 10:57:14 +00: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"}}
<video class="status-video" controls preload="none">
<source src="{{.URL}}">
<p> Your browser doesn't support HTML5 video </p>
</video>
2019-12-13 18:08:26 +00:00
{{else}}
2019-12-14 10:57:14 +00:00
<a href="{{.URL}}" target="_blank"> attachment </a>
2019-12-13 18:08:26 +00:00
{{end}}
{{end}}
2019-12-14 10:57:14 +00:00
</div>
<div class="status-action">
2019-12-14 17:48:54 +00:00
<a class="status-you" href="/thread/{{.ID}}?reply=true#status-{{.ID}}" title="reply">
2019-12-14 10:57:14 +00:00
<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}}">
2019-12-14 10:57:14 +00:00
<time datetime="{{FormatTimeRFC3339 .CreatedAt}}" title="{{.CreatedAt}}"> {{TimeSince .CreatedAt}} </time>
</a>
</div>
2019-12-13 18:08:26 +00:00
</div>
</div>
2019-12-14 10:57:14 +00:00
{{end}}
{{end}}
2019-12-13 18:08:26 +00:00
</div>