@php $author = $post->author ?? null; $profile = $author?->nurseProfile ?? null; $location = trim(($profile?->city ? $profile->city . ', ' : '') . ($profile?->country ?? '')) ?: 'Location n/a'; $specialty = $post->specialty_tag ?? $profile?->primary_specialty ?? 'User'; $name = $author?->name ?? 'Unknown User'; $initials = strtoupper(substr($name, 0, 2)); $bioSnippet = $profile?->bio ? \Illuminate\Support\Str::limit(strip_tags($profile->bio), 120) : null; $userId = auth()->id(); $isLiked = $userId ? $post->isLikedBy($userId) : false; $isDisliked = $userId ? $post->isDislikedBy($userId) : false; $isBookmarked = $userId ? $post->isBookmarkedBy($userId) : false; $isReposted = $userId ? $post->isRepostedBy($userId) : false; @endphp @php $adminModeration = $adminModeration ?? false; @endphp
@if($author) {{ $name }} @else {{ $initials }} @endif

{{ $specialty }}

{{ $name }}

{{ $location }} {{ $profile?->years_experience ? $profile->years_experience . ' yrs' : 'Experience n/a' }}

@if($post->signal_score > 0) {{ number_format($post->signal_score, 0) }} @endif {{ $post->created_at->diffForHumans() }}
@if($post->body) @php $hasStyle = !empty($post->background_color) || !empty($post->text_color) || !empty($post->background_color_end); $bodyStyle = 'padding: 0.75rem 1rem; border-radius: 0.5rem;'; if (!empty($post->background_color_end) && !empty($post->background_color)) { $bodyStyle .= ' background: linear-gradient(135deg, ' . e($post->background_color) . ' 0%, ' . e($post->background_color_end) . ' 100%);'; } elseif (!empty($post->background_color)) { $bodyStyle .= ' background-color: ' . e($post->background_color) . ';'; } if (!empty($post->text_color)) { $bodyStyle .= ' color: ' . e($post->text_color) . ';'; } $stylePreset = $post->style_preset ?? ''; @endphp
@if($hasStyle && in_array($stylePreset, ['quote','tip','milestone','professional'])) @endif

{{ $post->body }}

@endif {{-- Quoted Post Preview --}} @if($post->quotedPost) @php $quotedAuthor = $post->quotedPost->author ?? null; $quotedProfile = $quotedAuthor?->nurseProfile ?? null; $quotedName = $quotedAuthor?->name ?? 'Unknown User'; $quotedInitials = strtoupper(substr($quotedName, 0, 2)); @endphp
@if($quotedAuthor) {{ $quotedName }} @else {{ $quotedInitials }} @endif

{{ $quotedName }}

{{ $post->quotedPost->body }}

@endif @if($bioSnippet)

{{ $bioSnippet }}

@endif @if($post->image_url)
Post image
@endif
@if($post->category) {{ $post->category->icon }} {{ $post->category->name }} @endif @if($profile?->primary_specialty) {{ $profile->primary_specialty }} @endif @if($profile?->nclex_status) NCLEX: {{ ucfirst($profile->nclex_status) }} @endif
@if(!$adminModeration)
@else

Admin moderation view

Use the controls below the card to hide or delete this post.

@endif {{-- Comment Form (hidden by default) --}} @unless($adminModeration) @endunless