@php try { $siteTitle = \App\Models\Setting::get('site_title'); $faviconPath = \App\Models\Setting::get('site_favicon'); $metaDescription = \App\Models\Setting::get('meta_description'); $metaKeywords = \App\Models\Setting::get('meta_keywords'); $siteMeta = \App\Models\Setting::get('site_meta'); $publicMetaImagePath = \App\Models\Setting::get('public_meta_image'); } catch (\Throwable $e) { $siteTitle = config('app.name', 'MailPurse'); $faviconPath = null; $metaDescription = null; $metaKeywords = null; $siteMeta = null; $publicMetaImagePath = null; } if (!is_string($siteTitle) || trim($siteTitle) === '') { $siteTitle = config('app.name', 'MailPurse'); } $pageTitle = trim((string) $__env->yieldContent('title')); if ($pageTitle === '') { $pageTitle = 'Home'; } $fullTitle = $pageTitle . ' - ' . $siteTitle; $brandingDisk = (string) config('filesystems.branding_disk', 'public'); $faviconUrl = null; if (is_string($faviconPath) && trim($faviconPath) !== '') { $faviconUrl = $brandingDisk === 'public' ? asset('storage/' . ltrim($faviconPath, '/')) : \Illuminate\Support\Facades\Storage::disk($brandingDisk)->url($faviconPath); } $overrideMetaDescription = trim((string) $__env->yieldContent('metaDescription')); $pageMetaDescription = $overrideMetaDescription !== '' ? $overrideMetaDescription : $metaDescription; $pageMetaDescription = is_string($pageMetaDescription) ? trim((string) $pageMetaDescription) : null; $overrideMetaImage = trim((string) $__env->yieldContent('metaImage')); $metaImageUrl = null; if ($overrideMetaImage !== '') { $metaImageUrl = $overrideMetaImage; } elseif (is_string($publicMetaImagePath) && trim($publicMetaImagePath) !== '') { $metaImageUrl = $brandingDisk === 'public' ? asset('storage/' . ltrim($publicMetaImagePath, '/')) : \Illuminate\Support\Facades\Storage::disk($brandingDisk)->url($publicMetaImagePath); } $overrideOgType = trim((string) $__env->yieldContent('ogType')); $ogType = $overrideOgType !== '' ? $overrideOgType : 'website'; $twitterCard = is_string($metaImageUrl) && trim($metaImageUrl) !== '' ? 'summary_large_image' : 'summary'; @endphp @if(is_string($pageMetaDescription) && trim($pageMetaDescription) !== '') @endif @if(is_string($metaKeywords) && trim((string) $metaKeywords) !== '') @endif @if(is_string($faviconUrl) && trim($faviconUrl) !== '') @endif @if(is_string($pageMetaDescription) && trim($pageMetaDescription) !== '') @endif @if(is_string($metaImageUrl) && trim($metaImageUrl) !== '') @endif @if(is_string($pageMetaDescription) && trim($pageMetaDescription) !== '') @endif @if(is_string($siteMeta) && trim($siteMeta) !== '' && preg_match('/<\s*(meta|link|script|style|base|noscript)\b/i', $siteMeta)) @php $siteMetaSafe = ''; if (preg_match_all('/<\s*(meta|link|base)\b[^>]*\/?>/i', $siteMeta, $m1)) { $siteMetaSafe .= implode("\n", $m1[0]) . "\n"; } if (preg_match_all('/<\s*(script|style|noscript)\b[^>]*>.*?<\s*\/\s*\\1\s*>/is', $siteMeta, $m2)) { $siteMetaSafe .= implode("\n", $m2[0]) . "\n"; } $siteMetaSafe = trim($siteMetaSafe); @endphp @if($siteMetaSafe !== '') {!! $siteMetaSafe !!} @endif @endif {{ $fullTitle }} @vite(['resources/css/app.css', 'resources/js/app.js']) @php try { $brandColor = \App\Models\Setting::get('brand_color', '#3b82f6'); } catch (\Throwable $e) { $brandColor = '#3b82f6'; } $brandColor = is_string($brandColor) ? trim($brandColor) : '#3b82f6'; if ($brandColor === '' || !preg_match('/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/', $brandColor)) { $brandColor = '#3b82f6'; } $brandHex = ltrim($brandColor, '#'); if (strlen($brandHex) === 3) { $brandHex = $brandHex[0] . $brandHex[0] . $brandHex[1] . $brandHex[1] . $brandHex[2] . $brandHex[2]; } $brandR = hexdec(substr($brandHex, 0, 2)); $brandG = hexdec(substr($brandHex, 2, 2)); $brandB = hexdec(substr($brandHex, 4, 2)); @endphp @php $navTheme = isset($navTheme) && is_string($navTheme) ? trim($navTheme) : 'light'; $navTheme = in_array($navTheme, ['light', 'dark'], true) ? $navTheme : 'light'; $navIsDark = $navTheme === 'dark'; try { $publicHeaderSticky = (bool) \App\Models\Setting::get('public_header_sticky', 0); } catch (\Throwable $e) { $publicHeaderSticky = false; } $navShellClass = $navIsDark ? 'bg-slate-950 border-slate-800' : 'bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700'; $navLinkClass = $navIsDark ? 'border-transparent text-slate-200 hover:border-slate-700 hover:text-white' : 'border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300'; $navLinkActiveClass = $navIsDark ? 'border-primary-500 text-white' : 'border-primary-500 text-gray-900 dark:text-gray-100'; $navDropdownClass = $navIsDark ? 'border-slate-800 bg-slate-950' : 'border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800'; $navDropdownItemClass = $navIsDark ? 'text-slate-200 hover:bg-slate-900' : 'text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700'; @endphp
Menu
@if(isset($navShowHomeDropdown) && $navShowHomeDropdown && isset($homePageVariant) && $homePageVariant === 'all')
Home
@if(isset($navShowHome1) && $navShowHome1) Home 1 @endif @if(isset($navShowHome2) && $navShowHome2) Home 2 @endif @if(isset($navShowHome3) && $navShowHome3) Home 3 @endif @if(isset($navShowHome4) && $navShowHome4) Home 4 @endif {{-- @if(isset($navShowHome5) && $navShowHome5) Home 5 @endif --}} @else Home @endif
@if(isset($navShowFeatures) && $navShowFeatures) Features @endif @if(isset($navShowPricing) && $navShowPricing) Pricing @endif @if(isset($navShowBlog) && $navShowBlog) Blog @endif @if (isset($navShowRoadmap) && $navShowRoadmap && \Illuminate\Support\Facades\Route::has('roadmap')) Roadmap @endif @if (isset($navShowDocs) && $navShowDocs && \Illuminate\Support\Facades\Route::has('docs')) Docs @endif @if (isset($navShowApiDocs) && $navShowApiDocs && \Illuminate\Support\Facades\Route::has('api.docs.public')) API Docs @endif
@auth('customer') Dashboard @else Login Sign Up @endauth
@yield('content')
@php try { $gdprTitle = (string) \App\Models\Setting::get('gdpr_notice_title', 'We value your privacy'); $gdprDescription = (string) \App\Models\Setting::get('gdpr_notice_description', 'We use cookies and similar technologies to improve your experience. You can accept or decline.'); $gdprAcceptText = (string) \App\Models\Setting::get('gdpr_notice_accept_text', 'Accept'); $gdprDeclineText = (string) \App\Models\Setting::get('gdpr_notice_decline_text', 'Decline'); $gdprPosition = (string) \App\Models\Setting::get('gdpr_notice_position', 'bottom_full_width'); $gdprDelaySeconds = \App\Models\Setting::get('gdpr_notice_delay_seconds', 0); } catch (\Throwable $e) { $gdprTitle = 'We value your privacy'; $gdprDescription = 'We use cookies and similar technologies to improve your experience. You can accept or decline.'; $gdprAcceptText = 'Accept'; $gdprDeclineText = 'Decline'; $gdprPosition = 'bottom_full_width'; $gdprDelaySeconds = 0; } $gdprTitle = is_string($gdprTitle) ? trim($gdprTitle) : 'We value your privacy'; $gdprDescription = is_string($gdprDescription) ? trim($gdprDescription) : ''; $gdprAcceptText = is_string($gdprAcceptText) ? trim($gdprAcceptText) : 'Accept'; $gdprDeclineText = is_string($gdprDeclineText) ? trim($gdprDeclineText) : 'Decline'; $gdprPosition = is_string($gdprPosition) ? trim($gdprPosition) : 'bottom_full_width'; $gdprDelaySeconds = is_numeric($gdprDelaySeconds) ? (int) $gdprDelaySeconds : 0; if ($gdprDelaySeconds < 0) { $gdprDelaySeconds = 0; } if (!in_array($gdprPosition, ['bottom_left', 'bottom_right', 'bottom_full_width'], true)) { $gdprPosition = 'bottom_full_width'; } $gdprDelayMs = $gdprDelaySeconds * 1000; $gdprOuterClass = match ($gdprPosition) { 'bottom_left' => 'left-4 bottom-4 max-w-md', 'bottom_right' => 'right-4 bottom-4 max-w-md', default => 'left-0 right-0 bottom-0 w-full', }; $gdprInnerWrapClass = $gdprPosition === 'bottom_full_width' ? 'mx-auto max-w-5xl px-4 sm:px-6 lg:px-8 pb-4' : ''; $gdprCardClass = $gdprPosition === 'bottom_full_width' ? 'rounded-t-xl sm:rounded-xl' : 'rounded-xl'; @endphp @stack('scripts')