{{-- ============================================================ DETAIL NEWS GAPKINDO — Elegant Article Page Struktur: 1. Banner header (navy + checkerboard, compact) 2. Hero section: title + meta (date, source) 3. Featured image (large, hero-style) 4. Article body (readable typography, max-width) 5. Article footer: print, share, info card 6. CTA back to news list + home ============================================================ --}} @extends('guest.layouts.master') @section('title', $dataNews->title . ' | GAPKINDO') @push('styles') @endpush @section('content') @php $publishDate = $dataNews->created_at ? \Carbon\Carbon::parse($dataNews->created_at)->locale('id')->isoFormat('D MMMM Y') : '-'; $relativeDate = $dataNews->created_at ? \Carbon\Carbon::parse($dataNews->created_at)->diffForHumans() : ''; // Split content into paragraphs for proper book-style typography $content = trim($dataNews->content ?? ''); $paragraphs = preg_split('/\n\s*\n/', $content); if (count($paragraphs) === 1 && strpos($content, "\n") !== false) { // Fallback: split single newlines if no double newlines exist $paragraphs = preg_split('/\n+/', $content); } $paragraphs = array_filter(array_map('trim', $paragraphs)); // Reading time estimation (~200 words per minute for Indonesian) $wordCount = str_word_count(strip_tags($content)); $readingTime = max(1, ceil($wordCount / 200)); @endphp
{!! nl2br(e($para)) !!}
@endforeach