49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>@yield('title', 'Sklep')</title>
|
|
<link rel="stylesheet" href="{{ mix("css/app.css") }}">
|
|
@stack('head')
|
|
</head>
|
|
<body>
|
|
|
|
<nav>
|
|
<a href="{{ route("main") }}"> <i class="fa fa-hamburger"></i> </a>
|
|
<form action="{{ route("main") }}" method="GET" class="search-form">
|
|
<input type="text" name="q" value="{{ $query ?? "" }}">
|
|
<button type="submit"><i class="fa fa-search"></i></button>
|
|
</form>
|
|
<div>
|
|
|
|
@auth
|
|
<a href="{{ route("cart") }}"> <i class="fa fa-shopping-cart"></i> <span class="cart-amount">{{count(Auth::user()->cart) }}</span> </a>
|
|
<a href="{{ route("user") }}"> {{ Auth::user()->name }} </a>
|
|
@endauth
|
|
@guest
|
|
<a href="{{ route("login") }}">Login</a>
|
|
@endguest
|
|
</div>
|
|
</nav>
|
|
<main>
|
|
<div class="alerts">
|
|
@if(Session::has('success'))
|
|
<div class="alert alert-success">
|
|
{{ Session::get('success') }}
|
|
</div>
|
|
@endif
|
|
@foreach($errors->all() as $message)
|
|
<div class="alert alert-error">
|
|
{{ $message }}
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
@yield('main')
|
|
</main>
|
|
|
|
<footer>
|
|
<h4>Copyright 2021 JA</h4>
|
|
</footer>
|
|
</body>
|
|
</html>
|