97 lines
5.0 KiB
PHP
97 lines
5.0 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" dir="{{ get_direction() }}" data-calendar="{{ session('calendar', 'jalali') }}">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
|
|
<title>{{ isset($pageTitle) ? $pageTitle . ' - ' : '' }}{{ config('app.name') }}</title>
|
|
|
|
<!-- Fonts -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
|
|
<!-- Vite -->
|
|
@vite(['resources/css/app.css', 'resources/js/app.js'])
|
|
|
|
<style>
|
|
[dir="rtl"] body { font-family: 'Vazirmatn', sans-serif; }
|
|
[dir="ltr"] body { font-family: 'Inter', 'Vazirmatn', sans-serif; }
|
|
</style>
|
|
|
|
@stack('styles')
|
|
|
|
<!-- Jalali Date Picker CSS (only when calendar is jalali) -->
|
|
@if(session('calendar', 'jalali') === 'jalali')
|
|
<link rel="stylesheet" href="{{ asset('css/jalali-datepicker.css') }}">
|
|
@endif
|
|
</head>
|
|
<body class="bg-gray-50 text-gray-900 antialiased">
|
|
|
|
<!-- Alpine.js Store -->
|
|
<div x-data="{ sidebarOpen: window.innerWidth >= 1024 }" class="min-h-screen flex">
|
|
|
|
<!-- Sidebar -->
|
|
@include('layouts.sidebar')
|
|
|
|
<!-- Main Content Area -->
|
|
<div class="flex-1 flex flex-col min-w-0" :class="{ 'ltr:ml-64 rtl:mr-64': sidebarOpen && window.innerWidth >= 1024 }">
|
|
|
|
<!-- Header -->
|
|
@include('layouts.header')
|
|
|
|
<!-- Page Content -->
|
|
<main class="flex-1 p-4 md:p-6 lg:p-8">
|
|
@if(session('success'))
|
|
<div x-data="{ show: true }" x-init="setTimeout(() => show = false, 5000)" x-show="show"
|
|
x-transition class="mb-4 p-4 bg-emerald-50 border border-emerald-200 rounded-lg text-emerald-700 flex items-center justify-between">
|
|
<span>{{ session('success') }}</span>
|
|
<button @click="show = false" class="text-emerald-500 hover:text-emerald-700">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
|
|
@if(session('error'))
|
|
<div x-data="{ show: true }" x-init="setTimeout(() => show = false, 5000)" x-show="show"
|
|
x-transition class="mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700 flex items-center justify-between">
|
|
<span>{{ session('error') }}</span>
|
|
<button @click="show = false" class="text-red-500 hover:text-red-700">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/></svg>
|
|
</button>
|
|
</div>
|
|
@endif
|
|
|
|
@yield('content')
|
|
</main>
|
|
|
|
<!-- Sticky Footer -->
|
|
<footer class="bg-white border-t border-gray-200 px-4 py-3 mt-auto">
|
|
<div class="flex flex-col sm:flex-row items-center justify-between gap-2 text-xs text-gray-500">
|
|
<span>© {{ persian_num(date('Y')) }} Vernova — {{ __('common.all_rights_reserved') }}</span>
|
|
<div class="flex items-center gap-4">
|
|
<span>
|
|
<svg class="w-3 h-3 inline-block me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"/></svg>
|
|
{{ session('calendar', config('Vernova.defaults.calendar', 'jalali')) === 'jalali' ? __('calendar.jalali') : __('calendar.gregorian') }}
|
|
</span>
|
|
<span>
|
|
<svg class="w-3 h-3 inline-block me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h2M3 17h2M3 11h18M3 23h18M7 5h14M7 17h14"/></svg>
|
|
{{ strtoupper(session('currency', config('Vernova.defaults.currency', 'IRR'))) }}
|
|
</span>
|
|
<span>{{ app()->getLocale() === 'fa' ? 'فارسی' : 'English' }}</span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
|
|
@stack('scripts')
|
|
|
|
<!-- Jalali Date Picker JS (only when calendar is jalali) -->
|
|
@if(session('calendar', 'jalali') === 'jalali')
|
|
<script src="{{ asset('js/jalali-datepicker.js') }}"></script>
|
|
@endif
|
|
</body>
|
|
</html>
|