read_at === null ? 'bg-heading-background' : 'bg-base';
?>
post_id !== null ? $notification->post : null;
$actorUsername = '@' . esc($notification->actor
->username) .
($notification->actor->is_local
? ''
: '@' . esc($notification->actor->domain));
$actorUsernameHtml = <<{$actorUsername}
HTML;
$targetActorUsername = '@' . esc($notification->target_actor->username);
$targetActorUsernameHtml = <<{$targetActorUsername}
HTML;
$notificationTitle = match ($notification->type) {
'reply' => lang('Notifications.reply', [
'actor_username' => $actorUsernameHtml,
], null, false),
'like' => lang('Notifications.favourite', [
'actor_username' => $actorUsernameHtml,
], null, false),
'share' => lang('Notifications.reblog', [
'actor_username' => $actorUsernameHtml,
], null, false),
'follow' => lang('Notifications.follow', [
'actor_username' => $actorUsernameHtml,
], null, false),
default => '',
};
$notificationContent = $post !== null ? $post->message_html : null;
$postLink = $post !== null ? route_to('post', esc($podcast->handle), $post->id) : route_to('podcast-activity', esc($podcast->handle));
$link = $notification->read_at !== null ? $postLink : route_to('notification-mark-as-read', $podcast->id, $notification->id);
?>
type) {
'reply' => icon('chat-4-fill', [
'class' => 'text-sky-500 text-base',
]),
'like' => icon('heart-fill', [
'class' => 'text-rose-500 text-base',
]),
'share' => icon('repeat-fill', [
'class' => 'text-green-500 text-base',
]),
'follow' => icon('user-follow-fill', [
'class' => 'text-violet-500 text-base',
]),
default => '',
};
?>
= $icon ?>
= $notificationTitle ?>
= $notificationContent ?>
= relative_time($notification->created_at) ?>