Oprava Profile (routes), Layouts in Profile
This commit is contained in:
parent
2a781be8e0
commit
f24a7b8a76
|
@ -55,5 +55,6 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
max-width: var(--max-viewport-width);
|
max-width: var(--max-viewport-width);
|
||||||
|
padding: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<main class="w-full h-full">
|
<main class="w-full h-full ">
|
||||||
<slot />
|
<slot />
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
import Loading from '$src/__loading.svelte'
|
import Loading from '$src/__loading.svelte'
|
||||||
import Error from '$src/__error.svelte'
|
import Error from '$src/__error.svelte'
|
||||||
import NavigationBarLayout from '$lib/components/Layouts/NavigationBarLayout.svelte'
|
import NavigationBarLayout from '$lib/components/Layouts/NavigationBarLayout.svelte'
|
||||||
|
import ArrowBackLayout from '$lib/components/Layouts/ArrowBackLayout.svelte'
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Router
|
<Router
|
||||||
|
@ -50,7 +51,7 @@
|
||||||
{
|
{
|
||||||
path: '/profile/setting/:function',
|
path: '/profile/setting/:function',
|
||||||
component: () => import('$routes/profile/profile-functions.svelte'),
|
component: () => import('$routes/profile/profile-functions.svelte'),
|
||||||
layout: NavigationBarLayout,
|
layout: ArrowBackLayout,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/login',
|
path: '/login',
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { navigate } from '$lib/router'
|
||||||
|
import ArrowBack from '$lib/svg/ArrowBack.svelte'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="w-full h-auto flex flex-wrap flex-col">
|
||||||
|
<button
|
||||||
|
class="absolute mt-4 z-50"
|
||||||
|
on:click={() => {
|
||||||
|
navigate(-1)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ArrowBack />
|
||||||
|
</button>
|
||||||
|
<slot />
|
||||||
|
</div>
|
|
@ -24,28 +24,21 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="main">
|
<div class="main w-full">
|
||||||
<div class="head">
|
<div class="head">
|
||||||
<button
|
|
||||||
on:click={() => {
|
|
||||||
navigate('/profile')
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ArrowBack />
|
|
||||||
</button>
|
|
||||||
<h1>{data.display_name}</h1>
|
<h1>{data.display_name}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<svelte:component this={data.view} />
|
<svelte:component this={data.view} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.main{
|
.main {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: stretch;
|
justify-content: stretch;
|
||||||
height: 100%;
|
height: auto;
|
||||||
.head {
|
.head {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -56,7 +49,7 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
|
|
|
@ -16,10 +16,9 @@
|
||||||
import collections from '$lib/collections'
|
import collections from '$lib/collections'
|
||||||
import { Query } from 'appwrite'
|
import { Query } from 'appwrite'
|
||||||
|
|
||||||
|
|
||||||
export let params: { erantId: string }
|
export let params: { erantId: string }
|
||||||
//
|
//
|
||||||
$: [userInfo] = collections.users.getDocument([Query.equal('userID', params.erantId)])
|
$: [userInfo] = collections.users.getDocument([Query.equal('erantId', params.erantId)])
|
||||||
|
|
||||||
$: console.log($user)
|
$: console.log($user)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue