2022-01-28 05:27:12 +00:00
|
|
|
<script lang="ts">
|
2023-05-24 06:28:23 +00:00
|
|
|
import { enhance } from '$app/forms';
|
2023-07-01 23:12:17 +00:00
|
|
|
import { LogOut } from 'lucide-svelte';
|
|
|
|
|
import Button from '$components/ui/button/Button.svelte';
|
2023-06-16 06:28:49 +00:00
|
|
|
// import Profile from '../preferences/profile.svelte';
|
2022-10-31 19:06:27 +00:00
|
|
|
import logo from './bored-game.png';
|
2023-05-21 05:18:04 +00:00
|
|
|
|
|
|
|
|
export let user: any;
|
2022-01-28 05:27:12 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<header>
|
2022-10-31 19:06:27 +00:00
|
|
|
<div class="corner">
|
|
|
|
|
<a href="/" title="Home">
|
|
|
|
|
<img src={logo} alt="Bored Game Home" />
|
|
|
|
|
</a>
|
|
|
|
|
</div>
|
2023-01-17 07:07:15 +00:00
|
|
|
<!-- <TextSearch /> -->
|
2022-10-31 19:06:27 +00:00
|
|
|
<nav>
|
2023-05-21 05:18:04 +00:00
|
|
|
{#if user}
|
2023-06-16 06:28:49 +00:00
|
|
|
<a href="/collection" title="Go to your collection" data-sveltekit-preload-data>Collection</a>
|
|
|
|
|
<a href="/wishlist" title="Go to your wishlist" data-sveltekit-preload-data>Wishlist</a>
|
2023-05-24 06:28:23 +00:00
|
|
|
<form
|
|
|
|
|
use:enhance
|
|
|
|
|
action="/auth/signout"
|
|
|
|
|
method="POST"
|
|
|
|
|
>
|
2023-07-01 23:12:17 +00:00
|
|
|
<Button type="submit">
|
|
|
|
|
<LogOut class="mr-2 h-4 w-4"/>
|
|
|
|
|
Sign out
|
|
|
|
|
</Button>
|
2023-05-24 06:28:23 +00:00
|
|
|
</form>
|
2023-05-21 05:18:04 +00:00
|
|
|
{/if}
|
|
|
|
|
{#if !user}
|
2023-05-24 06:28:23 +00:00
|
|
|
<a href="/auth/signin">
|
|
|
|
|
<span class="flex-auto">Sign In</span></a
|
|
|
|
|
>
|
|
|
|
|
<a href="/auth/signup">
|
|
|
|
|
<span class="flex-auto">Sign Up</span></a
|
|
|
|
|
>
|
|
|
|
|
{/if}
|
2023-06-16 06:28:49 +00:00
|
|
|
<!-- <Profile /> -->
|
2022-10-31 19:06:27 +00:00
|
|
|
</nav>
|
2022-01-28 05:27:12 +00:00
|
|
|
</header>
|
|
|
|
|
|
2023-06-16 06:28:49 +00:00
|
|
|
<style lang="postcss">
|
2022-10-31 19:06:27 +00:00
|
|
|
header {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: var(--containerPadding);
|
|
|
|
|
font-size: 1.6rem;
|
2022-07-21 06:20:32 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
@media (max-width: 1000px) {
|
|
|
|
|
padding-top: 1.25rem;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
.corner {
|
|
|
|
|
width: 3em;
|
|
|
|
|
height: 3em;
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
.corner a {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
.corner img {
|
|
|
|
|
width: 2em;
|
|
|
|
|
height: 2em;
|
|
|
|
|
object-fit: contain;
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
nav {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 1rem;
|
|
|
|
|
margin: 1rem;
|
|
|
|
|
--background: rgba(255, 255, 255, 0.7);
|
|
|
|
|
}
|
2022-05-03 02:31:50 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
nav a {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 100%;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 0 1em;
|
|
|
|
|
color: var(--heading-color);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.1em;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
transition: color 0.2s linear;
|
|
|
|
|
}
|
2022-05-03 02:31:50 +00:00
|
|
|
|
2022-10-31 19:06:27 +00:00
|
|
|
a:hover {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
color: var(--accent-color);
|
|
|
|
|
}
|
2022-01-28 05:27:12 +00:00
|
|
|
</style>
|