菜谱项目

app.blade.php 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. <!DOCTYPE html>
  2. <html lang="{{ app()->getLocale() }}">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <!-- CSRF Token -->
  8. <meta name="csrf-token" content="{{ csrf_token() }}">
  9. <title>{{ config('app.name', 'Laravel') }}</title>
  10. <!-- Styles -->
  11. <link href="{{ asset('css/app.css') }}" rel="stylesheet">
  12. </head>
  13. <body>
  14. <div id="app">
  15. <nav class="navbar navbar-default navbar-static-top">
  16. <div class="container">
  17. <div class="navbar-header">
  18. <!-- Collapsed Hamburger -->
  19. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#app-navbar-collapse">
  20. <span class="sr-only">Toggle Navigation</span>
  21. <span class="icon-bar"></span>
  22. <span class="icon-bar"></span>
  23. <span class="icon-bar"></span>
  24. </button>
  25. <!-- Branding Image -->
  26. <a class="navbar-brand" href="{{ url('/') }}">
  27. {{ config('app.name', 'Laravel') }}
  28. </a>
  29. </div>
  30. <div class="collapse navbar-collapse" id="app-navbar-collapse">
  31. <!-- Left Side Of Navbar -->
  32. <ul class="nav navbar-nav">
  33. &nbsp;
  34. </ul>
  35. <!-- Right Side Of Navbar -->
  36. <ul class="nav navbar-nav navbar-right">
  37. <!-- Authentication Links -->
  38. @if (Auth::guest())
  39. <li><a href="{{ route('login') }}">Login</a></li>
  40. <li><a href="{{ route('register') }}">Register</a></li>
  41. @else
  42. <li class="dropdown">
  43. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  44. {{ Auth::user()->name }} <span class="caret"></span>
  45. </a>
  46. <ul class="dropdown-menu" role="menu">
  47. <li>
  48. <a href="{{ route('logout') }}"
  49. onclick="event.preventDefault();
  50. document.getElementById('logout-form').submit();">
  51. Logout
  52. </a>
  53. <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
  54. {{ csrf_field() }}
  55. </form>
  56. </li>
  57. </ul>
  58. </li>
  59. @endif
  60. </ul>
  61. </div>
  62. </div>
  63. </nav>
  64. @yield('content')
  65. </div>
  66. <!-- Scripts -->
  67. <script src="{{ asset('js/app.js') }}"></script>
  68. </body>
  69. </html>