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 { 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
|
||||
if (Astro.url.pathname.startsWith("/support")) {
|
||||
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 === "Support") {var Select_Support = true}
|
||||
|
||||
import Default from '@astrojs/starlight/components/Search.astro';
|
||||
// Components
|
||||
import Default from '@astrojs/starlight/components/Search.astro'
|
||||
---
|
||||
|
||||
<header>
|
||||
|
@ -38,46 +34,31 @@ import Default from '@astrojs/starlight/components/Search.astro';
|
|||
<p>{t("Header.Flux")}</p>
|
||||
</a>
|
||||
</div>
|
||||
{isMobile ?
|
||||
null
|
||||
:
|
||||
<div class="header-center">
|
||||
<a id="menu-link-home" href="/">{t("Header.Home")}</a>
|
||||
<a id="menu-link-products" href="#">{t("Header.Products")}</a>
|
||||
<a id="menu-link-pricing" href="/pricing">{t("Header.Pricing")}</a>
|
||||
{IsOnSupport ?
|
||||
<a style="background: white; color: black;" id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
||||
:
|
||||
<a id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
<div class="header-center">
|
||||
<a id="menu-link-home" href="/">{t("Header.Home")}</a>
|
||||
<a id="menu-link-products" href="#">{t("Header.Products")}</a>
|
||||
<a id="menu-link-pricing" href="/pricing">{t("Header.Pricing")}</a>
|
||||
{IsOnSupport ?
|
||||
<a style="background: white; color: black;" id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
||||
:
|
||||
<a id="menu-link-support" href="/support">{t("Header.Support")}</a>
|
||||
}
|
||||
</div>
|
||||
<div class="header-end">
|
||||
<a href="#">{t("Header.Login")}</a>
|
||||
<a href="#">{t("Header.SignUp")}</a>
|
||||
<sl-dropdown id="lang-menu" placement="bottom-end" distance="6">
|
||||
<sl-button slot="trigger" caret><Language/></sl-button>
|
||||
<a class="mobile-hide" href="#">{t("Header.Login")}</a>
|
||||
<a class="mobile-hide" href="#">{t("Header.SignUp")}</a>
|
||||
<sl-dropdown class="mobile-show" placement="bottom-end" distance="6">
|
||||
<sl-button slot="trigger" caret><Menu/></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-item>Home</sl-menu-item>
|
||||
<sl-menu-item>Products</sl-menu-item>
|
||||
<sl-menu-item>Pricing</sl-menu-item>
|
||||
<sl-menu-item>Support</sl-menu-item>
|
||||
<sl-divider></sl-divider>
|
||||
<sl-menu-item>Sign Up</sl-menu-item>
|
||||
<sl-menu-item>Login</sl-menu-item>
|
||||
</sl-menu>
|
||||
</sl-dropdown>
|
||||
{isMobile ?
|
||||
<sl-dropdown placement="bottom-end" distance="6">
|
||||
<sl-button slot="trigger" caret><Menu/></sl-button>
|
||||
<sl-menu>
|
||||
<sl-menu-item>Home</sl-menu-item>
|
||||
<sl-menu-item>Products</sl-menu-item>
|
||||
<sl-menu-item>Pricing</sl-menu-item>
|
||||
<sl-menu-item>Support</sl-menu-item>
|
||||
<sl-divider></sl-divider>
|
||||
<sl-menu-item>Sign Up</sl-menu-item>
|
||||
<sl-menu-item>Login</sl-menu-item>
|
||||
</sl-menu>
|
||||
</sl-dropdown>
|
||||
:
|
||||
null
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
|
Reference in a new issue