treebird/templates/content_notifs.tt
nekobit 33dbabd49b Mastodont: rename to mstdnt_notifications_args
FossilOrigin-Name: 5998ae4318e218c7175f57bb6416ed4be9e68432ab4d47575ae97f6c723dd01f
2022-08-12 04:50:04 +00:00

52 lines
2.4 KiB
Text

<div class="notification-container">
<h1 class="text-header">Notifications</h1>
<div class="menubar">
[% IF notifs %]
<a class="btn btn-single btn-small" href="/notifications/clear">Clear notifications</a>
[% ELSE %]
<span class="btn btn-single btn-small btn-disabled">Clear notifications</span>
[% END %]
</div>
[% IF notifs %]
[% FOREACH notif IN notifs %]
[%# 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 %]">@[% notif.account.acct %]</a>
</div>
</td>
</tr>
</table>
[% END %]
[% END %]
[% ELSE %]
<div class="fancy-error">
<span class="fancy-error-kaomoji">[% random_error_kaomoji() %]</span>
<span class="fancy-error-text">No notifications.</span>
</div>
[% END %]
</div>