@extends('layouts.app') @section('title', __('Blog') . ' - ' . config('app.name')) @section('content') @php $firstPost = $featuredPost ?? $posts->first(); $gridPosts = $featuredPost ? $posts : $posts->slice(1); @endphp {{-- Hero --}} @if($firstPost && $posts->onFirstPage() && !request('search') && !request('tag'))
@if($firstPost->category) {{ $firstPost->category->name }} @endif @if($firstPost->reading_time_minutes) {{ $firstPost->reading_time_minutes }} {{ __('min read') }} @endif

{{ $firstPost->title }}

@if($firstPost->excerpt)

{{ Str::limit($firstPost->excerpt, 160) }}

@endif {{ __('Read Article') }}
@endif {{-- Search + Categories --}}

{{ __('Blog') }}

{{ __('Latest Articles') }}

{{ __('Discover expert advice, healthy recipes, and wellness tips to help you achieve your goals.') }}

{{-- Search --}}
{{-- Category Tabs --}} @if(isset($categories) && $categories->count() > 0)
{{ __('All') }} @foreach($categories as $cat) {{ $cat->name }} @endforeach
@endif {{-- Active Filters --}} @if(request('search') || request('tag'))
@if(request('search')) "{{ request('search') }}" @endif @if(request('tag')) #{{ request('tag') }} @endif {{ __('Clear all') }}
@endif
{{-- Blog Grid --}}
@if($gridPosts->count() > 0)
@foreach($gridPosts as $post)
@if($post->category) {{ $post->category->name }} @endif @if($post->reading_time_minutes) · {{ $post->reading_time_minutes }} {{ __('min') }} @endif

{{ $post->title }}

@if($post->excerpt)

{{ Str::limit($post->excerpt, 100) }}

@endif {{ __('Read More') }}
@endforeach
@if($posts->hasPages())
{{ $posts->links() }}
@endif @elseif($posts->count() === 0)

{{ __('No articles found') }}

{{ __('Try adjusting your search or filters.') }}

@if(request('search') || request('category') || request('tag')) {{ __('Clear filters') }} @endif
@endif
{{-- Topics --}} @if(isset($tags) && $tags->count() > 0 && !request('search'))

{{ __('Topics') }}

{{ __('Explore Topics') }}

{{ __('Find articles on the topics you care about') }}

@foreach($tags as $tag) #{{ $tag->name }} {{ $tag->posts_count }} @endforeach
@endif @endsection @push('styles') @endpush