@props(['title' => null, 'metaDescription' => null]) @php // The seeded meta_title already carries the brand, so drop it here or the would repeat it. $pageTitle = $title ?: (preg_replace('/^[\s|—-]+|[\s|—-]+$/u', '', str_replace($brand, '', $seo['meta_title'] ?? '')) ?: 'Online Shopping in Bangladesh'); $description = $metaDescription ?? $seo['meta_description'] ?? null; // canonical_url describes the home page; other pages must point at themselves. $canonical = request()->is('/') && filled($seo['canonical_url'] ?? null) ? $seo['canonical_url'] : url()->current(); // Both IDs are admin input printed inside inline JavaScript, so only the exact formats are allowed. $gtmId = ($gtm['enabled'] ?? false) && preg_match('/\AGTM-[A-Z0-9]+\z/', (string) ($gtm['container_id'] ?? '')) ? $gtm['container_id'] : null; $pixelId = ($pixel['enabled'] ?? false) && preg_match('/\A[0-9]+\z/', (string) ($pixel['pixel_id'] ?? '')) ? $pixel['pixel_id'] : null; @endphp <!DOCTYPE html> <html lang="en" data-bs-theme="light"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="csrf-token" content="{{ csrf_token() }}"> <title>{{ $pageTitle }} — {{ $brand }} @if ($description) @endif @if ($metaDescription ?? $seo['og_description'] ?? $description) @endif {{-- Noto Sans Bengali draws the Bangla letters; English keeps the system font (see --bs-font-sans-serif in saruar-mart.min.css). --}} {{ $head ?? '' }} {{-- In the head so a dismissed bar is never painted; saruar-mart.min.js only loads after both CDN files. --}} @if ($structuredData) @endif @if ($gtmId) @endif @if ($pixelId) @endif Skip to main content {{ $header ?? '' }}
{{ $slot }}
{{ $scripts ?? '' }}