netgescon-master/resources/views/admin/layouts/app.blade.php
Pikappa2 1b884feda5 v0.7 - UI Universale e Sistema Database Modernizzato
 Completato:
- Database modernizzato con chiavi id standard Laravel
- Relazioni corrette Amministratore→Stabili→Movimenti
- UI universale responsive con sidebar permission-based
- Codici alfanumerici 8 caratteri implementati
- Seeders con dati di test funzionanti
- Documentazione tecnica completa (INSTALL_LINUX, TECHNICAL_SPECS, UPDATE_SYSTEM)

🔧 Miglioramenti:
- Helper userSetting() funzionante
- Sistema multi-database preparato
- .gitignore aggiornato per sicurezza
- Migration cleanup e ottimizzazione

📚 Documentazione:
- Guida installazione Linux completa
- Specifiche tecniche dettagliate
- Sistema aggiornamenti progettato
- Progress log aggiornato
2025-07-07 17:24:30 +02:00

147 lines
7.5 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', 'Laravel') }} - Amministratore</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" />
<!-- FontAwesome (per icone menu) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" integrity="sha512-papm6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q6Q==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<!-- Scripts -->
@vite(['resources/css/app.css', 'resources/js/app.js'])
<link rel="stylesheet" href="{{ asset('css/dark-mode.css') }}">
</head>
<body class="font-sans antialiased bg-gray-100 dark:bg-gray-900 dark:text-white transition-colors duration-300" id="main-body">
<div class="min-h-screen flex">
<!-- Colonna launcher (icone) -->
<aside class="w-16 bg-blue-800 dark:bg-gray-800 flex-shrink-0 flex flex-col items-center justify-between">
@include('components.menu.launcher')
</aside>
<!-- Sidebar (verde) -->
<aside class="w-56 bg-green-300 dark:bg-gray-700 border-r-4 border-blue-500 flex-shrink-0 relative transition-all duration-300" id="sidebar-menu">
@include('components.menu.sidebar')
<!-- Pulsante per ridimensionare/nascondere -->
<button id="toggle-sidebar" class="absolute top-2 right-0 -mr-3 bg-blue-500 text-white rounded-full p-1 shadow hover:bg-blue-700 transition">
<i class="fa-solid fa-chevron-left"></i>
</button>
</aside>
<!-- Colonna blu sottile -->
<aside class="w-3 bg-blue-700 flex-shrink-0 flex flex-col items-center justify-center">
<button id="show-sidebar" class="text-white opacity-70 hover:opacity-100 transition" style="display:none">
<i class="fa-solid fa-chevron-right"></i>
</button>
</aside>
<!-- Main Content -->
<div class="flex-1 flex flex-col min-h-screen">
<!-- Navigation -->
<nav class="bg-white shadow-sm border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex">
<!-- Logo -->
<div class="shrink-0 flex items-center">
<a href="{{ route('admin.dashboard') }}" class="text-xl font-bold text-gray-800">
NetGesCon Admin
</a>
</div>
</div>
<!-- Settings Dropdown -->
<div class="hidden sm:flex sm:items-center sm:ml-6">
<!-- Dark Mode Toggle -->
<button id="dark-mode-toggle" class="mr-4 p-2 text-gray-500 hover:text-gray-700 focus:outline-none">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path id="sun-icon" d="M10 2L13.09 8.26L20 9L14 14.74L15.18 21.02L10 17.77L4.82 21.02L6 14.74L0 9L6.91 8.26L10 2Z" />
<path id="moon-icon" class="hidden" d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z" />
</svg>
</button>
<x-dropdown align="right" width="48">
<x-slot name="trigger">
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 bg-white hover:text-gray-700 focus:outline-none transition ease-in-out duration-150">
<div>{{ Auth::user()->name }}</div>
<div class="ml-1">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
</svg>
</div>
</button>
</x-slot>
<x-slot name="content">
<x-dropdown-link :href="route('profile.edit')">
{{ __('Profile') }}
</x-dropdown-link>
<!-- Authentication -->
<form method="POST" action="{{ route('logout') }}">
@csrf
<x-dropdown-link :href="route('logout')"
onclick="event.preventDefault();
this.closest('form').submit();">
{{ __('Log Out') }}
</x-dropdown-link>
</form>
</x-slot>
</x-dropdown>
</div>
</div>
</div>
</nav>
<!-- Page Content -->
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-100 dark:bg-gray-900 p-6">
@yield('content')
</main>
</div>
</div>
<!-- JavaScript per toggle sidebar e dark mode -->
<script>
// Toggle sidebar
document.getElementById('toggle-sidebar').addEventListener('click', function() {
const sidebar = document.getElementById('sidebar-menu');
const showBtn = document.getElementById('show-sidebar');
sidebar.style.display = 'none';
showBtn.style.display = 'block';
});
document.getElementById('show-sidebar').addEventListener('click', function() {
const sidebar = document.getElementById('sidebar-menu');
const showBtn = document.getElementById('show-sidebar');
sidebar.style.display = 'block';
showBtn.style.display = 'none';
});
// Dark mode toggle
document.getElementById('dark-mode-toggle').addEventListener('click', function() {
document.body.classList.toggle('dark');
const isDark = document.body.classList.contains('dark');
localStorage.setItem('dark-mode', isDark);
// Toggle icons
document.getElementById('sun-icon').classList.toggle('hidden', isDark);
document.getElementById('moon-icon').classList.toggle('hidden', !isDark);
});
// Load dark mode preference
if (localStorage.getItem('dark-mode') === 'true') {
document.body.classList.add('dark');
document.getElementById('sun-icon').classList.add('hidden');
document.getElementById('moon-icon').classList.remove('hidden');
}
</script>
</body>
</html>