53 lines
1.5 KiB
Vue
53 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
defineProps<{
|
|
championName: String
|
|
}>()
|
|
const emit = defineEmits<{
|
|
stateChange: [state: String]
|
|
}>()
|
|
|
|
const state = ref("runes")
|
|
|
|
function handleStateChange(newState : string) {
|
|
state.value = newState;
|
|
emit('stateChange', newState)
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="sidebar-container">
|
|
<Logo font-size="2.6rem" img-width="60" style="padding-left: 15px; padding-right: 15px; margin-top: 30px;"/>
|
|
<h1 class="sidebar-link" style="margin-top: 30px; font-size: 2.4rem; padding-left: 20px;">{{ championName }}</h1>
|
|
<h2 :class="'sidebar-link ' + (state == 'runes' ? 'sidebar-link-selected' : '')"
|
|
@click="handleStateChange('runes')" style="margin-top: 10px; font-size: 1.9rem; padding-left: 35px;">Runes</h2>
|
|
<h2 :class="'sidebar-link ' + (state == 'items' ? 'sidebar-link-selected' : '')"
|
|
@click="handleStateChange('items')" style="margin-top: 10px; font-size: 1.9rem; padding-left: 35px;">Items</h2>
|
|
</div>
|
|
</template>
|
|
|
|
<style>
|
|
.sidebar-container {
|
|
background-color: #2B2826;
|
|
width: 300px;
|
|
height: 100%;
|
|
|
|
position: absolute;
|
|
top: 0px;
|
|
left: 0px;
|
|
}
|
|
.sidebar-link {
|
|
user-select: none;
|
|
margin: 5px;
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
border-radius: 8px;
|
|
}
|
|
.sidebar-link:hover {
|
|
cursor: pointer;
|
|
|
|
background-color: var(--color-surface-darker);
|
|
}
|
|
.sidebar-link-selected {
|
|
background-color: var(--color-surface);
|
|
}
|
|
</style> |