forked from brooksbingham/theme-elegance
fix: update main menu styles
parent
7799872499
commit
637fd09f47
|
@ -1,7 +1,7 @@
|
|||
{assign var=_counter value=0}
|
||||
{function name="menu" nodes=[] depth=0 parent=null}
|
||||
{if $nodes|count}
|
||||
<ul class="flex flex-1 items-center justify-center top-menu max-md:flex-col max-md:items-end" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
|
||||
<ul class="flex flex-1 items-end lg:items-center justify-center top-menu max-lg:flex-col max-md:items-end" {if $depth == 0}id="top-menu"{/if} data-depth="{$depth}">
|
||||
{foreach from=$nodes item=node}
|
||||
<li class="{$node.type}{if $node.current} current {/if} px-2 py-2 font-medium hover:text-gray-950" id="{$node.page_identifier}">
|
||||
{assign var=_counter value=$_counter+1}
|
||||
|
@ -13,7 +13,7 @@
|
|||
{$node.label}
|
||||
</a>
|
||||
</li>
|
||||
<hr class=" last:hidden w-full md:rotate-90"/>
|
||||
<hr class=" last:hidden w-full lg:hidden"/>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
@ -27,6 +27,6 @@
|
|||
<path d="M4 18l16 0"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<nav class="mobile-main-menu absolute z-10 right-4 top-full w-full max-w-[160px] md:max-w-[350px] border border-gray-100 justify-center rounded-lg bg-white p-4 md:p-2 drop-shadow-lg lg:static lg:border-none lg:flex lg:w-full lg:max-w-full lg:bg-transparent lg:py-0 lg:shadow-none hidden" id="_desktop_top_menu">
|
||||
<nav class="mobile-main-menu absolute z-10 right-4 top-full w-full max-w-[160px] border border-gray-100 justify-center rounded-lg bg-white p-4 md:p-2 drop-shadow-lg lg:static lg:border-none 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}
|
||||
</nav>
|
||||
|
|
Loading…
Reference in New Issue