[TASK] add header and first nested components

This commit is contained in:
Marie Birner
2023-06-16 23:24:44 +02:00
parent 7d1b86cae8
commit 0154158c80
9 changed files with 136 additions and 196 deletions

View File

@@ -1,28 +1,22 @@
<script lang="ts">
import { loggedin } from '../store.js';
import { user } from '../stores/User.js';
import Header from './Header.svelte';
import '../app.css';
const date = new Date();
let isLoggedIn: Boolean;
loggedin.subscribe(value => {
isLoggedIn = value;
});
</script>
<div class="bg-gray-100">
{#if isLoggedIn}
{#if $user.status}
<Header />
{/if}
<main class="flex min-h-screen {isLoggedIn ? 'items-start' : 'items-center'} justify-center px-4 py-12 sm:px-6 lg:px-8">
<main class="flex min-h-screen { $user.status ? 'items-start' : 'items-center'} justify-center px-4 py-12 sm:px-6 lg:px-8">
<slot />
</main>
{#if isLoggedIn}
{#if $user.status}
<footer class="bg-primary-950 text-white w-full flex justify-center p-3">
<div class="max-w-screen-xl w-full flex justify-between">
<div>