Skip to content

Commit

Permalink
return back old menu
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Dec 9, 2023
1 parent 79472ac commit e4b67ec
Showing 1 changed file with 60 additions and 64 deletions.
124 changes: 60 additions & 64 deletions resources/views/layouts/includes/menu.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,131 +5,127 @@
<ul class="mx-3 mt-2 space-y-1 text-sm">
<li class="filament-sidebar-item ">
<Link
href="{{ route('admin') }}"
class="
href="{{ route('admin') }}"
class="
@if(request()->routeIs('admin'))
bg-primary-500 text-white
@else
hover:bg-gray-500/5 focus:bg-gray-500/5 dark:text-gray-300 dark:hover:bg-gray-700
@endif
flex items-center justify-center gap-3 px-3 py-2 font-medium transition rounded-lg">

<i class="w-5 h-5 shrink-0 bx bxs-home" style="font-size: 20px"></i>
<i class="w-5 h-5 shrink-0 bx bxs-home" style="font-size: 20px"></i>

<div class="flex flex-1" v-show="!data.makeMenuMin">
<div class="flex flex-1" v-show="!data.makeMenuMin">
<span>
{{ trans("tomato-admin::global.dashboard") }}
</span>
</div>
</div>
</Link>
</li>
</ul>
</div>
<div class="my-3 ml-6 border-t rtl:ml-auto rtl:mr-6 dark:border-gray-700"></div>
<div class="my-6 ml-6 border-t rtl:ml-auto rtl:mr-6 dark:border-gray-700"></div>

@if(config('tomato-admin.menu_provider'))
{!! config('tomato-admin.menu_provider')::render() !!}
@elseif(config('tomato-admin.menu_file'))
@include(config('tomato-admin.menu_file'))
@else
@php $counter = 0; @endphp
<div class="mx-3 mt-2 space-y-1 text-sm">
@foreach($menus as $key=>$menu)
<x-tomato-admin-tooltip text="{{$key}}">
<button v-if="!data.groupOpened" @click.prevent="
<button @click.prevent="
data.asideMenuGroup['{{str_replace(" ", "_", $key)}}'] =
!data.asideMenuGroup['{{str_replace(" ", "_", $key)}}']; data.groupOpened = !data.groupOpened"
class="hover:bg-gray-500/5 focus:bg-gray-500/5 dark:text-gray-300 dark:hover:bg-gray-700 flex items-center justify-center w-full gap-3 px-3 py-2 font-medium transition rounded-lg">
<i style="font-size: 20px" class="w-5 h-5 shrink-0 bx bx-chevron-right rlt:bx-chevron-left" v-if="data.asideMenuGroup" v-show="!data.asideMenuGroup['{{str_replace(" ", "_", $key)}}']"></i>
!data.asideMenuGroup['{{str_replace(" ", "_", $key)}}']"
v-show="!data.makeMenuMin"
class="flex items-center justify-between w-full px-6">
<div class="flex items-center gap-4 text-gray-600 dark:text-gray-300">
<p class="flex-1 text-xs font-bold tracking-wider uppercase">
{{ $key }}
</p>
</div>

<div class="flex flex-1" v-show="!data.makeMenuMin">
<span>{{ $key }}</span>
</div>
</button>
</x-tomato-admin-tooltip>
<svg v-if="data.asideMenuGroup" v-show="data.asideMenuGroup['{{str_replace(" ", "_", $key)}}']"
class="w-3 h-3 text-gray-600 transition-all dark:text-gray-300" xmlns="http://www.w3.org/2000/svg"
fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path>
</svg>
<svg v-if="data.asideMenuGroup" v-show="!data.asideMenuGroup['{{str_replace(" ", "_", $key)}}']"
class="w-3 h-3 text-gray-600 transition-all rotate-180 dark:text-gray-300"
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor"
aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path>
</svg>
</button>

<div>
<ul
<ul class="mx-3 mt-2 space-y-1 text-sm"
v-if="data.asideMenuGroup"
v-show="data.asideMenuGroup['{{str_replace(" ", "_", $key)}}'] ">
<li @click.prevent="data.groupOpened = !data.groupOpened; data.asideMenuGroup['{{str_replace(" ", "_", $key)}}'] = !data.asideMenuGroup['{{str_replace(" ", "_", $key)}}'];" class="filament-sidebar-item">
<x-tomato-admin-tooltip text="{{ $key }}">
<button
class="hover:bg-gray-500/5 focus:bg-gray-500/5 dark:text-gray-300 dark:hover:bg-gray-700 flex items-center justify-center w-full gap-3 px-3 py-2 font-medium transition rounded-lg">

