55 lines
1.5 KiB
Svelte
55 lines
1.5 KiB
Svelte
<svelte:options runes={true} />
|
|
|
|
<script lang="ts">
|
|
import '../app.postcss';
|
|
import { browser } from '$app/environment';
|
|
import { writable } from 'svelte/store';
|
|
import { themes } from '$lib/types/themes'
|
|
import { apiBaseUrl } from '$lib/components_custom/consts';
|
|
import { LeanChellarisDataStore } from '$lib/stores/ChellarisData';
|
|
import Header from './Header.svelte';
|
|
import Settings from './Settings.svelte';
|
|
import AdminSelectedGameStore from '$lib/stores/admin-page/GameStore';
|
|
import type { ChellarisGameInfo } from '$lib/types/chellaris';
|
|
import UserSettingsStore from '$lib/stores/UserSettingsStore';
|
|
|
|
/* $: {
|
|
fetch(apiBaseUrl + '/v3/ethics').then((res) => {
|
|
res.json().then((data) => {
|
|
$LeanChellarisDataStore.ethics = data.ethics;
|
|
});
|
|
});
|
|
|
|
fetch(apiBaseUrl + '/v3/phenotypes').then((res) => {
|
|
res.json().then((data) => {
|
|
$LeanChellarisDataStore.phenotypes = data.phenotypes;
|
|
});
|
|
});
|
|
|
|
fetch(apiBaseUrl + '/v3/games').then((res) => {
|
|
res.json().then((data: { [key: number]: ChellarisGameInfo }) => {
|
|
if ($AdminSelectedGameStore == 1) {
|
|
$AdminSelectedGameStore = Object.values(data)[0].id;
|
|
}
|
|
|
|
});
|
|
});
|
|
}*/
|
|
|
|
</script>
|
|
|
|
<div class="
|
|
bg-{themes[$UserSettingsStore.themeId].backgroundColor}
|
|
text-{themes[$UserSettingsStore.themeId].textColor}
|
|
h-full" >
|
|
<Header/>
|
|
<slot />
|
|
<!-- (sidebarLeft) -->
|
|
<!-- (sidebarRight) -->
|
|
<!-- <svelte:fragment slot="pageHeader">Page Header</svelte:fragment> -->
|
|
<!-- Router Slot -->
|
|
<!-- ---- / ---- -->
|
|
<!-- (pageFooter) -->
|
|
<!-- (footer) -->
|
|
</div>
|
|
|