Forum: - TipTap WYSIWYG editor with full toolbar - @emoji-mart/react emoji picker (consistent with tweets) - @mention autocomplete with user search API - Fix PHP 8.4 parse errors in Blade templates - Fix thread data display (paginator items) - Align forum page widths to max-w-5xl Discover: - Extract shared _nav.blade.php partial - Add missing nav links to for-you page - Add Following link for authenticated users Feed/Posts: - Post model, controllers, policies, migrations - Feed page components (PostComposer, FeedCard, etc) - Post reactions, comments, saves, reports, sharing - Scheduled publishing support - Link preview controller Profile: - Profile page components (ProfileHero, ProfileTabs) - Profile API controller Uploads: - Upload wizard enhancements - Scheduled publish picker - Studio status bar and readiness checklist
39 lines
2.3 KiB
PHP
39 lines
2.3 KiB
PHP
{{--
|
|
Discover section-switcher pills.
|
|
|
|
Expected variable: $section (string) — the active section slug, e.g. 'trending', 'for-you'
|
|
Expected variable: $isAuthenticated (bool, optional) — whether the user is logged in
|
|
--}}
|
|
|
|
@php
|
|
$active = $section ?? '';
|
|
$isAuth = $isAuthenticated ?? auth()->check();
|
|
|
|
$sections = collect([
|
|
'for-you' => ['label' => 'For You', 'icon' => 'fa-wand-magic-sparkles', 'auth' => true, 'activeClass' => 'bg-yellow-500/20 text-yellow-300 border border-yellow-400/20'],
|
|
'following' => ['label' => 'Following', 'icon' => 'fa-user-group', 'auth' => true, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'trending' => ['label' => 'Trending', 'icon' => 'fa-fire', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'rising' => ['label' => 'Rising', 'icon' => 'fa-rocket', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'fresh' => ['label' => 'Fresh', 'icon' => 'fa-bolt', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'top-rated' => ['label' => 'Top Rated', 'icon' => 'fa-medal', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'most-downloaded' => ['label' => 'Most Downloaded', 'icon' => 'fa-download', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
'on-this-day' => ['label' => 'On This Day', 'icon' => 'fa-calendar-day', 'auth' => false, 'activeClass' => 'bg-sky-600 text-white'],
|
|
]);
|
|
@endphp
|
|
|
|
<div class="flex flex-wrap items-center gap-2 text-sm">
|
|
@foreach($sections as $slug => $meta)
|
|
@if($meta['auth'] && !$isAuth)
|
|
@continue
|
|
@endif
|
|
<a href="{{ route('discover.' . $slug) }}"
|
|
class="inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-colors
|
|
{{ $active === $slug
|
|
? $meta['activeClass']
|
|
: 'bg-white/[0.05] text-white/60 hover:bg-white/[0.1] hover:text-white' }}">
|
|
<i class="fa-solid {{ $meta['icon'] }} text-xs {{ $active === $slug && $slug === 'for-you' ? '' : '' }}"></i>
|
|
{{ $meta['label'] }}
|
|
</a>
|
|
@endforeach
|
|
</div>
|