Merge branch 'ota/fix'

This commit is contained in:
Ota Prokopec 2022-12-10 18:58:32 +01:00
commit fe2dda6fb8
9 changed files with 151 additions and 181 deletions

View File

@ -1,8 +1,9 @@
<script> <script>
import FooterItem from './NavBar_Item.svelte' import { navigate } from 'svelte-routing'
import FooterItem from '../common/NavBar_Item.svelte'
//Do not change!!! //Do not change!!!
export let items = [ let items = [
{ {
name: 'Home', name: 'Home',
active: true, active: true,
@ -41,25 +42,28 @@
] ]
</script> </script>
<div class="footer"> <div class="h-full w-full absolute">
{#each items as item} <div class="section w-full h-[calc(100%-100px)] overflow-auto"><slot /></div>
<FooterItem active={item.active} name={item.name} url={item.url}> <div class="footer">
{#if item.active} {#each items as { active, name, url, image_url }}
<img style="filter: invert(44%) sepia(66%) saturate(6619%) hue-rotate(222deg) brightness(98%) contrast(88%);" src={item.image_url} /> <FooterItem on:click={() => navigate(url)} {active} {name} {url}>
{#if location.pathname === url}
<img alt="" style="filter: invert(44%) sepia(66%) saturate(6619%) hue-rotate(222deg) brightness(98%) contrast(88%);" src={image_url} />
{:else} {:else}
<img src={item.image_url} /> <img alt="" src={image_url} />
{/if} {/if}
</FooterItem> </FooterItem>
{/each} {/each}
</div>
</div> </div>
<style> <style>
.footer { .footer {
width: 100%; width: 100%;
height: 100px;
position: absolute; position: absolute;
background: white; background: white;
width: calc(100%);
bottom: 0px; bottom: 0px;
left: 0px; left: 0px;

View File

@ -5,7 +5,7 @@
export let lat = 0 export let lat = 0
export let lng = 0 export let lng = 0
export let round = (1 / 110.574 / 1000) * 12 //cca 12m nutno pozměnit!!!!!!!!!! tento komentář nemazat export let round = (1 / 110.574 / 1000) * 12 //cca 12m nutno pozměnit!!!!!!!!!! tento komentář nemazat
console.log({ round, lat, lng })
export let user = { lat: 0, lng: 0 } export let user = { lat: 0, lng: 0 }
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()

View File

@ -0,0 +1,88 @@
<script>
import GeolocateControl from '@beyonk/svelte-mapbox/src/lib/map/controls/GeolocateControl.svelte'
import Map from './Map.svelte'
import { navigate } from 'svelte-routing'
export let center
$: console.log(center)
export let mapComponent
export let user = { lat: null, lng: null }
let className = ''
export { className as class }
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition)
} else {
alert("Can't load your location!")
}
function showPosition(position) {
user.lat = position.coords.latitude
user.lng = position.coords.longitude
}
</script>
<Map {center} bind:mapComponent class={className} on:move>
<slot />
<GeolocateControl
on:geolocate={(e) => {
const { latitude, longitude } = e.detail.coords
const user = { lat: latitude, lng: longitude }
console.log(user)
}}
/>
</Map>
<div class="on">
<button on:click={() => navigate('/scanner')}>
<svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.77778 8.66765C5.77778 7.07876 7.07778 5.77876 8.66667 5.77876H14.4445C16.0333 5.77876 17.3333 4.47876 17.3333 2.88987C17.3333 1.30098 16.0333 0.000976562 14.4445 0.000976562H5.77778C2.6 0.000976562 0 2.60098 0 5.77876V14.4454C0 16.0343 1.3 17.3343 2.88889 17.3343C4.47778 17.3343 5.77778 16.0343 5.77778 14.4454V8.66765ZM2.88889 34.666C1.3 34.666 0 35.966 0 37.5549V46.2216C0 49.3994 2.6 51.9994 5.77778 51.9994H14.4445C16.0333 51.9994 17.3333 50.6994 17.3333 49.1105C17.3333 47.5216 16.0333 46.2216 14.4445 46.2216H8.66667C7.07778 46.2216 5.77778 44.9216 5.77778 43.3327V37.5549C5.77778 35.966 4.47778 34.666 2.88889 34.666ZM37.5553 0.000976562H46.222C49.3998 0.000976562 51.9998 2.60098 51.9998 5.77876V14.4454C51.9998 16.0343 50.6998 17.3343 49.1109 17.3343C47.522 17.3343 46.222 16.0343 46.222 14.4454V8.66765C46.222 7.07876 44.922 5.77876 43.3331 5.77876H37.5553C35.9664 5.77876 34.6664 4.47876 34.6664 2.88987C34.6664 1.30098 35.9664 0.000976562 37.5553 0.000976562ZM46.2221 43.3327C46.2221 44.9216 44.9221 46.2216 43.3332 46.2216H37.5554C35.9665 46.2216 34.6665 47.5216 34.6665 49.1105C34.6665 50.6994 35.9665 51.9994 37.5554 51.9994H46.2221C49.3998 51.9994 51.9998 49.3994 51.9998 46.2216V37.5549C51.9998 35.966 50.6998 34.666 49.111 34.666C47.5221 34.666 46.2221 35.966 46.2221 37.5549V43.3327ZM28.8881 23.1085H23.1104V28.8838H17.3345V34.6616H23.1123V28.8862H28.8881V23.1085ZM23.1123 28.8862V28.8838H23.1104V28.8862H23.1123ZM28.8912 28.8838H34.6689V34.6616H28.8912V28.8838ZM34.669 17.3302H28.8913V23.108H34.669V17.3302ZM17.3345 17.3301H23.1123V23.1079H17.3345V17.3301Z"
fill="#4263EB"
/>
</svg>
</button>
<button on:click={() => document.getElementsByClassName('mapboxgl-ctrl-geolocate')[0].click()}>
<svg viewBox="0 0 29 39" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0.758179 14.1551C0.758179 6.53234 6.92333 0.367188 14.5461 0.367188C22.1688 0.367188 28.3339 6.53234 28.3339 14.1551C28.3339 22.3687 19.6279 33.6945 16.0627 38.0081C15.2748 38.9536 13.837 38.9536 13.0491 38.0081C9.46424 33.6945 0.758179 22.3687 0.758179 14.1551ZM9.62182 14.1551C9.62182 16.8733 11.8279 19.0793 14.5461 19.0793C17.2642 19.0793 19.4703 16.8733 19.4703 14.1551C19.4703 11.4369 17.2642 9.23083 14.5461 9.23083C11.8279 9.23083 9.62182 11.4369 9.62182 14.1551Z"
fill="#4263EB"
/>
</svg>
</button>
</div>
<style>
.on {
position: absolute;
display: flex;
flex-direction: column;
gap: 27px;
right: 23px;
bottom: 140px;
}
button {
width: 60px;
height: 60px;
border-radius: 25px;
position: relative;
background-color: white;
display: flex;
align-items: center;
justify-content: center;
}
button:hover,
button:active {
opacity: 70%;
}
button > svg {
height: 56%;
width: auto;
}
</style>

View File

@ -6,13 +6,9 @@
let className = '' let className = ''
export { className as class } export { className as class }
let user = { lat: 0, lng: 0 }
const dispatch = createEventDispatcher()
export let radius = false export let radius = false
export let center = { lng: 0, lat: 0 } export let center = { lng: 0, lat: 0 }
export const geo = (e) => { /*export const geo = (e) => {
geolocateControl.dispatchEvent('geolocate') geolocateControl.dispatchEvent('geolocate')
if (navigator.geolocation) { if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition((position) => { navigator.geolocation.getCurrentPosition((position) => {
@ -23,7 +19,7 @@
} else { } else {
alert("Can't load your location!") alert("Can't load your location!")
} }
} }*/
</script> </script>
<div class={className} class:radius> <div class={className} class:radius>
@ -38,7 +34,7 @@
}} }}
zoom={14} zoom={14}
> >
<slot {user} /> <slot />
</Map> </Map>
</div> </div>
@ -50,7 +46,9 @@
border-radius: 25px; border-radius: 25px;
} }
} }
:global(.mapboxgl-ctrl-top-left) {
display: none;
}
:global(.mapboxgl-marker) { :global(.mapboxgl-marker) {
cursor: pointer; cursor: pointer;
} }

