treebird/templates/notification.tt
nekobit 2609e9680c Bring back embedded notifications
FossilOrigin-Name: 8eb2f577e9a9de679829d1694231f527dfacf53938ecc52f323021ed52744bfd
2022-08-19 04:46:41 +00:00

33 lines
1.3 KiB
Text

[%# There are 3 types of "different" notifications to render
- Mention, statuses (just regular statuses)
- Favorites, moves, reblogs, polls (no interaction buttons)
- Follows, follow requests
%]
[% IF notif.type == 'mention' ||
notif.type == 'status' ||
notif.type == 'favourite' ||
notif.type == 'reblog' ||
notif.type == 'emoji reaction' ||
notif.type == 'poll' %]
[% create_status(notif.status, notif) %]
[% ELSIF notif.type == 'follow' || notif.type == 'follow request' %]
<table class="notification notification-regular ui-table">
<tr>
<td class="pfp-td">
<img src="[% notif.account.avatar %]" loading="lazy">
</td>
<td class="notification-info">
<div class="notification-info-format">
<span class="notification-text-group-with-icon">
<span title="[% notif.account.acct %]" class="username">[% notif.account.display_name %]</span>
<span class="action">followed</span>
</span>
[% icon('follow') %]
</div>
<div class="notification-content">
<a href="/@[% notif.account.acct %]" target="_parent">@[% notif.account.acct %]</a>
</div>
</td>
</tr>
</table>
[% END %]