@php $user_url = null; if ($actor->blog_id) { $user_url = route ('blogs.show', [ 'blog' => $actor->blog->slug ]); } else if ($actor->user_id) { $user_url = route ('users.show', [ 'user_name' => $actor->user->name ]); } else { $user_url = route ('users.show', [ 'user_name' => $actor->local_actor_id ]); } @endphp @extends("partials.layout") @section ("title", "View Post") @section ("content")

Published by {{ $actor->name }}

published

{{ $actor->name }}'s Post

@if (auth ()->check () && auth ()->user ()->is ($actor->user))
@csrf @method("DELETE")
@csrf
@endif @if ($note->in_reply_to)

In Reply To: this post

@endif

{{ $note->summary }}

{!! $note->content !!} @foreach ($note->attachments as $attachment) {{-- check if $attachment->media_type starts with image/ --}} @if (str_starts_with ($attachment->media_type, "image/") || $attachment->media_type == null) @else

Attachment {{ $attachment->media_type }} is not supported yet

@endif @endforeach

@auth
@csrf
@csrf
@endauth

Likes: {{ $note->get_likes ()->count () }}
Boosts: {{ $note->get_boosts ()->count () }}
Hashtags: @foreach ($note->get_hashtags ()->get () as $hashtag) {{ $hashtag->name }} @endforeach
Mentions: @foreach ($note->get_mentions ()->get () as $mention) {{ $mention->actor->local_actor_id ?? '@' . $mention->actor->preferredUsername }} @endforeach

Comments

@auth
@endauth

Displaying 0 of {{ $note->get_replies ()->count () }} comments

@foreach ($note->get_replies ()->get () as $reply) @endforeach
@endsection