app.blade.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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>{{ __('ui.h1_title') }}</title>
  9. <!-- Scripts -->
  10. <script type="text/javascript">
  11. // Globals
  12. var scanRoute = "{{route('rescan')}}";
  13. var panelRoute = "{{route('home')}}";
  14. </script>
  15. <script src="{{ asset('js/app.js') }}" defer></script>
  16. <script src="{{ asset('js/myScript.js') }}" defer></script>
  17. <!-- Fonts -->
  18. <link rel="dns-prefetch" href="//fonts.gstatic.com">
  19. <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
  20. <!-- Styles -->
  21. <link href="{{ asset('css/app.css') }}" rel="stylesheet">
  22. <style type="text/css">
  23. .controls{
  24. text-align: center;
  25. }
  26. div.dropdown-item{
  27. cursor: pointer;
  28. }
  29. .btn {
  30. white-space: normal;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <div id="app">
  36. <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
  37. <div class="container">
  38. <a class="navbar-brand" href="{{ url('/') }}">
  39. {{ __('ui.h1_title') }}
  40. </a>
  41. <button class="navbar-toggler" type="button" data-toggle="collapse"
  42. data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
  43. aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
  44. <span class="navbar-toggler-icon"></span>
  45. </button>
  46. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  47. <!-- Left Side Of Navbar -->
  48. <ul class="navbar-nav mr-auto">
  49. </ul>
  50. <!-- Fix for navbar collapse event -->
  51. <!-- https://github.com/twbs/bootstrap/issues/30553#issuecomment-612617589 -->
  52. <!-- Right Side Of Navbar -->
  53. <ul class="navbar-nav ml-auto">
  54. <!-- Authentication Links -->
  55. @guest
  56. <li class="nav-item">
  57. <a class="nav-link" href="{{ route('login') }}">{{ __('ui.login') }}</a>
  58. </li>
  59. @if (Route::has('register'))
  60. <li class="nav-item">
  61. <a class="nav-link" href="{{ route('register') }}">{{ __('ui.register') }}</a>
  62. </li>
  63. @endif
  64. @else
  65. <li class="nav-item dropdown">
  66. <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
  67. {{ Auth::user()->name }} <span class="caret"></span>
  68. </a>
  69. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
  70. <a class="dropdown-item" href="{{ route('logout') }}"
  71. onclick="event.preventDefault();
  72. document.getElementById('logout-form').submit();">
  73. {{ __('ui.logout') }}
  74. </a>
  75. <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
  76. @csrf
  77. </form>
  78. <a class="dropdown-item" href="{{ route('asknepw', [Auth::user()->id, 'home']) }}">
  79. {{__('ui.chpass')}}
  80. </a>
  81. </div>
  82. </li>
  83. @endguest
  84. </ul>
  85. </div>
  86. </div>
  87. </nav>
  88. <main class="py-4">
  89. @yield('content')
  90. @yield('modals')
  91. </main>
  92. </div>
  93. </body>
  94. </html>