<i class="bx bx-chevron-left rlt:bx-chevron-right" style="font-size: 20px"></i>

<div class="flex flex-1" v-show="!data.makeMenuMin" style="">
<span>
{{ $key }}
</span>
</div>
</button>
</x-tomato-admin-tooltip>
</li>
v-show="data.asideMenuGroup['{{str_replace(" ", "_", $key)}}'] || data.makeMenuMin ">
@foreach($menu as $item)
<li class="filament-sidebar-item" style="color: {{$item->color}} !important;">
<x-tomato-admin-tooltip text="{{$item->label}}">
@if($item->target === '_blank')
<a
target="_blank"
href="{{$item->route ? route($item->route) : $item->url}}"
class="
<li class="filament-sidebar-item " title="{{$item->label}}" style="color: {{$item->color}} !important;">
@if($item->target === '_blank')
<a
target="_blank"
href="{{$item->route ? route($item->route) : $item->url}}"
class="
@if($item->route && request()->routeIs($item->route))
bg-primary-500 text-white
@else
hover:bg-gray-500/5 focus:bg-gray-500/5 dark:text-gray-300 dark:hover:bg-gray-700
@endif
flex items-center justify-center w-full gap-3 px-3 py-2 font-medium transition rounded-lg">

<i class="w-5 h-5 shrink-0 {{ $item->icon }}" style="font-size: 20px"></i>
<i class="w-5 h-5 shrink-0 {{ $item->icon }}" style="font-size: 20px"></i>

<div class="flex flex-1" v-show="!data.makeMenuMin" style="">
<div class="flex flex-1" v-show="!data.makeMenuMin" style="">
<span>
{{ $item->label }}
</span>
@if($item->badge)
<span
class="inline-flex items-center justify-center ml-auto rtl:ml-0 rtl:mr-auto min-h-4 px-2 py-0.5 text-xs font-medium tracking-tight rounded-xl whitespace-normal text-primary-700 bg-primary-500/10 dark:text-primary-500">
@if($item->badge)
<span
class="inline-flex items-center justify-center ml-auto rtl:ml-0 rtl:mr-auto min-h-4 px-2 py-0.5 text-xs font-medium tracking-tight rounded-xl whitespace-normal text-primary-700 bg-primary-500/10 dark:text-primary-500">
{{ $item->badge }}
</span>
@endif
</div>
</a>
@else
<Link
href="{{$item->route ? route($item->route) : $item->url}}"
class="
@endif
</div>
</a>
@else
<Link
href="{{$item->route ? route($item->route) : $item->url}}"
class="
@if($item->route && request()->routeIs($item->route))
bg-primary-500 text-white
@else
hover:bg-gray-500/5 focus:bg-gray-500/5 dark:text-gray-300 dark:hover:bg-gray-700
@endif
flex items-center justify-center w-full gap-3 px-3 py-2 font-medium transition rounded-lg">

<i class="w-5 h-5 shrink-0 {{ $item->icon }}" style="font-size: 20px"></i>
<i class="w-5 h-5 shrink-0 {{ $item->icon }}" style="font-size: 20px"></i>

<div class="flex flex-1" v-show="!data.makeMenuMin" style="">
<div class="flex flex-1" v-show="!data.makeMenuMin" style="">
<span>
{{ $item->label }}
</span>
@if($item->badge)
<span
class="inline-flex items-center justify-center ml-auto rtl:ml-0 rtl:mr-auto min-h-4 px-2 py-0.5 text-xs font-medium tracking-tight rounded-xl whitespace-normal text-primary-700 bg-primary-500/10 dark:text-primary-500">
@if($item->badge)
<span
class="inline-flex items-center justify-center ml-auto rtl:ml-0 rtl:mr-auto min-h-4 px-2 py-0.5 text-xs font-medium tracking-tight rounded-xl whitespace-normal text-primary-700 bg-primary-500/10 dark:text-primary-500">
{{ $item->badge }}
</span>
@endif
</div>
</Link>
@endif
</x-tomato-admin-tooltip>
@endif
</div>
</Link>
@endif
</li>
@endforeach

</ul>
</div>
@if($counter !== count($menus)-1)
<div class="my-6 ml-6 border-t rtl:ml-auto rtl:mr-6 dark:border-gray-700"></div>
@endif
@php $counter++; @endphp
@endforeach
</div>
@endif

@foreach(\TomatoPHP\TomatoAdmin\Facade\TomatoSlot::getSidebarBottom() as $item)
Expand Down

0 comments on commit e4b67ec

Please sign in to comment.