Skip to content

Commit

Permalink
Adding updated sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
tnylea committed Oct 4, 2024
1 parent b952611 commit 272244f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion resources/themes/anchor/components/app/sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
<div x-data="{ sidebarOpen: false }" @open-sidebar.window="sidebarOpen = true" class="relative z-50 w-screen md:w-auto" x-cloak>
<div x-data="{ sidebarOpen: false }" @open-sidebar.window="sidebarOpen = true"
x-init="
$watch('sidebarOpen', function(value){
if(value){ document.body.classList.add('overflow-hidden'); } else { document.body.classList.remove('overflow-hidden'); }
});
"
class="relative z-50 w-screen md:w-auto" x-cloak>
{{-- Backdrop for mobile --}}
<div x-show="sidebarOpen" @click="sidebarOpen=false" class="fixed top-0 right-0 z-50 w-screen h-screen duration-300 ease-out bg-black/20 dark:bg-white/10"></div>

Expand Down

0 comments on commit 272244f

Please sign in to comment.