View File

@ -1,19 +1,11 @@
<script lang="ts"> <script lang="ts">
import { navigate } from "svelte-routing" export let active: boolean = false
export let name: string = ''
export let url: string = ''
export let active:boolean = false
export let name: string = ""
export let url: string = ""
</script> </script>
<button <button on:click>
on:click={()=>{ <slot />
if (!active){
navigate(url)
}
}}>
<slot/>
{#if active} {#if active}
<p class="active" style="color:#4263EB">{name}</p> <p class="active" style="color:#4263EB">{name}</p>
{:else} {:else}
@ -23,7 +15,7 @@
<style> <style>
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@500&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@500&display=swap');
button{ button {
height: 54px; height: 54px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -32,19 +24,19 @@
gap: 4px; gap: 4px;
} }
button:hover, button:active{ button:hover,
button:active {
opacity: 70%; opacity: 70%;
} }
button > p{ button > p {
font-family: 'Work Sans'; font-family: 'Work Sans';
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
font-size: 11px; font-size: 11px;
line-height: 16px; line-height: 16px;
text-align: center; text-align: center;
color: #61646B; color: #61646b;
} }
</style> </style>

View File

@ -1,4 +1,5 @@
<script> <script>
import parseQuestion from '../../../lib/utils/parseQuestion'
import Circle from './../../../lib/Components/Map/Circle.svelte' import Circle from './../../../lib/Components/Map/Circle.svelte'
import TextForm from './TextForm.svelte' import TextForm from './TextForm.svelte'
import NumberForm from './NumberForm.svelte' import NumberForm from './NumberForm.svelte'
@ -8,8 +9,7 @@
import QrCode from './QrCode.svelte' import QrCode from './QrCode.svelte'
import Finish from './Finish.svelte' import Finish from './Finish.svelte'
import { data } from '$lib/stores/game' import { data } from '$lib/stores/game'
import GeolocateControl from '@beyonk/svelte-mapbox/src/lib/map/controls/GeolocateControl.svelte' import Erantmap from '$src/lib/Components/Map/Erantmap.svelte'
import Map from '$lib/Components/Map/Map.svelte'
const components = { const components = {
TEXT: TextForm, TEXT: TextForm,
@ -66,19 +66,14 @@
let lat = Number.parseFloat($data.questions[clientAnswers.pos].lat) let lat = Number.parseFloat($data.questions[clientAnswers.pos].lat)
let lng = Number.parseFloat($data.questions[clientAnswers.pos].lng) let lng = Number.parseFloat($data.questions[clientAnswers.pos].lng)
export let user = { lat: 0, lng: 0 }
</script> </script>
{#if !startQuestion} {#if !startQuestion}
<Map center={{ lat, lng }} class="w-full h-full" let:user> <Erantmap center={{ lat, lng }} bind:user class="w-full h-full">
<Circle on:enter={() => (startQuestion = true)} {lat} {lng} {user} /> <Circle on:enter={() => (startQuestion = true)} {lat} {lng} {user} />
<GeolocateControl </Erantmap>
on:geolocate={(e) => {
const { latitude, longitude } = e.detail.coords
const user = { lat: latitude, lng: longitude }
console.log(user)
}}
/>
</Map>
{/if} {/if}
{#if page && startQuestion} {#if page && startQuestion}

View File

@ -11,7 +11,6 @@
import { data } from '../../lib/stores/game' import { data } from '../../lib/stores/game'
import GeolocateControl from '@beyonk/svelte-mapbox/src/lib/map/controls/GeolocateControl.svelte' import GeolocateControl from '@beyonk/svelte-mapbox/src/lib/map/controls/GeolocateControl.svelte'
import Map from '../../lib/Components/Map/Map.svelte' import Map from '../../lib/Components/Map/Map.svelte'
import FullWidthRow from '../../lib/Components/common/FullWidthRow.svelte'
import Renderer from './Forms/Renderer.svelte' import Renderer from './Forms/Renderer.svelte'
import Redirect from '../../lib/Components/common/Redirect.svelte' import Redirect from '../../lib/Components/common/Redirect.svelte'
import ImageSlider from '../../lib/Components/common/ImageSlider.svelte' import ImageSlider from '../../lib/Components/common/ImageSlider.svelte'
@ -59,14 +58,14 @@
</Section> </Section>
<Section title="Fotky"> <Section title="Fotky">
<FullWidthRow> <div class="w-full relative">
<div class="px-4 m-auto" style="max-width: var(--max-viewport-width);"> <div class="px-4 m-auto" style="max-width: var(--max-viewport-width);">
<ImageSlider images={assets} /> <ImageSlider images={assets} />
</div> </div>
</FullWidthRow> </div>
</Section> </Section>
<FullWidthRow> <div class="w-full relative">
<div class="px-4 m-auto" style="max-width: var(--max-viewport-width);"> <div class="px-4 m-auto" style="max-width: var(--max-viewport-width);">
<Map radius class="w-full h-44" center={{ lng: $gameData.data.lng, lat: $gameData.data.lat }}> <Map radius class="w-full h-44" center={{ lng: $gameData.data.lng, lat: $gameData.data.lat }}>
{#each $gameData.data.questions as { lat, lng }} {#each $gameData.data.questions as { lat, lng }}
@ -81,7 +80,7 @@
/> />
</Map> </Map>
</div> </div>
</FullWidthRow> </div>
<Button on:click={() => (view = 'game-play')} primary>Hrát</Button> <Button on:click={() => (view = 'game-play')} primary>Hrát</Button>
</Overlay> </Overlay>

View File

@ -1,12 +1,12 @@
<script> <script>
import NavigationBar from './../../lib/Components/common/NavigationBar.svelte' import NavigationBarLayout from '../../lib/Components/Layouts/NavigationBarLayout.svelte'
import Discover from './Components/Discover.svelte' import Discover from './Components/Discover.svelte'
import Top from './Components/Top.svelte' import Top from './Components/Top.svelte'
import Categories from './Components/Categories.svelte' import Categories from './Components/Categories.svelte'
import Comparment from './Components/Comparment.svelte' import Comparment from './Components/Comparment.svelte' //do budoucna bych to udělal pomocí komponent
</script> </script>
<div class="content"> <NavigationBarLayout>
<Top /> <Top />
<Discover /> <Discover />
@ -22,9 +22,7 @@
{ price: '$10.00', location: 'Prag, Czech Republic', name: 'Hometown', image: 'https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg' }, { price: '$10.00', location: 'Prag, Czech Republic', name: 'Hometown', image: 'https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg' },
]} ]}
/> />
</div> </NavigationBarLayout>
<NavigationBar />
<style> <style>
.content { .content {
@ -32,9 +30,6 @@
width: 100%; width: 100%;
margin-bottom: 94px; margin-bottom: 94px;
max-height: 100%;
max-width: 100%;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
position: relative; position: relative;

View File

@ -1,111 +1,10 @@
<script> <script>
import Map from './../lib/Components/Map/Map.svelte' import Erantmap from '$lib/Components/Map/Erantmap.svelte'
import { navigate } from 'svelte-routing' import NavigationBarLayout from '$lib/Components/Layouts/NavigationBarLayout.svelte'
import NavigationBar from '../lib/Components/common/NavigationBar.svelte'
let lat = null let user = { lat: null, lng: null }
let lng = null
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition)
} else {
alert("Can't load your location!")
}
function showPosition(position) {
lat = position.coords.latitude
lng = position.coords.longitude
}
let navBarItems = [
{
name: 'Home',
active: false,
url: '/',
image_url:
"data:image/svg+xml,%3Csvg width='23' height='24' viewBox='0 0 23 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.1572 22.2352V18.6679C8.1572 17.7573 8.90083 17.019 9.81813 17.019H13.1713C13.6118 17.019 14.0343 17.1928 14.3458 17.502C14.6573 17.8112 14.8323 18.2306 14.8323 18.6679V22.2352C14.8295 22.6138 14.979 22.9779 15.2477 23.2465C15.5164 23.5152 15.882 23.6663 16.2634 23.6663H18.5511C19.6195 23.6691 20.6452 23.2497 21.4017 22.5006C22.1581 21.7516 22.5833 20.7345 22.5833 19.6738V9.51101C22.5833 8.65421 22.2007 7.84149 21.5387 7.29179L13.7563 1.12152C12.4026 0.0396631 10.4629 0.0745936 9.14958 1.20448L1.54481 7.29179C0.85149 7.82529 0.437104 8.64042 0.416626 9.51101V19.6634C0.416626 21.8742 2.2219 23.6663 4.44883 23.6663H6.6843C7.47639 23.6663 8.12012 23.0319 8.12586 22.2456L8.1572 22.2352Z' fill='%2361646B'/%3E%3C/svg%3E%0A",
},
{
name: 'Explore',
active: false,
url: '/explore',
image_url:
"data:image/svg+xml,%3Csvg width='26' height='25' viewBox='0 0 26 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11.58 11.0798L10.3585 14.9846L14.2622 13.7619L15.4848 9.85711L11.58 11.0798ZM9.02384 17.1931C8.79517 17.1931 8.57117 17.1033 8.40434 16.9376C8.17451 16.7066 8.09051 16.3671 8.18851 16.0579L10.047 10.1208C10.1322 9.84545 10.3468 9.63195 10.6198 9.54678L16.557 7.68828C16.8685 7.58911 17.2068 7.67428 17.4378 7.90411C17.6677 8.13511 17.7517 8.47461 17.6537 8.78378L15.7963 14.7209C15.7112 14.9951 15.4953 15.2098 15.2223 15.2949L9.28517 17.1534C9.19884 17.1803 9.11017 17.1931 9.02384 17.1931Z' fill='%2361646B'/%3E%3Cmask id='mask0_1515_2517' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='0' y='0' width='26' height='25'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.833374 0.333008H25.0088V24.5083H0.833374V0.333008Z' fill='white'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_1515_2517)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12.921 2.08301C7.22063 2.08301 2.58313 6.72167 2.58313 12.4208C2.58313 18.1212 7.22063 22.7587 12.921 22.7587C18.6213 22.7587 23.2588 18.1212 23.2588 12.4208C23.2588 6.72167 18.6213 2.08301 12.921 2.08301M12.921 24.5087C6.2558 24.5087 0.83313 19.086 0.83313 12.4208C0.83313 5.75567 6.2558 0.333008 12.921 0.333008C19.5861 0.333008 25.0088 5.75567 25.0088 12.4208C25.0088 19.086 19.5861 24.5087 12.921 24.5087' fill='%2361646B'/%3E%3C/g%3E%3C/svg%3E ",
},
{
name: 'Map',
active: true,
url: '/map',
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',
active: false,
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',
active: false,
image_url:
"data:image/svg+xml,%3Csvg width='19' height='24' viewBox='0 0 19 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='mask0_1515_2027' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='0' y='14' width='19' height='10'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0.166626 14.9121H18.6465V23.5151H0.166626V14.9121Z' fill='white'/%3E%3C/mask%3E%3Cg mask='url(%23mask0_1515_2027)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.40767 16.6621C4.4365 16.6621 1.9165 17.5161 1.9165 19.2019C1.9165 20.9029 4.4365 21.7651 9.40767 21.7651C14.3777 21.7651 16.8965 20.9111 16.8965 19.2253C16.8965 17.5243 14.3777 16.6621 9.40767 16.6621ZM9.40767 23.5151C7.12217 23.5151 0.166504 23.5151 0.166504 19.2019C0.166504 15.3566 5.441 14.9121 9.40767 14.9121C11.6932 14.9121 18.6465 14.9121 18.6465 19.2253C18.6465 23.0706 13.3732 23.5151 9.40767 23.5151Z' fill='%2361646B'/%3E%3C/g%3E%3Cmask id='mask1_1515_2027' style='mask-type:alpha' maskUnits='userSpaceOnUse' x='3' y='0' width='13' height='13'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.21143 0.333008H15.6015V12.7214H3.21143V0.333008Z' fill='white'/%3E%3C/mask%3E%3Cg mask='url(%23mask1_1515_2027)'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9.40763 1.99901C6.9098 1.99901 4.87746 4.03017 4.87746 6.52801C4.8693 9.01767 6.88646 11.0477 9.3738 11.057L9.40763 11.89V11.057C11.9043 11.057 13.9355 9.02467 13.9355 6.52801C13.9355 4.03017 11.9043 1.99901 9.40763 1.99901ZM9.40763 12.7218H9.3703C5.9613 12.7113 3.1998 9.93117 3.21146 6.52451C3.21146 3.11201 5.99046 0.333008 9.40763 0.333008C12.8236 0.333008 15.6015 3.11201 15.6015 6.52801C15.6015 9.94401 12.8236 12.7218 9.40763 12.7218Z' fill='%2361646B'/%3E%3C/g%3E%3C/svg%3E ",
},
]
let mapComponent
</script> </script>
<Map center={{ lat, lng }} bind:mapComponent class="w-full h-full" on:move={console.log} /> <NavigationBarLayout>
<Erantmap class="w-full h-full" center={{ lng: user.lng, lat: user.lat }} bind:user />
<div class="on"> </NavigationBarLayout>
<button on:click={() => navigate('/scanner')}>
<svg viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M5.77778 8.66765C5.77778 7.07876 7.07778 5.77876 8.66667 5.77876H14.4445C16.0333 5.77876 17.3333 4.47876 17.3333 2.88987C17.3333 1.30098 16.0333 0.000976562 14.4445 0.000976562H5.77778C2.6 0.000976562 0 2.60098 0 5.77876V14.4454C0 16.0343 1.3 17.3343 2.88889 17.3343C4.47778 17.3343 5.77778 16.0343 5.77778 14.4454V8.66765ZM2.88889 34.666C1.3 34.666 0 35.966 0 37.5549V46.2216C0 49.3994 2.6 51.9994 5.77778 51.9994H14.4445C16.0333 51.9994 17.3333 50.6994 17.3333 49.1105C17.3333 47.5216 16.0333 46.2216 14.4445 46.2216H8.66667C7.07778 46.2216 5.77778 44.9216 5.77778 43.3327V37.5549C5.77778 35.966 4.47778 34.666 2.88889 34.666ZM37.5553 0.000976562H46.222C49.3998 0.000976562 51.9998 2.60098 51.9998 5.77876V14.4454C51.9998 16.0343 50.6998 17.3343 49.1109 17.3343C47.522 17.3343 46.222 16.0343 46.222 14.4454V8.66765C46.222 7.07876 44.922 5.77876 43.3331 5.77876H37.5553C35.9664 5.77876 34.6664 4.47876 34.6664 2.88987C34.6664 1.30098 35.9664 0.000976562 37.5553 0.000976562ZM46.2221 43.3327C46.2221 44.9216 44.9221 46.2216 43.3332 46.2216H37.5554C35.9665 46.2216 34.6665 47.5216 34.6665 49.1105C34.6665 50.6994 35.9665 51.9994 37.5554 51.9994H46.2221C49.3998 51.9994 51.9998 49.3994 51.9998 46.2216V37.5549C51.9998 35.966 50.6998 34.666 49.111 34.666C47.5221 34.666 46.2221 35.966 46.2221 37.5549V43.3327ZM28.8881 23.1085H23.1104V28.8838H17.3345V34.6616H23.1123V28.8862H28.8881V23.1085ZM23.1123 28.8862V28.8838H23.1104V28.8862H23.1123ZM28.8912 28.8838H34.6689V34.6616H28.8912V28.8838ZM34.669 17.3302H28.8913V23.108H34.669V17.3302ZM17.3345 17.3301H23.1123V23.1079H17.3345V17.3301Z"
fill="#4263EB"
/>
</svg>
</button>
<button on:click={() => mapComponent.flyTo({ center: [lng, lat] })}>
<svg viewBox="0 0 29 39" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M0.758179 14.1551C0.758179 6.53234 6.92333 0.367188 14.5461 0.367188C22.1688 0.367188 28.3339 6.53234 28.3339 14.1551C28.3339 22.3687 19.6279 33.6945 16.0627 38.0081C15.2748 38.9536 13.837 38.9536 13.0491 38.0081C9.46424 33.6945 0.758179 22.3687 0.758179 14.1551ZM9.62182 14.1551C9.62182 16.8733 11.8279 19.0793 14.5461 19.0793C17.2642 19.0793 19.4703 16.8733 19.4703 14.1551C19.4703 11.4369 17.2642 9.23083 14.5461 9.23083C11.8279 9.23083 9.62182 11.4369 9.62182 14.1551Z"
fill="#4263EB"
/>
</svg>
</button>
</div>
<NavigationBar items={navBarItems} />
<style>
.on {
position: absolute;
display: flex;
flex-direction: column;
gap: 27px;
right: 23px;
bottom: 140px;
}
button {
width: 60px;
height: 60px;
border-radius: 25px;
position: relative;
background-color: white;
display: flex;
align-items: center;
justify-content: center;
}
button:hover,
button:active {
opacity: 70%;
}
button > svg {
height: 56%;
width: auto;
}
</style>