fedi-feed-router/resources/views/layouts/app.blade.php

112 lines
5.3 KiB
PHP

<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>{{ config('app.name', 'FFR') }}</title>
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
<!-- Scripts -->
@vite(['resources/css/app.css', 'resources/js/app.js'])
@livewireStyles
</head>
<body class="font-sans antialiased">
<div class="min-h-screen bg-gray-50" x-data="{ sidebarOpen: false }">
<!-- Mobile overlay -->
<div
x-show="sidebarOpen"
x-transition:enter="transition-opacity ease-linear duration-300"
x-transition:enter-start="opacity-0"
x-transition:enter-end="opacity-100"
x-transition:leave="transition-opacity ease-linear duration-300"
x-transition:leave-start="opacity-100"
x-transition:leave-end="opacity-0"
class="fixed inset-0 z-40 bg-gray-600/75 lg:hidden"
@click="sidebarOpen = false"
></div>
<!-- Mobile sidebar -->
<div
x-show="sidebarOpen"
x-transition:enter="transition ease-in-out duration-300 transform"
x-transition:enter-start="-translate-x-full"
x-transition:enter-end="translate-x-0"
x-transition:leave="transition ease-in-out duration-300 transform"
x-transition:leave-start="translate-x-0"
x-transition:leave-end="-translate-x-full"
class="fixed inset-y-0 left-0 z-50 w-64 bg-white shadow-lg lg:hidden"
>
<div class="flex items-center justify-between h-16 px-4 border-b border-gray-200">
<h1 class="text-xl font-bold text-gray-900">FFR</h1>
<button
@click="sidebarOpen = false"
class="p-2 rounded-md text-gray-400 hover:text-gray-600 hover:bg-gray-100"
>
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" />
</svg>
</button>
</div>
<nav class="mt-5 px-2">
@include('layouts.navigation-items')
</nav>
</div>
<!-- Desktop sidebar -->
<div class="hidden lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col">
<div class="flex flex-col flex-grow bg-white pt-5 pb-4 overflow-y-auto border-r border-gray-200">
<div class="flex items-center flex-shrink-0 px-4">
<h1 class="text-xl font-bold text-gray-900">FFR</h1>
</div>
<nav class="mt-5 flex-1 px-2 bg-white">
@include('layouts.navigation-items')
</nav>
<div class="flex-shrink-0 p-4 border-t border-gray-200">
<div class="flex items-center">
<div class="flex-1 min-w-0">
<p class="text-sm font-medium text-gray-900 truncate">
{{ Auth::user()->name }}
</p>
<form method="POST" action="{{ route('logout') }}" class="inline">
@csrf
<button type="submit" class="text-sm text-gray-500 hover:text-gray-700 truncate">
Logout
</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Main content -->
<div class="lg:pl-64 flex flex-col flex-1">
<!-- Mobile header -->
<div class="sticky top-0 z-10 shrink-0 flex h-16 bg-white shadow lg:hidden">
<button
@click="sidebarOpen = true"
class="px-4 border-r border-gray-200 text-gray-500 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500"
>
<svg class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" />
</svg>
</button>
<div class="flex-1 px-4 flex justify-between items-center">
<h1 class="text-lg font-medium text-gray-900">FFR</h1>
</div>
</div>
<main class="flex-1">
{{ $slot }}
</main>
</div>
</div>
@livewireScripts
</body>
</html>