feat: expand/hide explaination box
This commit is contained in:
parent
57dfa90b65
commit
61514f1234
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="expandExplanationBox" class="quote-explaination-box__container">
|
||||
<DialogBox :title="$t('how-to-play')" @close="close">
|
||||
<div class="quote-explaination-box__container">
|
||||
<DialogBox v-if="expandExplanationBox" :title="$t('how-to-play')" @close="close">
|
||||
<p class="quote-explaination-box__p">{{ $t('explain-game-p-1') }}</p>
|
||||
<p class="quote-explaination-box__p">{{ $t('explain-game-p-2') }}</p>
|
||||
<div class="quote-explaination-box__example">
|
||||
@ -18,6 +18,9 @@
|
||||
<Button @click="close">{{ $t('dismiss') }}</Button>
|
||||
</template>
|
||||
</DialogBox>
|
||||
<div v-else class="quote-explaination-box__container-small" @click="expand">
|
||||
ⓘ {{ $t('how-to-play') }}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -71,6 +74,7 @@ const { $t } = useI18n({
|
||||
|
||||
const expandExplanationBox = ref(props.expand)
|
||||
const close = () => { expandExplanationBox.value = false }
|
||||
const expand = () => { expandExplanationBox.value = true }
|
||||
|
||||
const quoteNr = ref(0)
|
||||
let lastUpdate = new Date().getTime()
|
||||
@ -129,6 +133,15 @@ onBeforeUnmount(() => { window.clearInterval(timer) })
|
||||
}
|
||||
}
|
||||
|
||||
&__container-small {
|
||||
color: darken($text-primary-color, 20%);
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: $text-primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
.quote-explaination-box__example-container__fade-enter-active,
|
||||
.quote-explaination-box__example-container__fade-leave-active {
|
||||
|
Loading…
Reference in New Issue
Block a user