1
0
Fork 0
party-rank-server/resources/views/layout.blade.php

58 lines
2.8 KiB
PHP

<!doctype html>
<html lang="{{ str_replace('_', '-', config('app.locale')) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>@yield('title')</title>
<link href="{{ url('bootstrap/bootstrap.min.css') }}" rel="stylesheet">
@yield('style')
</head>
<body>
<nav class="navbar bg-dark border-bottom border-body" data-bs-theme="dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">{{ config('admin.name') }}</a>
{{-- <ul class="nav nav-pills py-2">--}}
{{-- <li class="nav-item"><a href="#" class="nav-link active" aria-current="page">Home</a></li>--}}
{{-- <li class="nav-item"><a href="#" class="nav-link">Features</a></li>--}}
{{-- <li class="nav-item"><a href="#" class="nav-link">Pricing</a></li>--}}
{{-- <li class="nav-item"><a href="#" class="nav-link">FAQs</a></li>--}}
{{-- </ul>--}}
@if(auth('web')->check())
<div class="flex-shrink-0 dropdown">
<a href="#" class="d-block link-body-emphasis text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
@if(auth('web')->user()->avatar)
<img src="{{ auth('web')->user()->avatar }}" alt="{{ auth('web')->user()->name }}" width="32" height="32" class="rounded-circle">
@endif
{{ auth('web')->user()->name }}
</a>
<ul class="dropdown-menu dropdown-menu-dark dropdown-menu-end">
<li><a class="dropdown-item" href="{{ url('/profile') }}">个人中心</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="{{ url('/logout') }}">退出</a></li>
</ul>
</div>
@else
<a href="{{ url('/login') }}" class="btn btn btn-outline-primary">登录</a>
@endif
</div>
</nav>
<div class="container py-1">
@foreach($errors->all() as $error)
<div class="alert alert-warning alert-dismissible" role="alert">
{{ $error }}
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
</div>
@endforeach
</div>
@yield('content')
<div class="container-fluid">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<p class="col-md-4 mb-0 text-body-secondary">&copy; 2023 Company, Inc</p>
</footer>
</div>
<script src="{{ url('bootstrap/bootstrap.bundle.min.js') }}"></script>
@yield('script')
</body>
</html>