@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
{{ $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 }}