feat: refactor how frontend was structured
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 1m16s

This commit is contained in:
2024-04-25 01:53:20 +02:00
parent f51f61df17
commit c28ef550a9
18 changed files with 264 additions and 225 deletions

View File

@@ -0,0 +1,39 @@
<script lang="ts">
import { getContext } from "svelte";
import type { Readable } from "svelte/store";
export let id: string;
export let icon: string = "";
export let title = "";
const registerPanel =
getContext<(id: string, icon: string) => Readable<boolean>>(
"registerPanel",
);
let visible = registerPanel(id, icon);
</script>
{#if $visible}
<div class="wrapper">
{#if title}
<header>
<h3>{title}</h3>
</header>
{/if}
<slot />
</div>
{/if}
<style>
header {
border-bottom: solid thin var(--outline);
height: 69px;
display: flex;
align-items: center;
padding-left: 1em;
}
h3 {
margin: 0px;
}
</style>