Refactor Navbar component to replace search button with language selection dropdown
All checks were successful
SteamWarCI Build successful
All checks were successful
SteamWarCI Build successful
This commit is contained in:
@@ -19,9 +19,8 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import "../styles/button.css";
|
import "../styles/button.css";
|
||||||
import { CaretDownOutline, SearchOutline } from "flowbite-svelte-icons";
|
import { CaretDownOutline, GlobeOutline } from "flowbite-svelte-icons";
|
||||||
import { t } from "astro-i18n";
|
import { t, l } from "astro-i18n";
|
||||||
import { l } from "../util/util";
|
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import { loggedIn } from "@repo/authv2.ts";
|
import { loggedIn } from "@repo/authv2.ts";
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -119,11 +118,16 @@
|
|||||||
<a class="btn" href={l("/login")} bind:this={accountBtn}>
|
<a class="btn" href={l("/login")} bind:this={accountBtn}>
|
||||||
<span class="btn__text">{t("navbar.links.account")}</span>
|
<span class="btn__text">{t("navbar.links.account")}</span>
|
||||||
</a>
|
</a>
|
||||||
<!--
|
<div class="btn-dropdown">
|
||||||
<button class="btn my-1" onclick={() => searchOpen = true}>
|
<button class="btn btn-gray">
|
||||||
<SearchOutline ariaLabel="Site Search" class="inline-block h-6"/>
|
<GlobeOutline />
|
||||||
</button>
|
</button>
|
||||||
-->
|
<div>
|
||||||
|
<a href={l("/")} onclick={() => cookieStore.delete("MANUAL_LANGUAGE")} class="btn btn-gray">Auto</a>
|
||||||
|
<a href={l("/", {}, { targetLocale: "de" })} onclick={() => cookieStore.set("MANUAL_LANGUAGE", "TRUE")} class="btn btn-gray">Deutsch</a>
|
||||||
|
<a href={l("/", {}, { targetLocale: "en" })} onclick={() => cookieStore.set("MANUAL_LANGUAGE", "TRUE")} class="btn btn-gray">English</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user