BottomBar for mobile navigation to tierlists
This commit is contained in:
@@ -4,6 +4,7 @@ import { LANE_IMAGES, lanePositionToIndex, POSITIONS_STR } from '~/utils/cdragon
|
||||
defineProps<{
|
||||
championName?: string
|
||||
championLanes?: Array<LaneData>
|
||||
tierlistList?: boolean
|
||||
}>()
|
||||
const emit = defineEmits<{
|
||||
stateChange: [state: string, lane: number]
|
||||
@@ -17,6 +18,13 @@ function handleStateChange(newState : string, newLane: number) {
|
||||
laneState.value = newLane;
|
||||
emit('stateChange', newState, newLane)
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
const selected = ref("");
|
||||
if(route.path.startsWith("/tierlist/")) {
|
||||
const lane = route.params.lane as string
|
||||
selected.value = lane
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -41,6 +49,20 @@ function handleStateChange(newState : string, newLane: number) {
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="tierlistList == true" style="padding-left: 20px;">
|
||||
<h2 style="padding-left: 0px; font-size: 1.4rem; margin-top: 15px;">Tierlist</h2>
|
||||
<div style="display: flex;">
|
||||
<NuxtLink style="margin-top: 5px; margin-bottom: 5px;" v-for="(pos, i) in POSITIONS" :to="'/tierlist/' + pos">
|
||||
<div :class="selected == pos ? 'navbar-link-selected' : ''"
|
||||
class="navbar-link" style="display: flex; align-items: center;">
|
||||
<NuxtImg format="webp"
|
||||
width="30" height="30"
|
||||
:src="LANE_IMAGES[i]" :alt="POSITIONS_STR[i]" />
|
||||
</div>
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user