Remove user agent detection, not useful apparently
This commit is contained in:
parent
4060851483
commit
b68b5dc651
1 changed files with 23 additions and 42 deletions
|
@ -9,11 +9,6 @@ import {Language, Menu} from '@iconoir/vue'
|
||||||
import i18next, { t } from "i18next";
|
import i18next, { t } from "i18next";
|
||||||
import { Trans, HeadHrefLangs } from "astro-i18next/components";
|
import { Trans, HeadHrefLangs } from "astro-i18next/components";
|
||||||
|
|
||||||
// User Agent
|
|
||||||
import { useUserAgent } from "astro-useragent"
|
|
||||||
const uaString = Astro.request.headers.get("user-agent")
|
|
||||||
const { source, isMobile } = useUserAgent(uaString)
|
|
||||||
|
|
||||||
// Check if user is on Support
|
// Check if user is on Support
|
||||||
if (Astro.url.pathname.startsWith("/support")) {
|
if (Astro.url.pathname.startsWith("/support")) {
|
||||||
var IsOnSupport = true
|
var IsOnSupport = true
|
||||||
|
@ -27,7 +22,8 @@ else if (Selected === "Products") {var Select_Products = true}
|
||||||
else if (Selected === "Pricing") {var Select_Pricing = true}
|
else if (Selected === "Pricing") {var Select_Pricing = true}
|
||||||
else if (Selected === "Support") {var Select_Support = true}
|
else if (Selected === "Support") {var Select_Support = true}
|
||||||
|
|
||||||
import Default from '@astrojs/starlight/components/Search.astro';
|
// Components
|
||||||
|
import Default from '@astrojs/starlight/components/Search.astro'
|
||||||
---
|
---
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
|
@ -38,9 +34,6 @@ import Default from '@astrojs/starlight/components/Search.astro';
|
||||||
<p>{t("Header.Flux")}</p>
|
<p>{t("Header.Flux")}</p>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{isMobile ?
|
|
||||||
null
|
|
||||||
:
|
|
||||||
<div class="header-center">
|
<div class="header-center">
|
||||||
<a id="menu-link-home" href="/">{t("Header.Home")}</a>
|
<a id="menu-link-home" href="/">{t("Header.Home")}</a>
|
||||||
<a id="menu-link-products" href="#">{t("Header.Products")}</a>
|
<a id="menu-link-products" href="#">{t("Header.Products")}</a>
|
||||||
|
@ -51,19 +44,10 @@ import Default from '@astrojs/starlight/components/Search.astro';
|
||||||
<a id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
<a id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
}
|
|
||||||
<div class="header-end">
|
<div class="header-end">
|
||||||
<a href="#">{t("Header.Login")}</a>
|
<a class="mobile-hide" href="#">{t("Header.Login")}</a>
|
||||||
<a href="#">{t("Header.SignUp")}</a>
|
<a class="mobile-hide" href="#">{t("Header.SignUp")}</a>
|
||||||
<sl-dropdown id="lang-menu" placement="bottom-end" distance="6">
|
<sl-dropdown class="mobile-show" placement="bottom-end" distance="6">
|
||||||
<sl-button slot="trigger" caret><Language/></sl-button>
|
|
||||||
<sl-menu>
|
|
||||||
<sl-menu-item onclick="location.href = '/'">English</sl-menu-item>
|
|
||||||
<sl-menu-item onclick="location.href = '/jp'">Japanese</sl-menu-item>
|
|
||||||
</sl-menu>
|
|
||||||
</sl-dropdown>
|
|
||||||
{isMobile ?
|
|
||||||
<sl-dropdown placement="bottom-end" distance="6">
|
|
||||||
<sl-button slot="trigger" caret><Menu/></sl-button>
|
<sl-button slot="trigger" caret><Menu/></sl-button>
|
||||||
<sl-menu>
|
<sl-menu>
|
||||||
<sl-menu-item>Home</sl-menu-item>
|
<sl-menu-item>Home</sl-menu-item>
|
||||||
|
@ -75,9 +59,6 @@ import Default from '@astrojs/starlight/components/Search.astro';
|
||||||
<sl-menu-item>Login</sl-menu-item>
|
<sl-menu-item>Login</sl-menu-item>
|
||||||
</sl-menu>
|
</sl-menu>
|
||||||
</sl-dropdown>
|
</sl-dropdown>
|
||||||
:
|
|
||||||
null
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
Reference in a new issue