123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- <!doctype html>
- <html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- CSRF Token -->
- <meta name="csrf-token" content="{{ csrf_token() }}">
- <title>{{ config('app.name', 'Laravel') }}</title>
- <!-- Scripts -->
- <script src="{{ asset('/js/app.js') }}" defer></script>
- <!-- Fonts -->
- <link rel="dns-prefetch" href="//fonts.gstatic.com">
- <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
- <!-- Styles -->
- <link href="{{ asset('/css/app.css') }}" rel="stylesheet">
- </head>
- <body>
- <div id="app">
- <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
- <div class="container">
- <a class="navbar-brand" href="{{ url('/') }}">
- {{ config('app.name', 'Laravel') }}
- </a>
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
- <!-- Left Side Of Navbar -->
- <ul class="navbar-nav me-auto">
- @auth
- @if (Auth::user()->hasRole('Administrator'))
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
- Books
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ route('books.index') }}">List all</a>
- <a class="dropdown-item" href="{{ route('books.create')}}">Create new</a>
- </div>
- </li>
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
- Categories
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ route('categories.index') }}">List all</a>
- <a class="dropdown-item" href="{{ route('categories.create') }}">Create new</a>
- </div>
- </li>
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
- Loans
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ route('loans.index') }}">List all</a>
- <a class="dropdown-item" href="{{ route('loans.create') }}">Create new</a>
- </div>
- </li>
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
- Penalties
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ route('penalties.index') }}">List all</a>
- <a class="dropdown-item" href="{{ route('penalties.create') }}">Create new</a>
- </div>
- </li>
- <li class="nav-item dropdown">
- <a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown">
- Users
- </a>
- <div class="dropdown-menu">
- <a class="dropdown-item" href="{{ route('users.index') }}">List all</a>
- <a class="dropdown-item" href="{{ route('users.create') }}">Create new</a>
- </div>
- </li>
- @else
- <li class="nav-item">
- <a href="{{ route('books.index') }}" class="nav-link">Books</a>
- </li>
- <li class="nav-item">
- <a href="{{ route('categories.index') }}" class="nav-link">Categories</a>
- </li>
- <li class="nav-item">
- <a href="{{ route('loans.index') }}" class="nav-link">Loans</a>
- </li>
- <li class="nav-item">
- <a href="{{ route('penalties.index') }}" class="nav-link">Penalties</a>
- </li>
- @endif
- @else
- <li class="nav-item">
- <a href="{{ route('books.index') }}" class="nav-link">Books</a>
- </li>
- <li class="nav-item">
- <a href="{{ route('categories.index') }}" class="nav-link">Categories</a>
- </li>
- @endauth
- </ul>
- <!-- Right Side Of Navbar -->
- <ul class="navbar-nav ms-auto">
- <!-- Authentication Links -->
- @guest
- @if (Route::has('login'))
- <li class="nav-item">
- <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
- </li>
- @endif
- @if (Route::has('register'))
- <li class="nav-item">
- <a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
- </li>
- @endif
- @else
- <li class="nav-item dropdown">
- <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">
- <img src="{{ Auth::user()->image }}" class="me-1 rounded-circle" alt="{{ Auth::user()->name }}" width="32" height="32"/>
- <span class="align-middle">{{ Auth::user()->name }}</span>
- </a>
- <div class="dropdown-menu dropdown-menu-end">
- <a class="dropdown-item" href="{{ route('profiles.show', Auth::user()->id) }}">Profile</a>
- <a class="dropdown-item" href="{{ route('logout') }}"
- onclick="event.preventDefault();document.getElementById('logout-form').submit();">
- {{ __('Logout') }}
- </a>
- <form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
- @csrf
- </form>
- </div>
- </li>
- @endguest
- </ul>
- </div>
- </div>
- </nav>
- <main class="py-4 text-break">
- @yield('content')
- </main>
- </div>
- </body>
- </html>
|