@extends('frontend.layouts.app') @php // SEO foundation (spec §15): title + meta description (seo fields → fallback place data) $metaDescription = $place->seo_description ?: \Illuminate\Support\Str::limit( strip_tags((string) ($place->description ?: $place->content ?: '')), 160, '…' ); // ---- Hero: background = featured_image (fallback: cover image) ---- $heroImage = $place->featured_image ?: $place->image; $heroImage = $heroImage ? (Str::startsWith($heroImage, ['http://', 'https://']) ? $heroImage : asset($heroImage)) : null; // ---- Quick Facts card (reference) — only filled fields (§12 no-placeholder rule) ---- $quickFacts = array_filter([ 'State' => $place->state, 'District' => $place->district, 'Best Time' => $information?->best_time ? \Illuminate\Support\Str::limit(trim(strip_tags($information->best_time)), 60, '…') : null, 'Famous For' => $place->famous_for, ], fn ($v) => $v !== null && trim((string) $v) !== ''); // ---- Location + basic info rows (existing cards) ---- $locationRows = array_filter([ 'City' => $place->city, 'Country' => $place->country, 'Pincode' => $place->pincode, 'Coordinates' => ($place->latitude !== null && $place->longitude !== null) ? ((float) $place->latitude) . ', ' . ((float) $place->longitude) : null, ], fn ($v) => $v !== null && $v !== ''); $basicRows = array_filter([ 'Place Type' => $place->category?->name, 'Phone' => $place->phone, 'Email' => $place->email, 'Website' => $place->website, 'Address' => $place->address, ], fn ($v) => $v !== null && $v !== ''); // ---- About / History kept SEPARATE (reference: 2-column block, right after the hero) ---- // The remaining content sections stay section-driven (§17 order). $contentByKey = []; foreach ($sections as $s) { if (($s['kind'] ?? '') === 'content') { $contentByKey[$s['key']] = $s['html']; } } $aboutHtml = $contentByKey['about'] ?? null; $historyHtml = $contentByKey['history'] ?? null; $restSections = array_values(array_filter( $sections, fn ($s) => ! in_array($s['key'] ?? '', ['about', 'history'], true) )); // ---- Render plan: content = full width, entity = 2-col grid (reference pairing) ---- $groups = []; $gridBuffer = []; foreach ($restSections as $s) { if (($s['kind'] ?? '') === 'content') { if ($gridBuffer !== []) { $groups[] = ['kind' => 'grid', 'items' => $gridBuffer]; $gridBuffer = []; } $groups[] = ['kind' => 'full', 'sec' => $s]; } else { $gridBuffer[] = $s; } } if ($gridBuffer !== []) { $groups[] = ['kind' => 'grid', 'items' => $gridBuffer]; } // ---- Quick category strip (anchor nav) — only the sections actually being rendered ---- $contentIcons = [ 'about' => 'fa-solid fa-book-open', 'history' => 'fa-solid fa-landmark', 'culture' => 'fa-solid fa-masks-theater', 'heritage' => 'fa-solid fa-monument', 'importance' => 'fa-solid fa-hands-praying', 'geography' => 'fa-solid fa-earth-asia', 'how_to_reach' => 'fa-solid fa-route', 'best_time' => 'fa-solid fa-calendar-check', 'travel_tips' => 'fa-solid fa-suitcase-rolling', 'faqs' => 'fa-solid fa-circle-question', 'yatri_information' => 'fa-solid fa-compass', 'important_information'=> 'fa-solid fa-circle-info', ]; $quickLinks = []; if ($aboutHtml) { $quickLinks[] = ['label' => 'About', 'icon' => 'fa-solid fa-book-open', 'href' => '#about']; } if ($historyHtml) { $quickLinks[] = ['label' => 'History', 'icon' => 'fa-solid fa-landmark', 'href' => '#history']; } foreach ($restSections as $s) { if ($s['kind'] === 'entities') { $quickLinks[] = [ 'label' => $s['meta']['label'], 'icon' => $s['meta']['icon'], 'href' => '#sec-' . $s['key'], ]; } else { $quickLinks[] = [ 'label' => $s['label'], 'icon' => $contentIcons[$s['key']] ?? 'fa-solid fa-file-lines', 'href' => '#sec-' . $s['key'], ]; } } // ---- CTAs ---- $videoUrl = $place->video_url; // Plan Your Visit → first available travel section (if any) $planVisitHref = null; foreach (['how_to_reach', 'yatri_information', 'best_time', 'important_information'] as $k) { if (isset($contentByKey[$k])) { $planVisitHref = '#sec-' . $k; break; } } $mapHref = ($place->latitude !== null && $place->longitude !== null) ? 'https://maps.google.com/?q=' . (float) $place->latitude . ',' . (float) $place->longitude : null; // Entity type for Must Visit cards → URL path $entityPath = fn (string $type) => config('place_entities.types.' . $type . '.path'); @endphp @section('title', $place->seo_title ?: $place->name . ' - Explore Braj') @section('meta_description', e($metaDescription)) @section('og_title', $place->seo_title ?: $place->name . ' | The Braj') @section('og_description', e($metaDescription)) @if($place->canonical_url) @section('canonical', $place->canonical_url) @endif @if($place->og_image) @section('og_image', Str::startsWith($place->og_image, ['http://', 'https://']) ? $place->og_image : asset($place->og_image)) @endif @section('content') {{-- Admin PREVIEW banner (spec §3E) — team-only view of a draft/archived place --}} @if(! empty($preview))
{{ $place->name_hi }}
@endif @if($place->tagline){{ $place->tagline }}
@endif @if($place->description){{ $place->description }}
@endif {{-- CTAs: Watch Video / Plan Your Visit / View Map — only the available ones --}}{{ $biz->serviceCategory->name }}
@elseif($biz->short_description){{ \Illuminate\Support\Str::limit($biz->short_description, 80) }}
@endifVerified contacts only. In a serious emergency always dial 112 first.
{{ \Illuminate\Support\Str::limit($st->short_description, 90) }}
@endif{{ $place->name }} के संदर्भ में संतों व भक्तों द्वारा रचित पावन आलेख एवं दर्शन अनुभव।
{{ $art->subject_label }}
✍️ {{ $art->author?->name ?? 'Devotee' }} • ⏱️ {{ $art->reading_time }}
{{ $ev->event_date->format('M d, Y') }}{{ $ev->event_time ? ' · '.$ev->event_time : '' }}
Your seva keeps the living traditions of Braj alive. Support a campaign through The Braj Dham Seva Trust.