pleroma-fe/src/components/navigation/navigation_pins.vue

57 lines
1.1 KiB
Vue
Raw Normal View History

<template>
<span class="NavigationPins">
<router-link
2022-08-12 01:27:09 +03:00
v-for="item in pinnedList"
:key="item.name"
class="button-unstyled pinned-item"
2024-02-22 18:39:52 +02:00
active-class="toggled"
2022-08-23 15:36:54 +03:00
:to="getRouteTo(item)"
2022-08-24 20:24:08 +03:00
:title="item.labelRaw || $t(item.label)"
2022-08-12 01:27:09 +03:00
>
<FAIcon
v-if="item.icon"
fixed-width
:icon="item.icon"
2022-08-12 01:27:09 +03:00
/>
<span
v-if="item.iconLetter"
class="iconLetter fa-scale-110 fa-old-padding"
2022-08-12 01:27:09 +03:00
>{{ item.iconLetter }}</span>
<div
v-if="item.badgeGetter && getters[item.badgeGetter]"
2024-02-16 00:29:16 +02:00
class="badge -dot -notification"
2022-08-12 01:27:09 +03:00
/>
</router-link>
</span>
</template>
<script src="./navigation_pins.js"></script>
<style lang="scss">
.NavigationPins {
display: flex;
flex-wrap: wrap;
overflow: hidden;
height: 100%;
.pinned-item {
position: relative;
flex: 1 0 3em;
min-width: 2em;
2022-08-12 00:50:08 +03:00
text-align: center;
overflow: visible;
box-sizing: border-box;
height: 100%;
& .svg-inline--fa,
& .iconLetter {
margin: 0;
}
&.toggled {
2024-06-13 01:28:34 +03:00
margin-bottom: -4px;
border-bottom: 4px solid;
}
}
}
</style>