Merge pull request #51 from Erant-s-r-o/Kuba/Změny

Kuba/změny
This commit is contained in:
Jakub Schenk 2023-02-14 16:06:40 +01:00 committed by GitHub
commit 263929b5ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 170 additions and 73 deletions

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -13,7 +13,7 @@
$: if (isReady && !$user) {
if (!(location.pathname.startsWith('/login') || location.pathname.startsWith('/register'))) {
navigate('/login')
//navigate('/login')
}
}

View File

@ -39,6 +39,14 @@
path: '/profile',
component: () => import('$routes/profile/profile.svelte'),
},
{
path: '/profile/payment_history',
component: () => import('$routes/profile/payment_history.svelte'),
},
{
path: '/legal/terms_of_service',
component: () => import('$routes/profile/legal/TOS.svelte'),
},
{
path: '/login',
component: () => import('$routes/log_in.svelte'),

View File

@ -1,7 +1,7 @@
<script>
import { onMount } from 'svelte';
// 420 px
export var images = [{"color":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"}, {"color":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"}, {"color":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"}, {"color":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"}, {"color":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"}]
export var images = ["https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg", "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg", "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg", "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg", "https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg"]
let default_index = 3
@ -119,7 +119,7 @@
max-width: {getWidth(mp.at(index+default_index)-scrollProgress)}px;
z-index: {zIndex(mp.at(index+default_index)-scrollProgress)};
{getMargin(mp.at(index+default_index)-scrollProgress)}">
<img src={image.color}>
<img src={image}>
</div>
{/each}

View File

@ -3,7 +3,7 @@
import Setting from './../../svg/Setting.svelte'
import { navigate } from 'svelte-routing'
import { onMount } from 'svelte'
let showCookiePopUp = localStorage.getItem('cookies') !== 'dismissed'
let showCookiePopUp = localStorage.getItem('cookies') !== 'accepted'
let animation = false
let url = window.location.href
onMount(() => {
@ -28,17 +28,23 @@
<button on:click={() => navigate('cookies/settings')} class="w-min h-min flex-grow-0"><Setting /></button>
<div class="flex flex-wrap flex-row gap-2">
<div class="text-[28px] font-semibold">Cookies settings</div>
<div>Our website uses cookies to operate, by continuing you agree to our <a class="text-[#4263EB]" href="/cookies/policy">cookie policy</a>.</div>
<div>Our website uses cookies to operate, by continuing you agree to our <a class="text-[#4263EB]" href="/legal/cookie_policy.pdf">cookie policy</a>.</div>
</div>
<button on:click={() => (showCookiePopUp = false)} class="w-min h-min relative flex-grow-0"><Times /></button>
</div>
<div class="w-full h-auto flex justify-end bg-[#F3F4F6] p-[16px]">
<div class="w-full h-auto flex justify-end bg-[#F3F4F6] p-[16px] gap-[20px]">
<button
on:click={() => {
showCookiePopUp = false
localStorage.setItem('cookies', 'dismissed')
localStorage.setItem('cookies', 'declined')
}}
class="w-[84px] h-[37px] bg-[#09205D] text-white rounded-[8px] text-[18px]">Dismiss</button
class="w-[84px] h-[37px] bg-[#OOO] text-black rounded-[8px] text-[18px]">Decline</button
>
<button
on:click={() => {
showCookiePopUp = false
localStorage.setItem('cookies', 'accepted')
}}
class="w-[84px] h-[37px] bg-[#09205D] text-white rounded-[8px] text-[18px]">Accept</button
>
</div>
</div>

View File

@ -21,12 +21,6 @@
image_url:
"data:image/svg+xml,%3Csvg width='18' height='24' viewBox='0 0 18 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.833496 8.80925C0.833496 4.29425 4.48516 0.642578 9.00016 0.642578C13.5152 0.642578 17.1668 4.29425 17.1668 8.80925C17.1668 13.6742 12.0102 20.3826 9.8985 22.9376C9.43183 23.4976 8.58016 23.4976 8.1135 22.9376C5.99016 20.3826 0.833496 13.6742 0.833496 8.80925ZM6.0835 8.80925C6.0835 10.4192 7.39016 11.7259 9.00016 11.7259C10.6102 11.7259 11.9168 10.4192 11.9168 8.80925C11.9168 7.19924 10.6102 5.89258 9.00016 5.89258C7.39016 5.89258 6.0835 7.19924 6.0835 8.80925Z' fill='%2361646B' /%3E%3C/svg%3E%0A",
},
{
name: 'Trips',
url: '',
image_url:
"data:image/svg+xml,%3Csvg width='26' height='22' viewBox='0 0 26 22' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.3662 5.53348C14.8832 5.53348 14.4912 5.14148 14.4912 4.65848V1.83398C14.4912 1.35098 14.8832 0.958984 15.3662 0.958984C15.8492 0.958984 16.2412 1.35098 16.2412 1.83398V4.65848C16.2412 5.14148 15.8492 5.53348 15.3662 5.53348Z' fill='%2361646B'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.3662 20.8318C14.8832 20.8318 14.4912 20.4398 14.4912 19.9568V17.5967C14.4912 17.1125 14.8832 16.7217 15.3662 16.7217C15.8492 16.7217 16.2412 17.1125 16.2412 17.5967V19.9568C16.2412 20.4398 15.8492 20.8318 15.3662 20.8318Z' fill='%2361646B'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15.3662 14.4634C14.8832 14.4634 14.4912 14.0714 14.4912 13.5884V7.96387C14.4912 7.48087 14.8832 7.08887 15.3662 7.08887C15.8492 7.08887 16.2412 7.48087 16.2412 7.96387V13.5884C16.2412 14.0714 15.8492 14.4634 15.3662 14.4634Z' fill='%2361646B'/%3E%3Cmask id='mask0_1515_513' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='0' y='0' width='26' height='22'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.666626 0.666992H25.75V21.0833H0.666626V0.666992Z' fill='white'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_1515_513)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.41663 14.1467V16.4088C2.41663 18.0212 3.75013 19.3337 5.38929 19.3337H21.0273C22.6665 19.3337 24 18.0212 24 16.4088V14.1467C22.5405 13.7628 21.4601 12.4422 21.4601 10.8765C21.4601 9.30966 22.5393 7.99016 24 7.60633L23.9988 5.34183C23.9988 3.72949 22.6653 2.41699 21.0261 2.41699H5.39046C3.75129 2.41699 2.41779 3.72949 2.41779 5.34183L2.41663 7.69616C3.89479 8.05899 4.95646 9.32599 4.95646 10.8765C4.95646 12.4422 3.87613 13.7628 2.41663 14.1467ZM21.0273 21.0837H5.38929C2.78529 21.0837 0.666626 18.986 0.666626 16.4088V13.3848C0.666626 12.9018 1.05863 12.5098 1.54163 12.5098C2.45979 12.5098 3.20646 11.7772 3.20646 10.8765C3.20646 10.0015 2.49013 9.34116 1.54163 9.34116C1.30946 9.34116 1.08663 9.24899 0.923293 9.08449C0.758793 8.92116 0.666626 8.69716 0.666626 8.46616L0.667793 5.34183C0.667793 2.76466 2.78646 0.666992 5.39046 0.666992H21.0261C23.6301 0.666992 25.7488 2.76466 25.7488 5.34183L25.75 8.36816C25.75 8.59916 25.6578 8.82316 25.4933 8.98649C25.33 9.15099 25.1071 9.24316 24.875 9.24316C23.9568 9.24316 23.2101 9.97583 23.2101 10.8765C23.2101 11.7772 23.9568 12.5098 24.875 12.5098C25.358 12.5098 25.75 12.9018 25.75 13.3848V16.4088C25.75 18.986 23.6313 21.0837 21.0273 21.0837Z' fill='%2361646B'/%3E%3C/g%3E%3C/svg%3E ",
},
{
name: 'Profile',
url: '/profile',
@ -36,14 +30,16 @@
]
let className = ''
export { className as class }
</script>
<div class="h-full w-full absolute">
<div class={'section w-full h-[calc(100%-100px)] overflow-auto ' + className}><slot /></div>
<div class="footer">
{#each items as { name, url, image_url }}
{#if location.pathname === url}
{#if location.pathname === url || location.pathname.includes(url + "/")}
<FooterItem on:click={() => navigate(url)} active={true} {name} {url}>
<img alt="" style="filter: invert(44%) sepia(66%) saturate(6619%) hue-rotate(222deg) brightness(98%) contrast(88%);" src={image_url} />
</FooterItem>

View File

@ -0,0 +1,5 @@
<svg width="35" height="28" viewBox="0 0 35 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.8335 0.666992H4.16683C2.31683 0.666992 0.850163 2.15033 0.850163 4.00033L0.833496 24.0003C0.833496 25.8503 2.31683 27.3337 4.16683 27.3337H30.8335C32.6835 27.3337 34.1668 25.8503 34.1668 24.0003V4.00033C34.1668 2.15033 32.6835 0.666992 30.8335 0.666992ZM29.1668 24.0003H5.8335C4.91683 24.0003 4.16683 23.2503 4.16683 22.3337V14.0003H30.8335V22.3337C30.8335 23.2503 30.0835 24.0003 29.1668 24.0003ZM4.16683 7.33366H30.8335V5.66699C30.8335 4.75033 30.0835 4.00033 29.1668 4.00033H5.8335C4.91683 4.00033 4.16683 4.75033 4.16683 5.66699V7.33366Z" fill="#4263EB"/>
</svg>

After

Width:  |  Height:  |  Size: 722 B

View File

@ -1,8 +1,4 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M25 5H5C3.6125 5 2.5125 6.1125 2.5125 7.5L2.5 22.5C2.5 23.8875 3.6125 25 5 25H25C26.3875 25 27.5 23.8875 27.5 22.5V7.5C27.5 6.1125 26.3875 5 25 5ZM23.75 22.5H6.25C5.5625 22.5 5 21.9375 5 21.25V15H25V21.25C25 21.9375 24.4375 22.5 23.75 22.5ZM5 10H25V8.75C25 8.0625 24.4375 7.5 23.75 7.5H6.25C5.5625 7.5 5 8.0625 5 8.75V10Z"
fill="#4263EB"
/>
<svg width="26" height="20" viewBox="0 0 26 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M23 0H3C1.6125 0 0.5125 1.1125 0.5125 2.5L0.5 17.5C0.5 18.8875 1.6125 20 3 20H23C24.3875 20 25.5 18.8875 25.5 17.5V2.5C25.5 1.1125 24.3875 0 23 0ZM21.75 17.5H4.25C3.5625 17.5 3 16.9375 3 16.25V10H23V16.25C23 16.9375 22.4375 17.5 21.75 17.5ZM3 5H23V3.75C23 3.0625 22.4375 2.5 21.75 2.5H4.25C3.5625 2.5 3 3.0625 3 3.75V5Z" fill="#4263EB"/>
</svg>

Before

Width:  |  Height:  |  Size: 503 B

After

Width:  |  Height:  |  Size: 493 B

View File

@ -27,6 +27,7 @@
<style lang="scss">
.content {
width: 100%;
height: 100%;
max-height: 100vh;
overflow-y: scroll;

View File

@ -0,0 +1,10 @@
<script></script>
<svelte:head>
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js" ></script>
</svelte:head>
<lottie-player src="/animation/ERANT.json" background="transparent" speed="1" style="width: 100%; height: 100%" autoplay>
</lottie-player>

View File

@ -1,5 +1,4 @@
<script>
export let price = "$0.00"
export let location = "Home"
export let name = "Kawa Ijen"
export let image = ""
@ -21,9 +20,6 @@
</svg>
</div>
<div class="price">
{price}
</div>
</div>
<div class="info">
@ -116,25 +112,6 @@
justify-content: center;
}
button > .image > .price{
position: absolute;
padding: 4px 8px 4px 8px;
height: 28px;
left: 12px;
bottom: 12px;
background: #4263EB;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-family: 'Work Sans';
font-style: normal;
font-weight: 500;
font-size: 14px;
line-height: 20px;
}
@media screen and (max-width: 370px){
button > .image > .bookmark{
width: 8vw;
@ -143,15 +120,6 @@
top: 3vw;
border-radius: 2vw;
}
button > .image > .price{
padding: 1.2vw 2vw 1.2vw 2vw;
height: 8vw;
left: 3vw;
bottom: 3vw;
border-radius: 2vw;
font-size: 13px;
line-height: 18px;
}
}
button > .info{

View File

@ -14,14 +14,33 @@
setTimeout(() => {
fitstTime = false
localStorage.setItem('ErantFirstTime', "false");
}, 5000)
}, 29000)
}
})
let city = "";
let state = "";
if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(async position => {
const latitude = position.coords.latitude;
const longitude = position.coords.longitude;
const response = await fetch(
`https://nominatim.openstreetmap.org/reverse?lat=${latitude}&lon=${longitude}&format=json`
);
const data = await response.json();
city = data.address.town || data.address.city || data.address.village;
state = ", "+data.address.country;
});
}
</script>
{#if !fitstTime}
<NavigationBarLayout>
<Top />
<Top headline={city + state}/>
<Discover />
@ -45,7 +64,7 @@
<style>
.content {
height: calc(100% - 94px);
height: calc(100% );
width: 100%;
margin-bottom: 94px;

View File

View File

@ -0,0 +1,78 @@
<script lang="ts">
import NavigationBarLayout from './../../lib/Components/Layouts/NavigationBarLayout.svelte'
import Line from '$lib/Components/common/Line.svelte'
import Help from './../../lib/svg/Help.svelte'
import SettingRow from '$lib/Components/common/SettingRow.svelte'
import Profile from '$lib/svg/Profile.svelte'
import Wallet from '$lib/svg/Wallet-Headline.svelte'
import { Link } from 'svelte-routing'
import Earth from '$lib/svg/Earth.svelte'
import Warning from '$lib/svg/Warning.svelte'
const items = [
{
title: '',
itms: [
{ icon: Profile, text: 'Subscriptions purchase: Premium', link:"/"},
],
},
{
title: 'Settings',
itms: [{ icon: Earth, text: 'Language', link:"/"}],
},
{
title: 'Legal',
itms: [
{ icon: Help, text: 'Help', link:"/"},
{ icon: Warning, text: 'Terms & Conditions', link:"/"},
],
},
]
</script>
<NavigationBarLayout class="p-4">
<div class="head">
<Wallet />
<h1>Payment History</h1>
</div>
<Line />
<div class="w-full h-auto flex flex-wrap flex-row mt-4 gap-4">
{#each items as { title, itms }}
{#if title !== ""}
<div class="mb-4 text-[18px] text-[#61646B]">{title}</div>
{/if}
{#each itms as { icon, text, link}}
<SettingRow>
<svelte:component this={icon} />
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
</SettingRow>
<Line />
{/each}
{/each}
</div>
</NavigationBarLayout>
<style lang="scss">
.head{
display: flex;
align-items: center;
justify-content: center;
gap: 16px;
margin-top: 16px;
margin-bottom: 20px;
h1{
font-weight: 600;
font-size: 32px;
line-height: 40px;
color: #000000;
margin: 0;
}
svg{
min-height: 30px;
}
}
</style>

View File

@ -10,7 +10,6 @@
import NavigationBarLayout from './../../lib/Components/Layouts/NavigationBarLayout.svelte'
import Earth from '$lib/svg/Earth.svelte'
import Warning from '$lib/svg/Warning.svelte'
import Point from '$lib/svg/Point.svelte'
import PointSmall from '$lib/svg/PointSmall.svelte'
import InputPicture from '$lib/Components/Inputs/InputPicture.svelte'
import { account, user } from '$lib/appwrite'
@ -21,24 +20,26 @@
{
title: 'Account',
itms: [
{ icon: Profile, text: 'Your Profile' },
{ icon: Wallet, text: 'Payment History' },
{ icon: Setting2, text: 'Preferences' },
{ icon: Profile, text: 'Your Profile', link:"/"},
{ icon: Wallet, text: 'Payment History', link:"/profile/payment_history"},
{ icon: Setting2, text: 'Preferences', link:"/"},
],
},
{
title: 'Settings',
itms: [{ icon: Earth, text: 'Language' }],
itms: [{ icon: Earth, text: 'Language', link:"/"}],
},
{
title: 'Legal',
itms: [
{ icon: Help, text: 'Help' },
{ icon: Warning, text: 'Terms & Conditions' },
{ icon: Logout, text: 'Log out', onClick: () => user.deleteSessions() },
{ icon: Help, text: 'Help', link:"/"},
{ icon: Warning, text: 'Terms of Service', link:"/"},
{ icon: Logout, text: 'Log out', link: () => user.deleteSessions() },,
],
},
]
</script>
<NavigationBarLayout class="p-4">
@ -55,12 +56,20 @@
<div class="w-full h-auto flex flex-wrap flex-row mt-4 gap-4">
{#each items as { title, itms }}
<div class="mb-4 text-[18px] text-[#61646B]">{title}</div>
{#each itms as { icon, text, onClick }}
{#each itms as { icon, text, link}}
{#if (typeof link === 'function')}
<SettingRow>
<svelte:component this={icon} />
<button class="font-semibold text-[18px]" on:click={() => onClick()}>{text}</button>
<button class="font-semibold text-[18px]" on:click={() => link()}>{text}</button>
</SettingRow>
{:else}
<SettingRow>
<svelte:component this={icon} />
<Link class="font-semibold text-[18px]" to={link}>{text}</Link>
</SettingRow>
<Line />
{/if}
{/each}
{/each}
</div>

View File

@ -7,10 +7,10 @@
export let purpose = 'register' //possible values login, register
let email = 'otaprokopec@gmail.com'
let password = 'aaaaaaaa'
let repeatPassword = 'aaaaaaaa'
let name = 'Ota Prokopec'
let email = ''
let password = ''
let repeatPassword = ''
let name = ''
const register = async () => {
//if (password === repeatPassword || name.length < 8 || email.length < 8) throw new Error('conditions are not fine')