refactor: add button for the nav for mobile view

dev
Dinesh Salunke 2023-11-03 14:00:25 +05:30
parent fba8a95610
commit edd6bf4816
1 changed files with 10 additions and 2 deletions

View File

@ -18,6 +18,14 @@
{/if} {/if}
{/function} {/function}
<div class="menu js-top-menu static hidden absolute left-0 right-0 lg:flex lg:flex-1 lg:items-center" id="_desktop_top_menu"> <button class="absolute right-4 top-1/2 block -translate-y-1/2 p-3 ring-primary focus:ring-2 lg:hidden">
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-menu-2" width="24" height="24" viewBox="0 0 24 24" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M4 6l16 0"></path>
<path d="M4 12l16 0"></path>
<path d="M4 18l16 0"></path>
</svg>
</button>
<nav class="absolute right-4 top-full w-full max-w-[250px] justify-center rounded-lg bg-white py-5 px-6 shadow lg:static lg:flex lg:w-full lg:max-w-full lg:bg-transparent lg:py-0 lg:shadow-none hidden" id="_desktop_top_menu">
{menu nodes=$menu.children} {menu nodes=$menu.children}
</div> </nav>