File: /home/u756937133/domains/swingersnest.com/public_html/resources/views/layouts/admin.blade.php
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}" class="scroll-smooth">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title', 'Admin Panel - ' . config('app.name'))</title>
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="icon" type="image/svg+xml" href="{{ asset('favicon.svg') }}">
<!-- Remix Icons CDN -->
<link href="https://cdn.jsdelivr.net/npm/remixicon@4.7.0/fonts/remixicon.css" rel="stylesheet" />
<style>
/* Ensure RemixIcon icons display correctly */
[class^="ri-"], [class*=" ri-"] {
font-family: 'remixicon' !important;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: inline-block;
}
</style>
<!-- Google Font: Poppins -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet" />
<style>
.poppins {
font-family: "Poppins";
}
body {
font-family: Arial, Helvetica, sans-serif;
display: flex;
}
</style>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
@stack('head')
</head>
<body>
{{-- Profile Pending Approval Bar (only for non-admin users) --}}
@auth
@if(!Auth::user()->is_active && !Auth::user()->is_admin)
<div class="w-full bg-red-600 text-white py-3 px-4 shadow-md">
<div class="flex items-center justify-center gap-3">
<i class="ri-alert-line text-xl"></i>
<p class="font-semibold">
Your profile is pending admin approval. You will be able to access all features once your profile is approved.
</p>
</div>
</div>
@endif
@endauth
<div class="flex flex-col md:flex-row gap-4 w-full">
<!-- Sidebar -->
<aside id="admin-sidebar" class="min-h-screen md:min-w-[290px] w-full md:w-auto md:min-w-[70px] items-center gap-5 flex flex-col py-4 md:py-14 bg-[#FFF5F7] fixed md:relative top-0 left-0 z-40 transform -translate-x-full md:translate-x-0 transition-transform duration-300">
<!-- Logo -->
@php
$isAdmin = Auth::user()->is_admin ?? false;
$routePrefix = $isAdmin ? 'admin' : 'editor';
@endphp
<a href="{{ route($routePrefix . '.dashboard') }}">
<img src="{{ asset('admin-assets/Logo.png') }}" class="md:hidden block w-[20px]" alt="Logo" />
<img src="{{ asset('admin-assets/logo1.png') }}" class="md:w-[170px] md:block hidden" width="170" alt="Logo" />
</a>
<!-- Navigation Tabs -->
<div class="flex gap-3 md:w-[90%] w-[50px] flex-col">
@php
$isAdmin = Auth::user()->is_admin ?? false;
$isEditor = Auth::user()->is_editor ?? false;
$routePrefix = $isAdmin ? 'admin' : 'editor';
@endphp
<!-- Dashboard -->
<a href="{{ route($routePrefix . '.dashboard') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-1 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.dashboard') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex items-center gap-3">
<i class="ri-dashboard-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Dashboard</h2>
</div>
</div>
</a>
<!-- User Management -->
<a href="{{ route($routePrefix . '.users.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.users.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/Users.png') }}" width="20" alt="Users" />
<h2 class="text-[17px] md:block hidden font-normal">User Management</h2>
</div>
</div>
</a>
@if($isAdmin)
<!-- Verification Center - Hidden for now -->
{{-- <a href="{{ route('admin.verification.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.verification.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/verification.png') }}" width="20" alt="Verification" />
<h2 class="text-[17px] md:block hidden font-normal">Verification Center</h2>
</div>
</div>
</a> --}}
<!-- Listings Management -->
<a href="{{ route('admin.listings.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.listings.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-store-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Listings Management</h2>
</div>
</div>
</a>
<!-- Reported Users -->
<a href="{{ route('admin.reported-users.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] group {{ request()->routeIs('admin.reported-users.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white items-center">
<img src="{{ asset('admin-assets/report.png') }}" width="20" alt="Report" class="group-hover:brightness-100" />
<h2 class="text-[17px] md:block hidden font-normal">Reported Users</h2>
</div>
</div>
</a>
<!-- Registration Control -->
<a href="{{ route('admin.registration-control.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.registration-control.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/register.png') }}" width="20" alt="Register" />
<h2 class="text-[17px] md:block hidden font-normal">Registration Control</h2>
</div>
</div>
</a>
<!-- Content Management -->
<a href="{{ route('admin.content-management.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.content-management.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/content.png') }}" width="20" alt="Content" />
<h2 class="text-[17px] md:block hidden font-normal">Content Management</h2>
</div>
</div>
</a>
<!-- Photo Moderation -->
<a href="{{ route('admin.photo-moderation.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.photo-moderation.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/photo.png') }}" width="20" alt="Photo" />
<h2 class="text-[17px] md:block hidden font-normal">Photo Moderation</h2>
</div>
</div>
</a>
@endif
<!-- Pages Management -->
<a href="{{ route($routePrefix . '.pages.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.pages.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-file-text-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Pages Management</h2>
</div>
</div>
</a>
<!-- Blog Management -->
<a href="{{ route($routePrefix . '.blog.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.blog.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-article-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Blog Management</h2>
</div>
</div>
</a>
<!-- Categories Management -->
<a href="{{ route($routePrefix . '.categories.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.categories.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-folder-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Categories</h2>
</div>
</div>
</a>
<!-- Tags Management -->
<a href="{{ route($routePrefix . '.tags.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs($routePrefix . '.tags.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-price-tag-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Tags</h2>
</div>
</div>
</a>
@if($isAdmin)
<!-- Subscription Plans -->
<a href="{{ route('admin.subscription-plans.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.subscription-plans.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-vip-card-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Subscription Plans</h2>
</div>
</div>
</a>
<!-- Language Translations -->
<a href="{{ route('admin.languages.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.languages.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-global-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Languages</h2>
</div>
</div>
</a>
<!-- Website Settings -->
<a href="{{ route('admin.settings.website') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.settings.website*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-global-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Website Settings</h2>
</div>
</div>
</a>
<!-- Robots.txt Management -->
<a href="{{ route('admin.settings.robots') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.settings.robots*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-file-text-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Robots.txt Management</h2>
</div>
</div>
</a>
<!-- Sitemap.xml Management -->
<a href="{{ route('admin.settings.sitemap') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.settings.sitemap*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-file-list-3-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Sitemap.xml Management</h2>
</div>
</div>
</a>
<!-- Settings -->
<a href="{{ route('admin.settings.general') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.settings.general*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<img src="{{ asset('admin-assets/settings.png') }}" width="20" alt="Settings" />
<h2 class="text-[17px] md:block hidden font-normal">Settings</h2>
</div>
</div>
</a>
<!-- Deployment -->
<a href="{{ route('admin.deployment.index') }}">
<div class="md:w-[229px] w-full rounded-2xl flex md:justify-start justify-center hover:shadow-md hover:text-white py-2 md:py-3 cursor-pointer md:rounded-3xl md:px-4 transition-all hover:bg-[#FF8FA3] {{ request()->routeIs('admin.deployment.*') ? 'bg-[#FF8FA3] text-white' : '' }}">
<div class="flex gap-3 hover:text-white hover:brightness-[100] items-center">
<i class="ri-rocket-line text-[20px]"></i>
<h2 class="text-[17px] md:block hidden font-normal">Deployment</h2>
</div>
</div>
</a>
@endif
</div>
</aside>
<main class="min-h-screen w-full md:pe-6">
<!-- Header -->
<header class="p-3 sm:p-4 md:p-6 h-auto md:h-[64px] justify-between flex flex-col md:flex-row items-start md:items-center gap-3 md:gap-0 border border-gray-200 shadow-[0px_1px_2px_-1px_#0000001A,0px_1px_3px_0px_#0000001A]">
<div class="flex items-center justify-between w-full md:w-auto">
<button id="mobile-menu-toggle" class="md:hidden p-2 text-gray-600 hover:bg-gray-100 rounded-lg" aria-label="Toggle menu">
<i class="ri-menu-line text-2xl"></i>
</button>
<h2 class="text-sm sm:text-base md:text-lg text-[#0A0A0A] font-medium font-['poppins']">@yield('page-title', 'Admin Dashboard')</h2>
<div class="md:hidden w-10"></div> <!-- Spacer for mobile alignment -->
</div>
<div class="gap-2 flex flex-wrap items-center w-full md:w-auto">
<img class="size-8 md:size-9 cursor-pointer" src="{{ asset('admin-assets/bell.png') }}" width="36" height="36" alt="bell" />
<!-- View Website Button -->
<a href="{{ route('home') }}" target="_blank" rel="noopener noreferrer" class="flex items-center gap-1.5 md:gap-2 px-2 md:px-3 py-1 md:py-1.5 bg-[#9810FA] hover:bg-[#E60076] text-white rounded-lg transition-colors text-xs md:text-sm font-medium shadow-sm hover:shadow-md" title="View Website - Opens in new tab">
<i class="ri-global-line text-sm md:text-base"></i>
<span class="hidden xl:inline">View Website</span>
<span class="xl:hidden hidden lg:inline text-xs">{{ parse_url(config('app.url'), PHP_URL_HOST) ?? 'Website' }}</span>
<span class="lg:hidden text-xs">Site</span>
</a>
<div class="pe-2 md:pe-4 border-l border-solid ps-2 md:ps-4 border-[#0000001A] flex gap-1.5 md:gap-2 items-center">
@if(Auth::user()->profile_image)
<img src="{{ asset('storage/' . Auth::user()->profile_image) }}" width="32" height="32" class="md:w-10 md:h-10 rounded-full" alt="user" />
@else
<img src="{{ asset('admin-assets/user.png') }}" width="32" height="32" class="md:w-10 md:h-10" alt="user" />
@endif
<div class="hidden sm:block">
<h2 class="text-[#0A0A0A] text-xs md:text-sm truncate max-w-[120px] md:max-w-none">{{ Auth::user()->name ?? 'Admin User' }}</h2>
<p class="text-[#717182] text-[10px] md:text-xs truncate max-w-[120px] md:max-w-none">{{ Auth::user()->email }}</p>
</div>
</div>
<form action="{{ route('logout') }}" method="POST" class="inline">
@csrf
<button type="submit" class="cursor-pointer">
<img src="{{ asset('admin-assets/logout.png') }}" class="size-8 md:size-9" width="36" height="36" alt="logout" />
</button>
</form>
</div>
</header>
<!-- Main Content -->
<div class="p-3 sm:p-4 md:p-6">
@if (session('success'))
<div class="mt-4 md:mt-6 mb-4 md:mb-6 rounded-lg border border-green-200 bg-green-50 px-3 md:px-4 py-2 md:py-3 text-sm md:text-base text-green-700">
{{ session('success') }}
</div>
@endif
@if ($errors->any())
<div class="mt-4 md:mt-6 mb-4 md:mb-6 rounded-lg border border-red-200 bg-red-50 px-3 md:px-4 py-2 md:py-3 text-xs md:text-sm text-red-700">
<p class="font-semibold">Please fix the following errors:</p>
<ul class="mt-2 list-disc space-y-1 pl-4 md:pl-5">
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@yield('content')
</div>
</main>
</div>
<!-- Mobile Menu Overlay -->
<div id="mobile-overlay" class="fixed inset-0 bg-black/50 z-30 hidden md:hidden"></div>
<script>
document.addEventListener('DOMContentLoaded', function() {
const menuToggle = document.getElementById('mobile-menu-toggle');
const sidebar = document.getElementById('admin-sidebar');
const overlay = document.getElementById('mobile-overlay');
if (menuToggle && sidebar && overlay) {
menuToggle.addEventListener('click', function() {
sidebar.classList.toggle('-translate-x-full');
overlay.classList.toggle('hidden');
});
overlay.addEventListener('click', function() {
sidebar.classList.add('-translate-x-full');
overlay.classList.add('hidden');
});
}
});
</script>
@include('components.toast')
@stack('modals')
@stack('scripts')
<!-- Load app.js for toast notifications -->
@vite(['resources/js/app.js'])
<!-- Verify RemixIcon is loaded -->
<script>
// Check if RemixIcon font is loaded
document.addEventListener('DOMContentLoaded', function() {
const testIcon = document.createElement('i');
testIcon.className = 'ri-check-line';
testIcon.style.position = 'absolute';
testIcon.style.visibility = 'hidden';
document.body.appendChild(testIcon);
const computedStyle = window.getComputedStyle(testIcon);
const fontFamily = computedStyle.fontFamily;
// If RemixIcon didn't load, try alternative CDN
if (!fontFamily.includes('remixicon') && !fontFamily.includes('RemixIcon')) {
const link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://unpkg.com/remixicon@4.7.0/fonts/remixicon.css';
document.head.appendChild(link);
}
document.body.removeChild(testIcon);
});
// Show toast notifications for session messages
document.addEventListener('DOMContentLoaded', function() {
@if(session('success'))
if (typeof showToast !== 'undefined') {
showToast('{{ session('success') }}', 'success');
}
@endif
@if(session('error'))
if (typeof showToast !== 'undefined') {
showToast('{{ session('error') }}', 'error');
}
@endif
@if($errors->any())
@foreach($errors->all() as $error)
if (typeof showToast !== 'undefined') {
showToast('{{ $error }}', 'error');
}
@endforeach
@endif
});
</script>
</body>
</html>