Anvil/src/routes/+layout.svelte
André Jaenisch 1e52798e6a
chore: introduce REUSE
This required adding annotation to the whole project.
I need to double-check whether I have the license banner of AGPL in
place everywhere.

Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2024-03-06 16:03:12 +01:00

71 lines
1.8 KiB
Svelte

<!--
SPDX-FileCopyrightText: 2023 Pere Lev
SPDX-FileCopyrightText: 2024 André Jaenisch
SPDX-License-Identifier: AGPL-3.0-or-later
-->
<script lang="ts">
// The ordering of these imports is critical to your app working properly
//import '@skeletonlabs/skeleton/themes/theme-skeleton.css';
import '../theme.postcss';
// If you have source.organizeImports set to true in VSCode, then it will auto change this ordering
//import '@skeletonlabs/skeleton/styles/skeleton.css';
// Most of your app wide CSS should be put in this file
import '../app.postcss';
import { AppShell, AppBar } from '@skeletonlabs/skeleton';
import { locale, locales } from 'svelte-i18n';
import { mapLocaleToDir } from '$lib/i18n';
locale.subscribe((l) => {
if (typeof document !== 'undefined') {
document.dir = mapLocaleToDir(l);
}
});
</script>
<!-- App Shell -->
<AppShell>
<svelte:fragment slot="header">
<!-- App Bar -->
<AppBar>
<svelte:fragment slot="lead">
<strong class="text-xl">Anvil</strong>
</svelte:fragment>
<svelte:fragment slot="trail">
<select bind:value={$locale} class="select">
{#each $locales as locale}
<option value={locale}>{locale}</option>
{/each}
</select>
<a
class="btn btn-sm variant-ghost-surface"
href="https://matrix.to/#/#general-forgefed:matrix.batsense.net"
target="_blank"
rel="noreferrer"
>
Matrix
</a>
<a
class="btn btn-sm variant-ghost-surface"
href="https://forgefed.org"
target="_blank"
rel="noreferrer"
>
ForgeFed
</a>
<a
class="btn btn-sm variant-ghost-surface"
href="https://codeberg.org/anvil/anvil"
target="_blank"
rel="noreferrer"
>
Code
</a>
</svelte:fragment>
</AppBar>
</svelte:fragment>
<!-- Page Route Content -->
<slot />
</AppShell>