Aucune description

app.blade.php 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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>@yield('title')</title>
  9. <!-- Fonts -->
  10. <link rel="dns-prefetch" href="//fonts.gstatic.com">
  11. <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
  12. <!-- Styles -->
  13. <!-- Bootstrap CSS -->
  14. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
  15. <!-- Material Design Components -->
  16. <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  17. {{-- <link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet"> --}}
  18. <!-- Font Awesome Icons -->
  19. <script src="https://kit.fontawesome.com/1cc169c87a.js"></script>
  20. <link href="{{ asset('css/app.css') }}" rel="stylesheet">
  21. </head>
  22. <body class="mdc-typography">
  23. <nav class="navbar navbar-expand-md navbar-dark bg-dark shadow-sm fixed-top">
  24. <div class="container">
  25. <a class="navbar-brand" href="{{ url('/') }}">
  26. <img src="{{ asset('images/uprrp_logo.png') }}" width="64">
  27. </a>
  28. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
  29. <span class="navbar-toggler-icon"></span>
  30. </button>
  31. <div class="collapse navbar-collapse" id="navbarSupportedContent">
  32. <!-- Left Side Of Navbar -->
  33. <ul class="navbar-nav mr-auto">
  34. <li class="nav-item">
  35. <a class="nav-link mdc-typography--body1" href="{{ route('course.index') }}">Cursos</a>
  36. </li>
  37. <li class="nav-item">
  38. <a class="nav-link mdc-typography--body1" href="{{ route('professor.index') }}">Profesores</a>
  39. </li>
  40. <li class="nav-item dropdown">
  41. @php
  42. switch(Request()->session()->get('filter')) {
  43. case 'f': $division = App\Faculty::find(Request()->session()->get('faculty')); break;
  44. case 'd': $division = App\Department::find(Request()->session()->get('department')); break;
  45. default: break;
  46. }
  47. @endphp
  48. <a class="nav-link dropdown-toggle mdc-typography--body1" href="#" data-toggle="dropdown">
  49. {{ $division->name ?: $division->code ?? 'Departamento' }} <span class="caret"></span>
  50. </a>
  51. <ul class="dropdown-menu">
  52. @foreach (App\Faculty::orderBy('name')->get() as $faculty)
  53. @if ($faculty->departments->isNotEmpty())
  54. <li class="dropdown-submenu">
  55. <a class="dropdown-item dropdown-toggle mdc-typography--body1" href="#" data-toggle="dropdown">{{ $faculty->name }}</a>
  56. <ul class="dropdown-menu">
  57. @foreach ($faculty->departments as $dept)
  58. <li class="mdc-typography--body2">
  59. <a class="dropdown-item" href="{{ url()->current() }}?f=d&dept={{ $dept->id }}">
  60. {{ $dept->name ?: $dept->code }}
  61. </a>
  62. </li>
  63. @endforeach
  64. </ul>
  65. </li>
  66. @else
  67. <li>
  68. <a class="dropdown-item" href="{{ url()->current() }}?f=f&fclt={{ $faculty->id }}">{{ $faculty->name }}</a>
  69. </li>
  70. @endif
  71. @endforeach
  72. </ul>
  73. </li>
  74. </ul>
  75. <!-- Right Side Of Navbar -->
  76. <ul class="navbar-nav ml-auto">
  77. <!-- Authentication Links -->
  78. @guest
  79. <li class="nav-item">
  80. <a class="nav-link mdc-typography--body1" href="{{ route('login') }}">{{ __('Login') }}</a>
  81. </li>
  82. @if (Route::has('register'))
  83. <li class="nav-item">
  84. <a class="nav-link mdc-typography--body1" href="{{ route('register') }}">{{ __('Register') }}</a>
  85. </li>
  86. @endif
  87. @else
  88. <li class="nav-item dropdown">
  89. <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  90. {{ Auth::user()->name }} <span class="caret"></span>
  91. </a>
  92. <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
  93. <a class="dropdown-item mdc-typography--body1" href="{{ route('dashboard') }}">Dashboard</a>
  94. <a class="dropdown-item mdc-typography--body1" href="{{ route('logout') }}">Log out</a>
  95. </div>
  96. </li>
  97. @endguest
  98. </ul>
  99. </div>
  100. </div>
  101. </nav>
  102. {{-- <div class="container-fluid mx-2"> --}}
  103. <main class="mdc-layout-grid py-4">
  104. @yield('content')
  105. </main>
  106. @auth
  107. @yield('modals')
  108. @endauth
  109. <!-- Optional JavaScript -->
  110. <!-- jQuery first, then Popper.js, then Bootstrap JS -->
  111. <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  112. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
  113. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  114. {{-- <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script> --}}
  115. <script src="/js/app.js"></script>
  116. @yield('scripts')
  117. </body>
  118. </html>