File manager - Edit - /var/www/ratemypay_dev/storage/framework/views/ca3be6db58bca945ca2b188b3ab45811.php
Back
<header class="w-full <?php if(isset($is_business_home)): ?> bg-white/95 <?php else: ?> bg-white <?php endif; ?> border-b border-gray-100 fixed top-0 z-50 h-[80px] flex items-center transition-all duration-300"> <div class="w-full max-w-[1300px] mx-auto px-6 md:px-0 flex items-center justify-between"> <a href="<?php echo e(url('/')); ?>" class="flex items-center w-1/3"> <img src="<?php echo e(asset('logo.png')); ?>" alt="<?php echo e(config('app.name', 'Laravel')); ?>" class="h-6 w-auto"> </a> <?php // URL-based context (for unauthenticated visitors) $isBusinessUrl = request()->is('business') || request()->is('business/*'); // Auth-based context (for logged-in business users on any page) $isBusinessUser = auth()->check() && auth()->user()->account_type === 'business'; // Combined: true if on a business URL OR logged in as a business user $isBusinessContext = $isBusinessUrl || $isBusinessUser; // These are only used in the @else (guest) block, but kept correct // so the right links appear even if the session unexpectedly drops $loginUrl = $isBusinessContext ? route('business.login') : route('login'); $registerUrl = $isBusinessContext ? route('business.register') : route('register'); $navLinks = [ ['label' => 'Individual', 'href' => url('/'), 'active' => request()->is('/')], ['label' => 'Business', 'href' => route('business'), 'active' => $isBusinessUrl], ]; ?> <nav class="hidden md:flex items-center gap-1 w-1/3 justify-center"> <?php $__currentLoopData = $navLinks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $link): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <a href="<?php echo e($link['href']); ?>" class="relative px-4 pt-2 pb-3 text-sm font-medium transition-colors duration-200 <?php echo e($link['active'] ? 'text-[#2F3D7E]' : 'text-gray-500 hover:text-[#2F3D7E]'); ?>"> <?php echo e($link['label']); ?> <?php if($link['active']): ?> <span class="active-link"> <svg width="37" height="7" viewBox="0 0 37 7" fill="none" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="3.3182" cy="3.3871" rx="3.3182" ry="3.3871" fill="#F76B5C"/> <rect x="11.0625" width="25.4395" height="6.77419" rx="3.3871" fill="#2F3D7E"/> </svg> </span> <?php endif; ?> </a> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </nav> <div class="hidden md:flex items-center gap-3 w-1/3 justify-end"> <?php if(auth()->guard()->check()): ?> <div class="relative"> <button type="button" id="user-menu-button" class="flex items-center gap-2 px-4 py-2 rounded-full hover:bg-gray-50 transition-all duration-200"> <img src="https://ui-avatars.com/api/?name=<?php echo e(urlencode(auth()->user()->organization->name)); ?>&background=2F3D7E&color=fff" alt="User" class="w-8 h-8 rounded-full"> <span class="text-sm font-medium text-gray-700"> <?php echo e(auth()->user()->organization->name); ?></span> <svg class="w-4 h-4 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7" /> </svg> </button> <div id="user-menu-dropdown" class="hidden absolute right-0 mt-2 w-48 bg-white shadow-lg rounded-xl py-2 border border-gray-100" style="z-index: 9999;"> <a href="<?php echo e(route('dashboard.index')); ?>" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition">Dashboard</a> <a href="<?php echo e(route('logout')); ?>" onclick="event.preventDefault(); document.getElementById('logout-form').submit();" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 transition">Logout</a> <form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST" class="hidden"> <?php echo csrf_field(); ?> </form> </div> </div> <?php else: ?> <a href="<?php echo e($loginUrl); ?>" class="h-10 px-4 text-sm font-medium text-gray-600 hover:text-[#2F3D7E] flex items-center rounded-full hover:bg-gray-50 transition-all"> Login </a> <a href="<?php echo e($registerUrl); ?>" class="h-10 px-5 text-sm font-medium bg-[#2F3D7E] hover:bg-[#1E2858] text-white hover:text-white rounded-xl flex items-center gap-2 shadow-lg shadow-blue-900/10 transition-all group"> Register </a> <?php endif; ?> </div> <button type="button" id="mobile-menu-button" class="md:hidden p-2 text-gray-600 hover:bg-gray-100 rounded-lg transition-colors"> <svg class="w-6 h-6" 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> </div> <nav id="mobile-menu" class="hidden absolute top-[80px] left-0 w-full bg-white border-b border-gray-100 p-6 flex-col gap-4 md:hidden shadow-xl animate-in slide-in-from-top-5 duration-200"> <a href="<?php echo e(url('/')); ?>" class="text-lg font-medium text-gray-700 py-2 border-b border-gray-50">Individual</a> <a href="<?php echo e(route('business')); ?>" class="text-lg font-medium text-gray-700 py-2 border-b border-gray-50">Business</a> <div class="flex flex-col gap-3 mt-4"> <?php if(auth()->guard()->check()): ?> <a href="<?php echo e(route('dashboard.index')); ?>" class="w-full py-3 text-center border border-gray-200 rounded-lg text-sm font-medium hover:bg-gray-50 transition">Dashboard</a> <a href="<?php echo e(route('logout')); ?>" onclick="event.preventDefault(); document.getElementById('logout-form-mobile').submit();" class="w-full py-3 text-center bg-[#2F3D7E] text-white rounded-lg text-sm font-medium hover:bg-[#1E2858] transition">Logout</a> <form id="logout-form-mobile" action="<?php echo e(route('logout')); ?>" method="POST" class="hidden"> <?php echo csrf_field(); ?> </form> <?php else: ?> <a href="<?php echo e($loginUrl); ?>" class="w-full py-3 text-center border border-gray-200 rounded-lg text-sm font-medium hover:bg-gray-50 transition">Log in</a> <a href="<?php echo e($registerUrl); ?>" class="w-full py-3 text-center border border-gray-200 rounded-lg text-sm font-medium hover:bg-gray-50 transition">Sign Up</a> <a href="<?php echo e(route('see-salary')); ?>" class="w-full py-3 text-center bg-[#2F3D7E] text-white rounded-lg text-sm font-medium hover:bg-[#1E2858] transition">See Salaries</a> <?php endif; ?> </div> </nav> </header> <?php if(auth()->guard()->check()): ?> <script> // User menu dropdown toggle const userMenuButton = document.getElementById('user-menu-button'); const userMenuDropdown = document.getElementById('user-menu-dropdown'); if (userMenuButton && userMenuDropdown) { userMenuButton.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); console.log('Button clicked'); // Debug log userMenuDropdown.classList.toggle('block'); }); // Close dropdown when clicking outside document.addEventListener('click', function(event) { if (!userMenuButton.contains(event.target) && !userMenuDropdown.contains(event.target)) { userMenuDropdown.classList.add('hidden'); } }); } </script> <?php endif; ?> <script> // Mobile menu toggle const mobileMenuButton = document.getElementById('mobile-menu-button'); const mobileMenu = document.getElementById('mobile-menu'); if (mobileMenuButton && mobileMenu) { mobileMenuButton.addEventListener('click', function() { // mobileMenu.classList.toggle('hidden'); mobileMenu.classList.toggle('flex'); }); } </script> <?php /**PATH /var/www/ratemypay_dev/resources/views/components/business_header.blade.php ENDPATH**/ ?>
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings