mdhub/app/application/resources/views/layout/site.blade.php

97 lines
5.3 KiB
PHP
Raw Normal View History

2024-06-18 22:35:54 +05:00
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>@yield('meta_title', '')</title>
<meta name="keywords" content="@yield('meta_keywords', '')" />
<meta name="description" content="@yield('meta_description', '')" />
<link type="image/png" sizes="16x16" rel="icon" href="{{ Vite::asset('resources/site/images/favicons/favicon-16.png') }}">
<link type="image/png" sizes="32x32" rel="icon" href="{{ Vite::asset('resources/site/images/favicons/favicon-32.png') }}">
<link type="image/png" sizes="96x96" rel="icon" href="{{ Vite::asset('resources/site/images/favicons/favicon-96.png') }}">
<link type="image/png" sizes="120x120" rel="icon" href="{{ Vite::asset('resources/site/images/favicons/favicon-120.png') }}">
@vite('resources/site/scss/app.scss')
</head>
<body>
<div id="main-container">
<header class="header">
<div class="container-width header__content">
<span class="header__logo">
<a href="{{ route('home') }}"><img src="{{ Vite::asset('resources/site/images/logo.png') }}" alt="{{ __('site.logo') }}"></a>
</span>
<button id="mobile-menu" type="button" aria-label="{{ __('site.Menu') }}">
<svg class="open" width="45" height="45" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path>
</svg>
<svg class="close" width="45" height="45" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18 18 6M6 6l12 12"></path>
</svg>
</button>
<div class="header__right">
@guest
<a href="{{ route('login') }}" class="header__right__login">{{ __('Log In') }}</a>
@endguest
@auth
<a href="{{ route('profile.edit') }}" class="header__right__profile">{{ __('Profile') }}</a>
<form method="post" action="{{ route('logout') }}" class="header__right__logout-form">
@csrf
<button class="header__right__logout" type="submit">
<svg class="icon icon-xxs me-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg>
{{ __('Logout') }}
</button>
</form>
@endauth
</div>
</div>
</header>
<div class="content">
<div class="container-width section-content">
<nav id="menu">
<div class="menu__title">{{ __('site.Menu') }}</div>
<ul>
<ul class="menu__profile">
@guest
<li><a href="{{ route('login') }}" @class(['active' => request()->route()->named(['login'])])>{{ __('Log In') }}</a></li>
@endguest
@auth
@can('AdminPanel')
<li><a href="{{ route('admin.home') }}">{{ __('admin-sections.AdminPanel') }}</a></li>
@endif
<li><a href="{{ route('profile.edit') }}" @class(['active' => request()->route()->named(['profile.edit'])])>{{ __('Profile') }}</a></li>
<li><a href="{{ route('profile.settings') }}" @class(['active' => request()->route()->named(['profile.settings'])])>{{ __('Settings') }}</a></li>
<li>
<form method="post" action="{{ route('logout') }}">
@csrf
<button type="submit" class="menu__profile__logout">
{{ __('Logout') }}
</button>
</form>
</li>
@endauth
</ul>
</ul>
</nav>
<div id="content">
<h1>@yield('h1', '')</h1>
@includeWhen($errors->any(), 'layout.site._errors', ['errors' => $errors->all()])
@includeWhen(Session::has('success'), 'layout.site._success', ['success' => Session::get('success')])
{{ $slot }}
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container-width">
<div class="footer__powered"><a href="https://projects.kor-elf.net/mdhub/" target="_blank">{{ __('Powered by MDHub') }}</a></div>
</div>
</footer>
@vite('resources/site/js/app.js')
@stack('scripts')
</body>
</html>