mirror of
https://github.com/zen-browser/www.git
synced 2025-07-07 17:05:32 +02:00
fix: fix trailing slash of Astro.url.pathname
This commit is contained in:
parent
4f70aa01de
commit
6203e8a573
2 changed files with 21 additions and 2 deletions
|
@ -7,6 +7,7 @@ import { defineConfig } from 'astro/config'
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
integrations: [tailwind(), react(), sitemap()],
|
integrations: [tailwind(), react(), sitemap()],
|
||||||
site: 'https://zen-browser.app',
|
site: 'https://zen-browser.app',
|
||||||
|
trailingSlash: 'never',
|
||||||
i18n: {
|
i18n: {
|
||||||
defaultLocale: 'en',
|
defaultLocale: 'en',
|
||||||
locales: ['en', 'ja'],
|
locales: ['en', 'ja'],
|
||||||
|
|
|
@ -96,13 +96,31 @@ const {
|
||||||
</DropdownItems>
|
</DropdownItems>
|
||||||
</Dropdown>
|
</Dropdown>
|
||||||
<a
|
<a
|
||||||
class={`hidden items-center hover:bg-muted rounded-lg p-3 lg:block${Astro.url.pathname === getLocalePath('/about') ? ' text-coral' : ''}`}
|
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')}
|
||||||
href={getLocalePath('/about')}
|
href={getLocalePath('/about')}
|
||||||
>
|
>
|
||||||
<span>{menu.aboutUs}</span>
|
<span>{menu.aboutUs}</span>
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
class={`hidden items-center hover:bg-muted rounded-lg p-3 lg:block${Astro.url.pathname === getLocalePath('/mods') ? ' text-coral' : ''}`}
|
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')}
|
||||||
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