chore: moved station stats to a dropdown

This commit is contained in:
2024-08-18 01:43:27 +02:00
parent 58d6a97762
commit 9c4c806f0e
7 changed files with 155 additions and 131 deletions
+7 -23
View File
@@ -1,5 +1,9 @@
<template>
<div class="dropdown" @keydown.esc="showOptions = false" @focusout="showOptions = false">
<div
class="dropdown"
@keydown.esc="showOptions = false"
v-click-outside="() => (showOptions = false)"
>
<div class="bg" v-if="showOptions" @click="showOptions = false"></div>
<button class="filter-button btn--filled btn--image" @click="toggleShowOptions" ref="button">
@@ -95,6 +99,8 @@
<div class="no-data" v-else>
{{ $t('train-stats.no-stats') }}
</div>
<div tabindex="0" @focus="() => (showOptions = false)"></div>
</div>
</transition>
</div>
@@ -236,10 +242,6 @@ h3 {
display: flex;
flex-wrap: wrap;
gap: 0.5em;
// @include smallScreen {
// justify-content: center;
// }
}
.badge {
@@ -255,24 +257,6 @@ h3 {
max-width: 600px;
}
.stats-anim {
&-move,
&-enter-active,
&-leave-active {
transition: all 250ms ease;
}
&-enter-from,
&-leave-to {
opacity: 0;
transform: translateX(5px);
}
&-leave-active {
position: absolute;
}
}
@include smallScreen {
h1,
.no-data {