@php use App\Services\Social\SocialPostAggregator; $chColor = ['instagram' => '#C13584', 'facebook' => '#1877F2', 'tiktok' => '#010101', 'threads' => '#000000']; $chGlyph = [ 'instagram' => '', 'facebook' => '', 'tiktok' => '', 'threads' => '', ]; // Any channel without an entry falls back to a neutral style + its own posts // page, so a newly-added channel (e.g. Threads) can never 500 this page. $chColorOf = fn ($c) => $chColor[$c] ?? '#64748B'; $chGlyphOf = fn ($c) => $chGlyph[$c] ?? ''; $chManageUrl = fn ($c) => ['instagram'=>url('/instagram/posts'),'facebook'=>url('/facebook/posts'),'tiktok'=>url('/tiktok/posts'),'threads'=>url('/threads/posts')][$c] ?? url('/'.$c.'/posts'); $navUrl = fn ($date, $plat) => url('/social/calendar').'?'.http_build_query(array_filter(['date' => $date, 'platform' => $plat])); $dows = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; @endphp
{{ __('Social') }} · {{ __('Calendar') }}

{{ __('Content') }} {{ __('calendar') }}

{{ $monthCount }} {{ __('scheduled this month across all channels.') }}

{{ __('All posts') }} @if (count($channels))
@endif
{{-- Month nav + platform filter --}}
{{ $anchor->format('F Y') }}
{{ __('Today') }}
{{ __('All') }} @foreach (['instagram' => 'Instagram', 'facebook' => 'Facebook', 'tiktok' => 'TikTok', 'threads' => 'Threads'] as $k => $lbl) {!! $chGlyphOf($k) !!}{{ $lbl }} @endforeach
{{-- Month grid --}}
@foreach ($dows as $d)
{{ $d }}
@endforeach
@foreach ($weeks as $week)
@foreach ($week as $cell)
{{ $cell['date']->format('j') }}
@foreach ($cell['posts']->take(4) as $p) @php $ring = $p['status'] === 'failed' ? 'ring-1 ring-accent-coral' : ''; @endphp {!! $chGlyphOf($p['channel']) !!} {{ $p['scheduled_at']->timezone($tz)->format('g:i A') }} {{ \Illuminate\Support\Str::limit(strip_tags($p['text']) ?: 'Post', 16) }} @endforeach @if ($cell['posts']->count() > 4)
+{{ $cell['posts']->count() - 4 }} {{ __('more') }}
@endif
@endforeach
@endforeach
{{-- Upcoming --}} @if ($upcoming->isNotEmpty())
{{ __('Upcoming scheduled') }}
@foreach ($upcoming as $p)
{!! $chGlyphOf($p['channel']) !!}
{{ \Illuminate\Support\Str::limit(strip_tags($p['text']) ?: 'Post', 90) }}
{{ $p['scheduled_at']->timezone($tz)->format('D j M, g:i A') }} · {{ $p['account_name'] }}
{{ __('Manage') }}
@endforeach
@endif
{{-- Scheduler drawer — opens on a day "+" (or the toolbar's New Post). Pick an account across channels, compose, and schedule. Submits to /social/schedule. --}}