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>
|
||||
</Dropdown>
|
||||
<a
|
||||
class:list={{
|
||||
hidden: true,
|
||||
'items-center': true,
|
||||
'hover:bg-muted': true,
|
||||
'rounded-lg': true,
|
||||
'p-3': true,
|
||||
'lg:block': true,
|
||||
'text-coral': Astro.url.pathname === getLocalePath('/about'),
|
||||
}}
|
||||
data-active={Astro.url.pathname === getLocalePath('/about')}
|
||||
class:list={[
|
||||
'hidden',
|
||||
'items-center',
|
||||
'hover:bg-muted',
|
||||
'rounded-lg',
|
||||
'p-3',
|
||||
'lg:block',
|
||||
{ 'text-coral': Astro.url.pathname === getLocalePath('/about') },
|
||||
]}
|
||||
href={getLocalePath('/about')}
|
||||
>
|
||||
<span>{menu.aboutUs}</span>
|
||||
</a>
|
||||
<a
|
||||
class:list={{
|
||||
hidden: true,
|
||||
'items-center': true,
|
||||
'hover:bg-muted': true,
|
||||
'rounded-lg': true,
|
||||
'p-3': true,
|
||||
'lg:block': true,
|
||||
'text-coral': Astro.url.pathname === getLocalePath('/mods'),
|
||||
}}
|
||||
data-active={Astro.url.pathname === getLocalePath('/mods')}
|
||||
class:list={[
|
||||
'hidden',
|
||||
'items-center',
|
||||
'hover:bg-muted',
|
||||
'rounded-lg',
|
||||
'p-3',
|
||||
'lg:block',
|
||||
{ 'text-coral': Astro.url.pathname === getLocalePath('/mods') },
|
||||
]}
|
||||
href={getLocalePath('/mods')}
|
||||
>
|
||||
<span>{menu.mods}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue