treebird/templates/status.tt
nekobit d80f9a3c62 Show icon
FossilOrigin-Name: de6307adad08ce359ccadf55db72af387caf37e45025b5d414cfe737092ed008
2022-08-09 02:31:17 +00:00

158 lines
9.8 KiB
Text

<input type="checkbox" class="status-hide" id="status-toggle-[% status.id %]"[% IF status.muted %] checked[% END %]>
<div class="status" id="[% status.id %]">
[% IF boost %]
<div class="notification-info">
<img src="[% boost.avatar %]" loading="lazy" class="avatar">
<div class="notification-user">
<span class="notification-text-group-with-icon">
<span class="username">[% format_username(boost) %]</span>
<span class="action">repeated</span>
</span>
[% icon('repeat') %]
</div>
</div>
[% END %]
<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">[% format_username(status.account) %]</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">
[% IF status.spoiler_text %]
<span class="title">[% emojify(escape(status.spoiler_text), status.emojis) %]</span>
[% END %]
[% greentextify(emojify(fix_mentions(status.content), status.emojis)) %]
</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">
<div class="status-buttons">
<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>
<form action="$prefix/status/[% status.id %]/interact" method="post" class="statbtn-form">
<input class="itype" type="hidden" name="itype" value="[% IF status.favourited %]un[% END %]like">
<label class="pointer statbtn like-btn[% IF status.favourited %] interacted[% END %]">
[% icon('like') %]
[% IF status.favourites_count %]
<span class="count">[% status.favourites_count %]</span>
[% END %]
<input class="hidden" type="submit" value="Like">
</label>
</form>
<form action="$prefix/status/[% status.id %]/interact" method="post" class="statbtn-form">
<input class="itype" type="hidden" name="itype" value="[% IF status.reblogged %]un[% END %]repeat">
<label class="repeat-btn pointer statbtn[% IF status.reblogged %] interacted[% END %]">
[% icon('repeat') %]
[% IF status.reblogs_count %]
<span class="count">[% status.reblogs_count %]</span>
[% END %]
<input class="hidden" type="submit" value="Repeat">
</label>
</form>
[% IF ssn.config.stat_oneclicksoftware %]
<form action="$prefix/status/[% status.id %]/interact" method="post" class="statbtn-form">
<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>
[% END %]
<a target="_parent" class="statbtn statbtn-last" href="$prefix/status/[% status.id %]/react#[% status.id %]" class="pointer statbtn react-btn">
[% icon('emoji') %]
</a>
[% IF emoji_picker -%]
[% emoji_picker %]
[%- END %]
</div>
[%# Put these at the end, incase someone wants to move status icons to the beginning (this makes it easier %]
<a target="_parent" href="$prefix/status/[% status.id %]#[% status.id %]" class="pointer statbtn view-btn">
[% icon('expand') %]
</a>
<span class="status-meta">
<a href="#[% status.id %]" title="[% time_to_str(status.created_at) %]" class="time">[%- rel_to_str(status.created_at) -%]</a>
[% IF status.application && status.application.name %]
[% IF status.application.url %]
<a class="application-name" href="[% status.application.url %]">[% status.application.name %]</a>
[% ELSE %]
<span class="application-name">[% status.application.name %]</span>
[% END %]
[% END %]
</span>
</div>
</div>
</td>
</tr>
</table>
</div>
<input type="checkbox" class="quickreply-hide hidden" id="status-quickreply-[% status.id %]">
[% IF ssn.logged_in %]
[% make_postbox(ssn, data, status) %]
[% END %]