mirror of
https://github.com/BradNut/boredgame
synced 2025-09-08 17:40:22 +00:00
Renaming transition and adding to the auth layout.
This commit is contained in:
parent
3ead1dc357
commit
140b312916
4 changed files with 17 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { fade, fly } from 'svelte/transition';
|
import { fade } from 'svelte/transition';
|
||||||
|
|
||||||
interface Transition {
|
interface Transition {
|
||||||
type: 'fade' | 'stagger' | 'page';
|
type: 'fade' | 'stagger' | 'page';
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import 'iconify-icon';
|
import 'iconify-icon';
|
||||||
import Transition from '$lib/components/transition/index.svelte';
|
import Transition from '$lib/components/transition.svelte';
|
||||||
import Header from '$lib/components/header/index.svelte';
|
import Header from '$lib/components/header/index.svelte';
|
||||||
import Footer from '$lib/components/footer.svelte';
|
import Footer from '$lib/components/footer.svelte';
|
||||||
|
|
||||||
|
|
|
||||||
9
src/routes/(auth)/+layout.server.ts
Normal file
9
src/routes/(auth)/+layout.server.ts
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { loadFlash } from 'sveltekit-flash-message/server';
|
||||||
|
import type { LayoutServerLoad } from './$types';
|
||||||
|
|
||||||
|
export const load: LayoutServerLoad = loadFlash(async ({ url, locals }) => {
|
||||||
|
return {
|
||||||
|
url: url.pathname,
|
||||||
|
user: locals.user
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
import { page } from "$app/stores";
|
import { page } from "$app/stores";
|
||||||
import { Button } from "$lib/components/ui/button";
|
import { Button } from "$lib/components/ui/button";
|
||||||
import Logo from "$lib/components/logo.svelte";
|
import Logo from "$lib/components/logo.svelte";
|
||||||
|
import Transition from '$lib/components/transition.svelte';
|
||||||
|
|
||||||
|
export let data;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
@ -38,9 +41,10 @@
|
||||||
</blockquote>
|
</blockquote>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="auth-form">
|
<div class="auth-form">
|
||||||
<slot />
|
<Transition url={data.url} transition={{ type: 'page' }}>
|
||||||
|
<slot />
|
||||||
|
</Transition>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue