vernova/storage/framework/views/42fce2afce1274cac2c89c79739f9fc3.php
2026-07-26 19:58:27 +03:30

118 lines
8.2 KiB
PHP

<!-- Header -->
<header class="sticky top-0 z-10 bg-white/80 backdrop-blur-md border-b border-gray-200">
<div class="flex items-center justify-between h-16 px-4 md:px-6">
<!-- Mobile Menu Button -->
<button @click="sidebarOpen = !sidebarOpen" class="lg:hidden p-2 -ms-2 text-gray-500 hover:text-gray-900 rounded-lg hover:bg-gray-100">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"/>
</svg>
</button>
<!-- Greeting + Date -->
<div class="hidden sm:flex flex-col">
<span class="text-sm font-medium text-gray-900">
<?php
$hour = now()->hour;
$greeting = $hour < 12 ? __('common.good_morning') : ($hour < 18 ? __('common.good_afternoon') : __('common.good_evening'));
?>
<?php echo e($greeting); ?>, <?php echo e(auth()->user()->name); ?>
</span>
<span class="text-xs text-gray-500">
<?php echo e(calendar_date(now())); ?>
</span>
</div>
<!-- Right Side Actions -->
<div class="flex items-center gap-2">
<!-- Locale Switcher -->
<div x-data="{ open: false }" class="relative">
<button @click="open = !open" class="flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors">
<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="M3.055 11H5a2 2 0 012 2v1a2 2 0 002 2 2 2 0 012 2v2.945M8 3.935V5.5A2.5 2.5 0 0010.5 8h.5a2 2 0 012 2 2 2 0 104 0 2 2 0 012-2h1.064M15 20.488V18a2 2 0 012-2h3.064M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<span><?php echo e(app()->getLocale() === 'fa' ? 'فا' : 'EN'); ?></span>
</button>
<div x-show="open" @click.away="open = false" x-transition
class="absolute end-0 mt-2 w-36 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50">
<form method="POST" action="<?php echo e(route('locale.update')); ?>">
<?php echo csrf_field(); ?>
<button type="submit" name="locale" value="fa"
class="w-full text-start px-4 py-2 text-sm <?php echo e(app()->getLocale() === 'fa' ? 'bg-teal-50 text-teal-700 font-medium' : 'text-gray-700 hover:bg-gray-50'); ?>">
فارسی
</button>
</form>
<form method="POST" action="<?php echo e(route('locale.update')); ?>">
<?php echo csrf_field(); ?>
<button type="submit" name="locale" value="en"
class="w-full text-start px-4 py-2 text-sm <?php echo e(app()->getLocale() === 'en' ? 'bg-teal-50 text-teal-700 font-medium' : 'text-gray-700 hover:bg-gray-50'); ?>">
English
</button>
</form>
</div>
</div>
<!-- Calendar Switcher -->
<div x-data="{ open: false }" class="relative">
<button @click="open = !open" class="flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors">
<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="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>
<span><?php echo e(session('calendar', 'jalali') === 'jalali' ? __('calendar.jalali') : __('calendar.gregorian')); ?></span>
</button>
<div x-show="open" @click.away="open = false" x-transition
class="absolute end-0 mt-2 w-40 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50">
<form method="POST" action="<?php echo e(route('calendar.update')); ?>">
<?php echo csrf_field(); ?>
<button type="submit" name="calendar" value="jalali"
class="w-full text-start px-4 py-2 text-sm <?php echo e(session('calendar', 'jalali') === 'jalali' ? 'bg-teal-50 text-teal-700 font-medium' : 'text-gray-700 hover:bg-gray-50'); ?>">
<?php echo e(__('calendar.jalali')); ?>
</button>
</form>
<form method="POST" action="<?php echo e(route('calendar.update')); ?>">
<?php echo csrf_field(); ?>
<button type="submit" name="calendar" value="gregorian"
class="w-full text-start px-4 py-2 text-sm <?php echo e(session('calendar', 'gregorian') === 'gregorian' ? 'bg-teal-50 text-teal-700 font-medium' : 'text-gray-700 hover:bg-gray-50'); ?>">
<?php echo e(__('calendar.gregorian')); ?>
</button>
</form>
</div>
</div>
<!-- Currency Switcher -->
<div x-data="{ open: false }" class="relative">
<button @click="open = !open" class="flex items-center gap-1.5 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 bg-gray-50 hover:bg-gray-100 rounded-lg transition-colors">
<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="M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/>
</svg>
<span><?php echo e(strtoupper(session('currency', config('projectra.defaults.currency', 'IRR')))); ?></span>
</button>
<div x-show="open" @click.away="open = false" x-transition
class="absolute end-0 mt-2 w-44 bg-white rounded-lg shadow-lg border border-gray-200 py-1 z-50">
<?php $__currentLoopData = ['IRR', 'USD', 'EUR', 'AED']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $curr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<form method="POST" action="<?php echo e(route('currency.update')); ?>">
<?php echo csrf_field(); ?>
<button type="submit" name="currency" value="<?php echo e($curr); ?>"
class="w-full text-start px-4 py-2 text-sm <?php echo e(session('currency', 'IRR') === $curr ? 'bg-teal-50 text-teal-700 font-medium' : 'text-gray-700 hover:bg-gray-50'); ?>">
<?php echo e(__('currency.code_' . strtolower($curr))); ?> (<?php echo e($curr); ?>)
</button>
</form>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<!-- Notifications -->
<button class="relative p-2 text-gray-500 hover:text-gray-900 hover:bg-gray-100 rounded-lg transition-colors">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"/>
</svg>
<span class="absolute top-1.5 end-1.5 w-2 h-2 bg-red-500 rounded-full"></span>
</button>
</div>
</div>
</header>
<?php /**PATH C:\xampp\htdocs\projectra\resources\views/layouts/header.blade.php ENDPATH**/ ?>