Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

main.blade.php 2.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <!DOCTYPE html>
  2. <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Dashboard</title>
  7. <link rel="preconnect" href="https://fonts.bunny.net">
  8. <link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
  9. @vite(['resources/css/app.css', 'resources/js/app.js'])
  10. <script defer src="https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"></script>
  11. </head>
  12. <body class="antialiased bg-gray-100 text-gray-800">
  13. <div x-data="{ sidebarOpen: true }" class="min-h-screen flex">
  14. <!-- Sidebar -->
  15. <div :class="sidebarOpen ? 'w-64' : 'w-16'" class="bg-white border-r border-gray-200 transition-all duration-300 flex flex-col">
  16. <div class="p-4 flex justify-between items-center">
  17. <span x-show="sidebarOpen" class="font-bold text-lg">Dashboard</span>
  18. <button @click="sidebarOpen = !sidebarOpen" class="text-gray-600 focus:outline-none">
  19. <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  20. <path :class="sidebarOpen ? 'block' : 'hidden'" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
  21. <path :class="!sidebarOpen ? 'block' : 'hidden'" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
  22. </svg>
  23. </button>
  24. </div>
  25. <nav class="flex-1 px-2 space-y-2" x-show="sidebarOpen">
  26. <!-- Dashboard -->
  27. <a href="#" class="block px-4 py-2 rounded hover:bg-gray-200">
  28. Dashboard
  29. </a>
  30. <!-- Projects (with children) -->
  31. <div x-data="{ open: false }" class="space-y-1">
  32. <button
  33. @click="open = !open"
  34. class="w-full flex justify-between items-center px-4 py-2 rounded hover:bg-gray-200 text-left"
  35. >
  36. <span>Projects</span>
  37. <svg :class="{'rotate-90': open}" class="w-4 h-4 transition-transform" fill="none" stroke="currentColor" viewBox="0 0 24 24">
  38. <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
  39. </svg>
  40. </button>
  41. <div x-show="open" x-transition class="pl-6">
  42. <a href="#" class="block px-2 py-1 rounded hover:bg-gray-100">All Projects</a>
  43. <a href="#" class="block px-2 py-1 rounded hover:bg-gray-100">Create Project</a>
  44. </div>
  45. </div>
  46. <!-- Settings -->
  47. <a href="#" class="block px-4 py-2 rounded hover:bg-gray-200">
  48. Settings
  49. </a>
  50. </nav>
  51. </div>
  52. <!-- Content -->
  53. <div class="flex-1 p-6">
  54. @yield('content')
  55. </div>
  56. @yield('scripts')
  57. </div>
  58. </body>
  59. </html>