mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 04:47:26 +08:00
[+] User profile game switching
This commit is contained in:
@@ -235,3 +235,6 @@ nav
|
|||||||
color: $c-main
|
color: $c-main
|
||||||
text-decoration-color: $c-main
|
text-decoration-color: $c-main
|
||||||
text-underline-offset: 0.5em
|
text-underline-offset: 0.5em
|
||||||
|
|
||||||
|
&.active
|
||||||
|
color: $c-main
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
renderCal(calElement, trend.map(it => {return {date: it.date, value: it.plays}}))
|
renderCal(calElement, trend.map(it => {return {date: it.date, value: it.plays}}))
|
||||||
}).catch((e) => error = e.message);
|
}).catch((e) => error = e.message);
|
||||||
|
|
||||||
|
const games = {chu3: 'Chuni', mai2: 'Mai', ongeki: 'Ongeki'}
|
||||||
const titleText = {chu3: 'Chuni', mai2: 'Mai', ongeki: 'Ongeki'}[game]
|
const titleText = games[game]
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main id="user-home" class="content">
|
<main id="user-home" class="content">
|
||||||
@@ -49,6 +49,11 @@
|
|||||||
<div class="user-pfp">
|
<div class="user-pfp">
|
||||||
<img src={`${DATA_HOST}/d/${game}/assetbundle/icon/${d.user.iconId.toString().padStart(6, "0")}.png`} alt="" class="pfp" on:error={pfpNotFound}>
|
<img src={`${DATA_HOST}/d/${game}/assetbundle/icon/${d.user.iconId.toString().padStart(6, "0")}.png`} alt="" class="pfp" on:error={pfpNotFound}>
|
||||||
<h2>{d.user.name}</h2>
|
<h2>{d.user.name}</h2>
|
||||||
|
<nav>
|
||||||
|
{#each Object.entries(games) as [g, name]}
|
||||||
|
<a href={`/u/${username}/${g}`} class:active={game === g}>{name}</a>
|
||||||
|
{/each}
|
||||||
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -201,18 +206,37 @@ $gap: 20px
|
|||||||
align-items: flex-end
|
align-items: flex-end
|
||||||
gap: $gap
|
gap: $gap
|
||||||
margin-top: -72px
|
margin-top: -72px
|
||||||
|
position: relative
|
||||||
|
|
||||||
h2
|
h2
|
||||||
font-size: 2rem
|
font-size: 2rem
|
||||||
margin: 0
|
margin: 0
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
|
||||||
|
nav
|
||||||
|
position: absolute
|
||||||
|
display: flex
|
||||||
|
flex-direction: row
|
||||||
|
gap: 10px
|
||||||
|
top: 0.5rem
|
||||||
|
right: 0
|
||||||
|
|
||||||
.pfp
|
.pfp
|
||||||
width: 100px
|
width: 100px
|
||||||
height: 100px
|
height: 100px
|
||||||
border-radius: 12px
|
border-radius: 12px
|
||||||
object-fit: cover
|
object-fit: cover
|
||||||
|
|
||||||
|
@media (max-width: $w-mobile)
|
||||||
|
.user-pfp
|
||||||
|
margin-top: -68px
|
||||||
|
h2
|
||||||
|
font-size: 1.5rem
|
||||||
|
|
||||||
|
.pfp
|
||||||
|
width: 80px
|
||||||
|
height: 80px
|
||||||
|
|
||||||
.info-bottom, .info-top, .other-info
|
.info-bottom, .info-top, .other-info
|
||||||
display: flex
|
display: flex
|
||||||
gap: $gap
|
gap: $gap
|
||||||
|
|||||||
Reference in New Issue
Block a user