Added 'Beef' page and introduced dynamic sidebar

This commit is contained in:
Aksai 2024-02-17 14:42:40 +00:00
parent 3bda85184b
commit 0d500e6975
5 changed files with 118 additions and 4 deletions

View File

@ -0,0 +1,8 @@
@extends('layout')
@section('sidebar')
@include('partials.sidebar',['type' => 'beef'])
@endsection
@section('content')
@endsection

View File

@ -16,7 +16,8 @@
<div class="grid grid-cols-6 min-h-screen">
<!-- Sidebar -->
<aside class="col-span-1">
@include('partials.sidebar')
{{--@include('partials.sidebar')--}}
@yield('sidebar')
</aside>
<!-- Main content area -->

View File

@ -16,7 +16,7 @@
</li>
<li>
<a class="text-gray-500 transition hover:text-gray-500/75" href="#"> Beef </a>
<a class="text-gray-500 transition hover:text-gray-500/75" href="/beef"> Beef </a>
</li>
<li>

View File

@ -1,6 +1,107 @@
<!--<ul class="space-y-1">-->
@php
$type = $type ?? 'default';
@endphp
<aside>
{{--Check type of content to display correct sidebar--}}
@if($type === 'beef') <!-- Type 'Beef' sidebar -->
<div class="flex h-full flex-col justify-between border-e bg-white">
<div class="px-4 py-6">
<span class="grid h-10 w-32 place-content-center rounded-lg bg-gray-100 text-xs text-gray-600">
MeatMasters
</span>
<div class="flex h-full flex-col justify-between border-e bg-white">
<ul class="mt-6 space-y-1">
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Ribeye
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Sirloin
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
T-Bone
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Filet Mignon
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Brisket
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Chuck
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Round
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Flank
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Skirt
</a>
</li>
<li>
<a
href="#"
class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
>
Short Ribs
</a>
</li>
</ul>
</div>
</div>
@endif
</aside>
<!-- Old Sidebar -->
<!--<div class="flex h-full flex-col justify-between border-e bg-white">
<div class="px-4 py-6">
<span class="grid h-10 w-32 place-content-center rounded-lg bg-gray-100 text-xs text-gray-600">
Logo
@ -135,4 +236,4 @@
</details>
</li>
</ul>
</div>
</div>-->

View File

@ -19,4 +19,8 @@ Route::get('/', function () {
Route::get('/about', function () {
return view('about');
});
Route::get('/beef', function() {
return view('beef');
});