mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
Refactor: Improve NavBar class list syntax
This commit is contained in:
parent
6203e8a573
commit
3ee3300f5c
1 changed files with 18 additions and 20 deletions
|
@ -96,31 +96,29 @@ const {
|
||||||
</DropdownItems>
|
</DropdownItems>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<a
|
<a
|
||||||
class:list={{
|
class:list={[
|
||||||
hidden: true,
|
'hidden',
|
||||||
'items-center': true,
|
'items-center',
|
||||||
'hover:bg-muted': true,
|
'hover:bg-muted',
|
||||||
'rounded-lg': true,
|
'rounded-lg',
|
||||||
'p-3': true,
|
'p-3',
|
||||||
'lg:block': true,
|
'lg:block',
|
||||||
'text-coral': Astro.url.pathname === getLocalePath('/about'),
|
{ 'text-coral': Astro.url.pathname === getLocalePath('/about') },
|
||||||
}}
|
]}
|
||||||
data-active={Astro.url.pathname === getLocalePath('/about')}
|
|
||||||
href={getLocalePath('/about')}
|
href={getLocalePath('/about')}
|
||||||
>
|
>
|
||||||
<span>{menu.aboutUs}</span>
|
<span>{menu.aboutUs}</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class:list={{
|
class:list={[
|
||||||
hidden: true,
|
'hidden',
|
||||||
'items-center': true,
|
'items-center',
|
||||||
'hover:bg-muted': true,
|
'hover:bg-muted',
|
||||||
'rounded-lg': true,
|
'rounded-lg',
|
||||||
'p-3': true,
|
'p-3',
|
||||||
'lg:block': true,
|
'lg:block',
|
||||||
'text-coral': Astro.url.pathname === getLocalePath('/mods'),
|
{ 'text-coral': Astro.url.pathname === getLocalePath('/mods') },
|
||||||
}}
|
]}
|
||||||
data-active={Astro.url.pathname === getLocalePath('/mods')}
|
|
||||||
href={getLocalePath('/mods')}
|
href={getLocalePath('/mods')}
|
||||||
>
|
>
|
||||||
<span>{menu.mods}</span>
|
<span>{menu.mods}</span>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue