/
admini
/
dom
Обзор
Документация
Войти
/
admini
/
dom
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
resources/views/includes/header.blade.php
43 строки
2 KB
pisska
add users
28 окт 2025, 20:58
28 окт 2025, 20:58
6e7de8b
Код
Авторство
О чём код?
<nav class="book-gradient shadow-lg"> <div class="max-w-7xl mx-auto px-4"> <div class="flex justify-between items-center h-16"> <!-- Логотип --> <a href="{{ route('home') }}" class="flex items-center space-x-2"> <span class="text-white text-xl font-bold">📚 Буквоежка</span> </a> <!-- Навигация --> <div class="flex items-center space-x-4"> @auth @if(Auth::user()->isAdmin()) <a href="{{ route('admin.dashboard') }}" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition duration-300"> Панель администратора </a> @else <a href="{{ route('cards.index') }}" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition duration-300"> Мои карточки </a> <a href="{{ route('cards.create') }}" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition duration-300"> Создать карточку </a> @endif <span class="text-gray-300 text-sm">Привет, {{ Auth::user()->full_name }}</span> <form method="POST" action="{{ route('logout') }}"> @csrf <button type="submit" class="bg-red-500 hover:bg-red-600 text-white px-3 py-1 rounded text-sm transition duration-300"> Выйти </button> </form> @else <a href="{{ route('login') }}" class="text-gray-300 hover:text-white px-3 py-2 rounded-md text-sm font-medium transition duration-300"> Вход </a> <a href="{{ route('register') }}" class="bg-green-500 hover:bg-green-600 text-white px-4 py-2 rounded-md text-sm font-medium transition duration-300"> Регистрация </a> @endauth </div> </div> </div> </nav>