[TASK] add header and first nested components
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user