2024-07-31 10:29:46 +02:00
|
|
|
<script lang="ts">
|
|
|
|
|
import { page } from "$app/stores";
|
|
|
|
|
const { data, children } = $props();
|
2024-08-01 18:09:35 +02:00
|
|
|
|
|
|
|
|
const isProjectRoute = $derived($page.url.pathname.startsWith("/website"));
|
2024-07-31 10:29:46 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<nav>
|
2024-08-01 18:09:35 +02:00
|
|
|
<strong>archtika</strong>
|
2024-07-31 10:29:46 +02:00
|
|
|
{#if data.user}
|
2024-08-01 18:09:35 +02:00
|
|
|
<a href="/">Dashboard</a>
|
2024-07-31 10:29:46 +02:00
|
|
|
<a href="/account">Account</a>
|
|
|
|
|
{:else}
|
|
|
|
|
<a href="/register">Register</a>
|
|
|
|
|
<a href="/login">Login</a>
|
|
|
|
|
{/if}
|
|
|
|
|
</nav>
|
|
|
|
|
|
2024-08-01 18:09:35 +02:00
|
|
|
{#if !isProjectRoute}
|
|
|
|
|
<header>
|
|
|
|
|
<h1>{$page.url.pathname}</h1>
|
|
|
|
|
</header>
|
|
|
|
|
{/if}
|
2024-07-31 10:29:46 +02:00
|
|
|
|
2024-08-01 18:09:35 +02:00
|
|
|
<main class:editor={isProjectRoute}>
|
2024-07-31 10:29:46 +02:00
|
|
|
{@render children()}
|
|
|
|
|
</main>
|
|
|
|
|
|
|
|
|
|
<footer>
|
|
|
|
|
<p>
|
2024-08-01 18:09:35 +02:00
|
|
|
<small>archtika is a free, open, modern, performant and lightweight CMS</small>
|
2024-07-31 10:29:46 +02:00
|
|
|
</p>
|
|
|
|
|
</footer>
|
2024-08-01 18:09:35 +02:00
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
nav,
|
|
|
|
|
header,
|
|
|
|
|
main,
|
|
|
|
|
footer {
|
|
|
|
|
padding-block: 1rem;
|
|
|
|
|
inline-size: min(100% - 2rem, 1024px);
|
|
|
|
|
margin-inline: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
footer {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.editor {
|
|
|
|
|
inline-size: min(100% - 2rem, 1536px);
|
|
|
|
|
block-size: calc(100vh - 7rem);
|
|
|
|
|
border: 0.0625rem solid hsl(0 0% 50%);
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
display: flex;
|
|
|
|
|
padding-block: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:global(section) {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
:global(form) {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
}
|
|
|
|
|
</style>
|