Kleinere Anpassungen für Seiten- und Navigations- Bearbeitung.
This commit is contained in:
@@ -14,13 +14,9 @@
|
||||
}
|
||||
|
||||
const setLanguage = (lang: string) => {
|
||||
let path = $location.path.split("/")
|
||||
path[1] = lang
|
||||
|
||||
$location.path = path.join("/")
|
||||
$currentLang = lang
|
||||
|
||||
navigate($location.path + $location.search, { replace: true })
|
||||
// $location.path = "/" + lang
|
||||
// navigate($location.path + $location.search, { replace: true })
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { mdiMenu } from "@mdi/js"
|
||||
|
||||
import { links } from "svelte-routing"
|
||||
import { navigations, currentLang } from "../../store"
|
||||
import { navigations, currentLang, location } from "../../store"
|
||||
|
||||
import LanguageChooser from "./LanguageChooser.svelte"
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
{item.settings.title}
|
||||
</a>
|
||||
{:else}
|
||||
<a href="/{navigation.locale}{item.settings.page}">
|
||||
<a href="{item.settings.page}" class:active="{item.settings.page === $location.path}">
|
||||
{item.settings.title}
|
||||
</a>
|
||||
{/if}
|
||||
@@ -69,7 +69,11 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="nav-item">
|
||||
<a href="/{navigation.locale}{item.settings.page}" on:click="{() => (showMobileNav = false)}">
|
||||
<a
|
||||
href="{item.settings.page}"
|
||||
on:click="{() => (showMobileNav = false)}"
|
||||
class:active="{item.settings.page === $location.path}"
|
||||
>
|
||||
{item.settings.title}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user