2023-09-11 22:15:53 +00:00
< script lang = "ts" >
import { page } from "$app/stores";
import { Button } from "$lib/components/ui/button";
import Logo from "$lib/components/logo.svelte";
2023-09-19 00:48:39 +00:00
import Transition from '$lib/components/transition.svelte';
2024-07-07 06:12:36 +00:00
let { data , children } = $props();
2023-09-11 22:15:53 +00:00
< / script >
< div class = "container" >
2023-11-13 06:04:44 +00:00
< a href = "/" class = "auth-logo" >
< div class = "logo-image" >
< Logo / >
< / div >
Bored Game
< / a >
2023-09-11 22:15:53 +00:00
< Button
href={ $page . url . pathname === "/sign-up" ? "/login" : "/sign-up" }
variant="ghost"
class="auth-button"
>
{ #if $page . url . pathname === "/sign-up" }
Login
{ : else }
Sign up
{ /if }
< / Button >
< div class = "auth-marketing" >
< div
class="image"
style="
background-image:
url(https://images.unsplash.com/photo-1588591795084-1770cb3be374?ixlib=rb-4.0.3& ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D& auto=format& fit=crop& w=2070& q=80"
2024-07-07 06:12:36 +00:00
>< / div >
2023-09-11 22:15:53 +00:00
< div class = "quote-wrapper" >
< blockquote class = "quote" >
< p >
2023-09-12 23:49:04 +00:00
"How many games do I own? What was the last one I played? What haven't I played in a long time? If this sounds like you then Bored Game is your new best friend."
2023-09-11 22:15:53 +00:00
< / p >
< footer > Bradley< / footer >
< / blockquote >
< / div >
< / div >
< div class = "auth-form" >
2023-09-19 00:48:39 +00:00
< Transition url = { data . url } transition= {{ type : 'page' }} >
2024-07-07 06:12:36 +00:00
{ @render children ()}
2023-09-19 00:48:39 +00:00
< / Transition >
2023-09-11 22:15:53 +00:00
< / div >
< / div >
< style lang = "postcss" >
.container {
2023-09-13 06:07:29 +00:00
display: flex;
2023-09-11 22:15:53 +00:00
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
min-height: 100vh;
2024-02-16 01:18:37 +00:00
@media (width >= 768px) {
2023-09-11 22:15:53 +00:00
display: grid
}
2024-02-16 01:18:37 +00:00
@media (width >= 1024px) {
2023-09-11 22:15:53 +00:00
padding-left: 0;
padding-right: 0;
grid-template-columns: repeat(2, minmax(0, 1fr));
max-width: none;
}
2023-09-12 00:29:15 +00:00
.auth-marketing {
display: none;
position: relative;
padding: 2.5rem;
flex-direction: column;
height: 100%;
color: #ffffff;
2023-09-11 22:15:53 +00:00
2024-02-16 01:18:37 +00:00
@media (width >= 1024px) {
2023-09-12 00:29:15 +00:00
display: flex;
}
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
.image {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-size: cover;
}
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
.quote-wrapper {
position: relative;
z-index: 20;
margin-top: auto;
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
.quote {
margin-top: 0.5rem;
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
p {
font-size: 1.125rem;
line-height: 1.75rem;
}
}
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
footer {
font-size: 0.875rem;
line-height: 1.25rem;
2023-09-11 22:15:53 +00:00
}
}
2023-09-12 00:29:15 +00:00
}
2023-09-11 22:15:53 +00:00
2023-09-12 00:29:15 +00:00
.auth-form {
2024-02-16 01:18:37 +00:00
@media (width >= 1024px) {
2023-09-12 00:29:15 +00:00
padding: 2rem;
2023-09-11 22:15:53 +00:00
}
}
}
2023-09-12 00:29:15 +00:00
:global(.auth-button) {
position: absolute;
top: 1rem;
right: 1rem;
2024-02-16 01:18:37 +00:00
@media (min-width >= 768px) {
2023-09-12 00:29:15 +00:00
top: 2rem;
right: 2rem;
2023-09-11 22:15:53 +00:00
}
}
2023-11-13 06:04:44 +00:00
2024-02-16 01:18:37 +00:00
.auth-logo {
2023-11-13 06:04:44 +00:00
display: flex;
position: relative;
z-index: 20;
gap: 0.5rem;
align-items: center;
font-size: 1.125rem;
line-height: 1.75rem;
font-weight: 500;
transition-property: color, background-color, border-color,text-decoration-color, fill, stroke;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 300ms;
2024-02-16 01:18:37 +00:00
top: 1rem;
left: 1rem;
2023-11-13 06:04:44 +00:00
& :hover {
color: hsl(var(--muted-foreground));
}
.logo-image {
width: 2rem;
height: 2rem;
}
2024-02-16 01:18:37 +00:00
@media (width < = 768px) {
2023-11-13 06:04:44 +00:00
position: absolute;
2024-02-16 01:18:37 +00:00
2023-11-13 06:04:44 +00:00
}
2024-02-16 01:18:37 +00:00
@media (width > 768px) {
2023-11-13 06:04:44 +00:00
position: absolute;
2024-02-16 01:18:37 +00:00
--fg: #2c3e50;
2023-11-13 06:04:44 +00:00
}
2024-02-16 01:18:37 +00:00
@media (width >= 1024px) {
2023-11-13 06:04:44 +00:00
color: white;
2024-02-16 01:18:37 +00:00
--fg: white;
2023-11-13 06:04:44 +00:00
}
}
2023-09-11 22:15:53 +00:00
< / style >