app.blade.php 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. <!-- CSRF Token -->
  7. <meta name="csrf-token" content="{{ csrf_token() }}">
  8. <title>{{ config('app.name', 'Laravel') }}</title>
  9. <!-- Scripts -->
  10. <script src="{{ asset('js/app.js') }}" defer></script>
  11. <!-- Fonts -->
  12. <link rel="dns-prefetch" href="//fonts.gstatic.com">
  13. <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet" type="text/css">
  14. <!-- Styles -->
  15. <link href="{{ asset('css/app.css') }}" rel="stylesheet">
  16. </head>
  17. <body>
  18. <div id="app">
  19. <nav class="navbar navbar-expand-md navbar-light navbar-laravel">
  20. <div class="container">
  21. <a class="navbar-brand" href="{{ url('/') }}">
  22. {{ config('app.name', 'Laravel') }}
  23. </a>
  24. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
  25. <span class="navbar-toggler-icon"></span>
  26. </button>
  27. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  28. <!-- Left Side Of Navbar -->
  29. <ul class="navbar-nav mr-auto">
  30. </ul>
  31. <!-- Right Side Of Navbar -->
  32. <ul class="navbar-nav ml-auto">
  33. <!-- Authentication Links -->
  34. @guest
  35. <li class="nav-item">
  36. <a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
  37. </li>
  38. @if (Route::has('register'))
  39. <li class="nav-item">
  40. <a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
  41. </li>
  42. @endif
  43. @else
  44. <li class="nav-item dropdown">
  45. <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
  46. {{ Auth::user()->name }} <span class="caret"></span>
  47. </a>
  48. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
  49. <a class="dropdown-item" href="{{ route('logout') }}"
  50. onclick="event.preventDefault();
  51. document.getElementById('logout-form').submit();">
  52. {{ __('Logout') }}
  53. </a>
  54. <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
  55. @csrf
  56. </form>
  57. </div>
  58. </li>
  59. @endguest
  60. </ul>
  61. </div>
  62. </div>
  63. </nav>
  64. <main class="py-4">
  65. @yield('content')
  66. </main>
  67. </div>
  68. </body>
  69. </html>