sidebar.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Sidebar -->
  2. <div :class="sidebarOpen ? 'translate-x-0' : '-translate-x-full'"
  3. class="fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-xl transform transition-transform duration-300 ease-in-out lg:translate-x-0 lg:static lg:inset-0">
  4. <div class="flex items-center justify-center h-16 bg-gradient-to-r from-blue-600 to-blue-700">
  5. <h1 class="text-xl font-bold text-white">Admin Panel</h1>
  6. </div>
  7. <nav class="mt-6">
  8. <div class="px-4 space-y-1">
  9. <?php
  10. $currentUri = $_SERVER['REQUEST_URI'];
  11. $isIndex = (strpos($currentUri, '/admin/pages/') === false && strpos($currentUri, '/admin/slots/') === false && strpos($currentUri, '/admin/authors/') === false && strpos($currentUri, '/admin/') !== false);
  12. $isPages = (strpos($currentUri, '/admin/pages/') !== false);
  13. $isSlots = (strpos($currentUri, '/admin/slots/') !== false);
  14. $isAuthors = (strpos($currentUri, '/admin/authors/') !== false);
  15. ?>
  16. <a href="/admin/" class="<?= $isIndex ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
  17. <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
  18. <path d="M3 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V4zM3 10a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H4a1 1 0 01-1-1v-6zM14 9a1 1 0 00-1 1v6a1 1 0 001 1h2a1 1 0 001-1v-6a1 1 0 00-1-1h-2z"/>
  19. </svg>
  20. Site Settings
  21. </a>
  22. <a href="/admin/pages/" class="<?= $isPages ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
  23. <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
  24. <path fill-rule="evenodd" d="M4 4a2 2 0 012-2h4.586A2 2 0 0112 2.586L15.414 6A2 2 0 0116 7.414V16a2 2 0 01-2 2H6a2 2 0 01-2-2V4zm2 6a1 1 0 011-1h6a1 1 0 110 2H7a1 1 0 01-1-1zm1 3a1 1 0 100 2h6a1 1 0 100-2H7z" clip-rule="evenodd"/>
  25. </svg>
  26. Dynamic Pages
  27. </a>
  28. <a href="/admin/slots/" class="<?= $isSlots ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
  29. <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
  30. <path fill-rule="evenodd" d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" clip-rule="evenodd"/>
  31. </svg>
  32. Casino Slots
  33. </a>
  34. <a href="/admin/authors/" class="<?= $isAuthors ? 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-blue-700 bg-blue-50 border-r-4 border-blue-700' : 'group flex items-center px-3 py-2 text-sm font-medium rounded-lg text-gray-600 hover:text-gray-900 hover:bg-gray-50 transition-colors' ?>">
  35. <svg class="mr-3 h-5 w-5" fill="currentColor" viewBox="0 0 20 20">
  36. <path fill-rule="evenodd" d="M10 9a3 3 0 100-6 3 3 0 000 6zm-7 9a7 7 0 1114 0H3z" clip-rule="evenodd"/>
  37. </svg>
  38. Authors
  39. </a>
  40. </div>
  41. </nav>
  42. </div>