forked from Cookies_Github_mirror/AquaDX
@@ -7,6 +7,8 @@
|
|||||||
import Home from "./pages/Home.svelte";
|
import Home from "./pages/Home.svelte";
|
||||||
import Ranking from "./pages/Ranking.svelte";
|
import Ranking from "./pages/Ranking.svelte";
|
||||||
import { USER } from "./libs/sdk";
|
import { USER } from "./libs/sdk";
|
||||||
|
import type { UserMe } from "./libs/generalTypes";
|
||||||
|
import { DEFAULT_PFP, IMG_HOST } from "./libs/config";
|
||||||
|
|
||||||
console.log(`%c
|
console.log(`%c
|
||||||
┏━┓ ┳━┓━┓┏━
|
┏━┓ ┳━┓━┓┏━
|
||||||
@@ -20,6 +22,9 @@
|
|||||||
-webkit-text-fill-color: transparent;`)
|
-webkit-text-fill-color: transparent;`)
|
||||||
|
|
||||||
export let url = "";
|
export let url = "";
|
||||||
|
let me: UserMe
|
||||||
|
|
||||||
|
if (USER.isLoggedIn()) USER.me().then(m => me = m).catch(e => console.error(e))
|
||||||
|
|
||||||
let path = window.location.pathname;
|
let path = window.location.pathname;
|
||||||
</script>
|
</script>
|
||||||
@@ -34,7 +39,11 @@
|
|||||||
<a href="/home">home</a>
|
<a href="/home">home</a>
|
||||||
<div>maps</div>
|
<div>maps</div>
|
||||||
<a href="/ranking">rankings</a>
|
<a href="/ranking">rankings</a>
|
||||||
<div><Icon icon="tabler:search" /></div>
|
{#if me}
|
||||||
|
<a href="/u/{me.username}">
|
||||||
|
<img src={me.profilePicture ? `${IMG_HOST}/${me.profilePicture}` : DEFAULT_PFP} alt="profile" class="pfp" />
|
||||||
|
</a>
|
||||||
|
{/if}
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<Router {url}>
|
<Router {url}>
|
||||||
@@ -61,6 +70,16 @@
|
|||||||
z-index: 10
|
z-index: 10
|
||||||
position: relative
|
position: relative
|
||||||
|
|
||||||
|
img
|
||||||
|
width: 1.5rem
|
||||||
|
height: 1.5rem
|
||||||
|
border-radius: 50%
|
||||||
|
object-fit: cover
|
||||||
|
|
||||||
|
.pfp
|
||||||
|
width: 2rem
|
||||||
|
height: 2rem
|
||||||
|
|
||||||
.logo
|
.logo
|
||||||
display: flex
|
display: flex
|
||||||
align-items: center
|
align-items: center
|
||||||
@@ -70,11 +89,6 @@
|
|||||||
letter-spacing: 0.2em
|
letter-spacing: 0.2em
|
||||||
flex: 1
|
flex: 1
|
||||||
|
|
||||||
img
|
|
||||||
width: 1.5rem
|
|
||||||
height: 1.5rem
|
|
||||||
border-radius: 50%
|
|
||||||
|
|
||||||
@media (max-width: $w-mobile)
|
@media (max-width: $w-mobile)
|
||||||
> span
|
> span
|
||||||
display: none
|
display: none
|
||||||
@@ -82,4 +96,4 @@
|
|||||||
@media (max-width: $w-mobile)
|
@media (max-width: $w-mobile)
|
||||||
justify-content: center
|
justify-content: center
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user