treebird/templates/status.tt
nekobit 025036832a Attachments, Emoji reactions, reply id's
FossilOrigin-Name: 58d7a2add5fc05eac12f8bacd7071095d91d0c9d3f481454202898b1cf5c115a
2022-07-30 06:19:17 +00:00

151 lines
9.1 KiB
Text

<input type="checkbox" class="status-hide" id="status-toggle-[% status.id %]" {{ %s:thread_hidden }}>
<div class="status" id="[% status.id %]">
[% notif_info %]
<table class="status-table ui-table">
<tr>
<td class="pfp-td {{%s:is_cat}} {{%s:is_bun}}">
<img src="[% status.account.avatar %]" loading="lazy">
</td>
<td class="status-info">
<div class="poster-stats">
<span class="username">[% status.account.display_name %]</span>
<a class="instance-info" href="$prefix/@[% status.account.acct %]">[% status.account.acct %]</a>
<span class="alignend">
<div class="menu-container status-visibility">
[% vis_to_icon(status.visibility) %]
<div class="menu">
<ul>
<li>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input type="hidden" name="itype" value="mute">
<input type="submit" class="btn-menu" value="{{%s:unmute_btn}}">
</form>
</li>
<li>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input type="hidden" name="itype" value="bookmark">
<input type="submit" class="btn-menu" value="{{%s:unbookmark_btn}}">
</form>
</li>
[%# pin %]
<li>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input type="hidden" name="itype" value="pin">
<input type="submit" class="btn-menu" value="{{%s:text}}">
</form>
</li>
[%# Delete %]
<li>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input type="hidden" name="itype" value="delete">
<input type="submit" class="btn-menu" value="{{%s:text}}">
</form>
</li>
</ul>
</div>
</div>
<label for="status-toggle-[% status.id %]" class="status-view"></label>
</span>
</div>
<div class="status-data">
[%# Note: The id may actually (99.5% of the time) be the acct %]
[% IF status.in_reply_to_id %]
<span class="in-reply-to">
<svg class="in-reply-to-icon" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#000000" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14 9l6 6-6 6"/><path d="M4 4v7a4 4 0 0 0 4 4h11"/></svg> <a class="in-reply-to-id" href="$prefix/status/[% status.in_reply_to_id %]#[% status.in_reply_to_id %]"> <span class="in-reply-to-text">In reply to</span> <span class="acct">[% status.pleroma.in_reply_to_account_acct || status.in_reply_to_account_id %]</span></a>
</span>
[% END %]
<span class="status-content">
[% status.content %]
</span>
[% IF status.media_attachments %]
<div class="attachments">
[% FOR att IN status.media_attachments %]
[% make_att(ssn, data, att, status.sensitive) %]
[% END %]
</div>
[% END %]
[%# TODO {{%s:interactions}} %]
[% IF status.pleroma.emoji_reactions %]
<div class="emoji-reactions">
[% FOR emo IN status.pleroma.emoji_reactions %]
[% make_emoji(ssn, data, status.id, emo) %]
[% END %]
</div>
[% END %]
<div class="status-interact">
<table class="ui-table">
<tr>
<td>
<label for="status-quickreply-[% status.id %]" class="pointer statbtn reply-btn">
[% icon('reply') %]
[% IF status.replies_count %]
<span class="count">[% status.replies_count %]</span>
[% END %]
</label>
</td>
<td>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input class="itype" type="hidden" name="itype" value="{{%s:unrepeat}}repeat">
<label class="repeat-btn pointer statbtn">
[% icon('repeat') %]
[% IF status.reblogs_count %]
<span class="count">[% status.reblogs_count %]</span>
[% END %]
<input class="hidden" type="submit" value="Repeat">
</label>
</form>
</td>
<td>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input class="itype" type="hidden" name="itype" value="{{%s:unfavourite}}like">
<label class="pointer statbtn like-btn">
[% icon('like') %]
[% IF status.favourites_count %]
<span class="count">[% status.favourites_count %]</span>
[% END %]
<input class="hidden" type="submit" value="Like">
</label>
</form>
</td>
[% IF ssn.config.stat_oneclicksoftware %]
<td>
<form action="$prefix/status/[% status.id %]/interact" method="post">
<input class="itype" type="hidden" name="itype" value="likeboost">
<label class="pointer statbtn likeboost-btn">
[% icon('likeboost') %]
<input class="hidden" type="submit" value="L+R">
</label>
</form>
</td>
[% END %]
<td>
<a target="_parent" href="$prefix/status/[% status.id %]/react#[% status.id %]" class="pointer statbtn react-btn">
[% icon('emoji') %]
</a>
[% IF emoji_picker -%]
[% emoji_picker %]
[%- END %]
</td>
<td>
<a target="_parent" href="$prefix/status/[% status.id %]#[% status.id %]" class="pointer statbtn view-btn">
[% icon('expand') %]
</a>
</td>
<td>
<a href="#[% status.id %]" class="time">
[%- rel_to_str(status.created_at) -%]
</a>
</td>
</tr>
</table>
</div>
</div>
</td>
</tr>
</table>
</div>
<input type="checkbox" class="quickreply-hide hidden" id="status-quickreply-[% status.id %]">
{{ %s : reply }}