@if ($post['post_type'] == 'event')
{{$post['event_post']['description']}}
@foreach ($post['event_post']['eventMembers'] as $members)
{{substr($members->user->username, 0, 1)}}
@endforeach
@else
@php
function calculateLuminance($color) {
$r = hexdec(substr($color, 1, 2));
$g = hexdec(substr($color, 3, 2));
$b = hexdec(substr($color, 5, 2));
return (0.299 * $r + 0.587 * $g + 0.114 * $b) / 255;
}
$backgroundColor = isset($post['background_color']) ? ($post['background_color'] == 0 ? '#FFFFFF' : $post['background_color']) : '#FFFFFF';
$luminance = calculateLuminance($backgroundColor);
if ($luminance > 0.5) {
$textColor = "#000000";
} else {
$textColor = "#FFFFFF";
}
@endphp
{{ $post['parent_id'] != 0 ? (strlen($post['shared_post_content']) > 90000 ? substr($post['shared_post_content'], 0, 90000) . '...' : $post['shared_post_content'] ?? '') : (strlen($post['content']) > 90000 ? substr($post['content'], 0, 90000) . '...' : $post['content'] ?? '') }}
@if (isset($post['media']))
@foreach ($post['media'] as $media)
@if ($media['type'] == 'image')
@endif
@if ($media['type'] == 'video')
@endif
@endforeach
@endif
@if ($post['parent_id'] != 0)
@php
function calculateLuminanceParentPost($color) {
$r_pp = hexdec(substr($color, 1, 2));
$g_pp = hexdec(substr($color, 3, 2));
$b_pp = hexdec(substr($color, 5, 2));
return (0.299 * $r_pp + 0.587 * $g_pp + 0.114 * $b_pp) / 255;
}
$backgroundColor_pp = isset($post['parent_post']['background_color']) ? $post['parent_post']['background_color'] : '#FFFFFF';
$luminance_pp = calculateLuminanceParentPost($backgroundColor_pp);
if ($luminance_pp > 0.5) {
$textColor_pp = "#000000";
} else {
$textColor_pp = "#FFFFFF";
}
@endphp
{{ $post['parent_post']['parent_id'] != 0 ? (strlen($post['parent_post']['shared_post_content']) > 90000 ? substr($post['parent_post']['shared_post_content'], 0, 90000) . '...' : $post['parent_post']['shared_post_content'] ?? '') : (strlen($post['parent_post']['content']) > 90000 ? substr($post['parent_post']['content'], 0, 90000) . '...' : $post['parent_post']['content'] ?? '') }}
@if (isset($post['parent_post']['media']))
@foreach ($post['parent_post']['media'] as $media_pp)
@if ($media_pp['type'] == 'image')
@endif
@if ($media_pp['type'] == 'video')
@endif
@endforeach
@endif
View Full Post
@endif
@if (isset($post['tag'], $post['tag']['people'][0]))
@endif
@if (isset($post['tag'], $post['tag']['pedigree'][0]))
@endif
@foreach ($post['comments'] as $comment)
@include('admin.posts.comment', ['comment' => $comment, 'mx' => 'mx-0'])
@endforeach