some website tweeks
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<script lang="ts">
|
||||
import Header from "./components/header.svelte";
|
||||
import Footer from "./components/footer.svelte";
|
||||
import Index from "./index.svelte";
|
||||
import Captive from "./captive.svelte";
|
||||
import Router, { location } from "svelte-spa-router";
|
||||
import { lang } from "./i18n/store";
|
||||
import Header from './components/header.svelte';
|
||||
import Footer from './components/footer.svelte';
|
||||
import Index from './routes/index.svelte';
|
||||
import Captive from './routes/captive.svelte';
|
||||
import Router, { location } from 'svelte-spa-router';
|
||||
import { lang } from './i18n/store';
|
||||
|
||||
const routes = {
|
||||
"/control": Index,
|
||||
"/captive": Captive,
|
||||
'/': Index,
|
||||
'/captive': Captive,
|
||||
// Fallback route
|
||||
"*": Index,
|
||||
'*': Index
|
||||
};
|
||||
|
||||
$: document.documentElement.lang = $lang;
|
||||
$effect(() => {
|
||||
document.documentElement.lang = $lang;
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if $location !== "/captive"}
|
||||
<Header />
|
||||
{/if}
|
||||
<Header />
|
||||
|
||||
<main class="container mx-auto px-4 py-8">
|
||||
<Router {routes} />
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
type="button"
|
||||
class="w-full text-left px-4 py-3 text-sm transition-colors hover:bg-accent hover:text-accent-foreground {option.value ===
|
||||
value
|
||||
? 'bg-primary/10 text-primary font-medium'
|
||||
? 'bg-primary text-primary-foreground font-medium'
|
||||
: ''}"
|
||||
role="option"
|
||||
aria-selected={option.value === value}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { t } from "./i18n/store";
|
||||
import { t } from "../i18n/store";
|
||||
</script>
|
||||
|
||||
<h1>{$t("welcome")} - Captive Portal</h1>
|
||||
@@ -1,11 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import { t } from "./i18n/store";
|
||||
import ControlTab from "./components/control/controlTab.svelte";
|
||||
import ConfigTab from "./components/config/configTab.svelte";
|
||||
import TabButton from "./components/common/tabButton.svelte";
|
||||
import TabBar from "./components/common/tabBar.svelte";
|
||||
import { controlStore } from "./stores/controlStore";
|
||||
import { t } from "../i18n/store";
|
||||
import ControlTab from "../components/control/controlTab.svelte";
|
||||
import ConfigTab from "../components/config/configTab.svelte";
|
||||
import TabButton from "../components/common/tabButton.svelte";
|
||||
import TabBar from "../components/common/tabBar.svelte";
|
||||
import { controlStore } from "../stores/controlStore";
|
||||
|
||||
let activeTab = "control";
|
||||
|
||||
Reference in New Issue
Block a user