@extends('layouts.app') @section('title', 'Blog — Japan Life, JLPT Tips, Visa Guide | Soyogi') @section('content')
@foreach(['All','JLPT Tips','Visa Guide','Japan Life','Career in Japan','Language Learning','Student Stories','Cultural Insights'] as $cat) {{ $cat }} @endforeach
@php $featured = $posts->first(); $rest = $posts->skip(1); @endphp @if($featured)
FEATURED

{{ $featured->title }}

{{ $featured->excerpt ?: Str::limit(strip_tags($featured->content), 160) }}

{{ ($featured->published_at ?? $featured->created_at)->format('M Y') }} {{ $featured->readTime() }} min read {{ $featured->author ?: 'Soyogi' }}
Read Article
@if($featured->image) @else @endif
@endif
@forelse($rest as $blog) @if($blog->image)
@else
@endif
{{ $blog->category ?: 'Blog' }}

{{ $blog->title }}

{{ $blog->excerpt ?: Str::limit(strip_tags($blog->content),120) }}

{{ ($blog->published_at ?? $blog->created_at)->format('M Y') }} {{ $blog->readTime() }} min
@empty {{-- No blog posts yet --}}

Blog posts will appear here. Add them from the admin panel.

+ Add First Post
@endforelse
@if($posts->hasPages())
{{ $posts->links() }}
@endif
@endsection