Skip to content

Instantly share code, notes, and snippets.

@jdltechworks
Created July 14, 2022 06:33
Show Gist options
  • Save jdltechworks/5d92fe52f103b5161d4f3e5aafd55e92 to your computer and use it in GitHub Desktop.
Save jdltechworks/5d92fe52f103b5161d4f3e5aafd55e92 to your computer and use it in GitHub Desktop.
Akong layout
@php
$logo = [
'text-lg',
'flex-1',
'text-gray-700',
'items-center',
'font-bold',
'no-underline',
'text-red',
'block',
'tracking-wider',
'mr-5'
];
$container = [
'content',
'ml-72',
'mt-24',
'relative',
'flex-1',
'flex',
'flex-col',
];
$sidebar_class = [
'w-64',
'fixed',
'h-full',
'border-r',
'pb-16',
'overflow-y-auto',
'bg-white',
'flex',
'flex-col',
];
@endphp
<x-html>
<x-slot name="head">
@livewireStyles
@vite('resources/scss/app.scss')
</x-slot>
<div class="w-full fixed top-0 z-50">
<nav class="mx-auto md:px-0 bg-white shadow relative z-50">
<div class="flex px-5">
<a href="{{ url('/') }}" class="{{ join(' ', $logo) }}">
<x-md::logo />
</a>
{{ $navigation ?? null }}
</div>
</nav>
<aside class="w-72 h-full fixed">
<div class="{{ join(' ', $sidebar_class)}}">
{{ $sidebar ?? null }}
</div>
</aside>
</div>
<div class="{{ join(' ', $container) }}">
<div class="container flex-1">
{{ $slot }}
</div>
</div>
@livewireScripts
@vite('resources/js/app.js')
</x-html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment