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">
|
||||
import "../styles/button.css";
|
||||
import { CaretDownOutline, SearchOutline } from "flowbite-svelte-icons";
|
||||
import { t } from "astro-i18n";
|
||||
import { l } from "../util/util";
|
||||
import { CaretDownOutline, GlobeOutline } from "flowbite-svelte-icons";
|
||||
import { t, l } from "astro-i18n";
|
||||
import { onMount } from "svelte";
|
||||
import { loggedIn } from "@repo/authv2.ts";
|
||||
interface Props {
|
||||
@@ -119,11 +118,16 @@
|
||||
<a class="btn" href={l("/login")} bind:this={accountBtn}>
|
||||
<span class="btn__text">{t("navbar.links.account")}</span>
|
||||
</a>
|
||||
<!--
|
||||
<button class="btn my-1" onclick={() => searchOpen = true}>
|
||||
<SearchOutline ariaLabel="Site Search" class="inline-block h-6"/>
|
||||
<div class="btn-dropdown">
|
||||
<button class="btn btn-gray">
|
||||
<GlobeOutline />
|
||||
</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>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user