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

76 lines
1.5 KiB
Vue
Raw Normal View History

<template>
<span class="NavigationPins">
<router-link
2022-08-12 00:27:09 +02:00
v-for="item in pinnedList"
:key="item.name"
class="pinned-item"
2022-08-23 14:36:54 +02:00
:to="getRouteTo(item)"
2022-08-24 19:24:08 +02:00
:title="item.labelRaw || $t(item.label)"
2022-08-12 00:27:09 +02:00
>
<FAIcon
v-if="item.icon"
fixed-width
:icon="item.icon"
2022-08-12 00:27:09 +02:00
/>
<span
v-if="item.iconLetter"
class="iconLetter fa-scale-110 fa-old-padding"
2022-08-12 00:27:09 +02:00
>{{ item.iconLetter }}</span>
<div
v-if="item.badgeGetter && getters[item.badgeGetter]"
class="alert-dot"
2022-08-12 00:27:09 +02:00
/>
</router-link>
</span>
</template>
<script src="./navigation_pins.js"></script>
<style lang="scss">
2023-01-09 19:02:16 +01:00
@import "../../variables";
.NavigationPins {
display: flex;
flex-wrap: wrap;
overflow: hidden;
height: 100%;
.alert-dot {
border-radius: 100%;
height: 0.5em;
width: 0.5em;
position: absolute;
2022-10-09 18:00:25 +02:00
right: calc(50% - 0.75em);
top: calc(50% - 0.5em);
background-color: $fallback--cRed;
background-color: var(--badgeNotification, $fallback--cRed);
}
.pinned-item {
position: relative;
flex: 1 0 3em;
min-width: 2em;
2022-08-11 23:50:08 +02:00
text-align: center;
overflow: visible;
box-sizing: border-box;
height: 100%;
& .svg-inline--fa,
& .iconLetter {
margin: 0;
}
&.router-link-active {
color: $fallback--text;
color: var(--panelText, $fallback--text);
border-bottom: 4px solid;
& .svg-inline--fa,
& .iconLetter {
color: inherit;
}
}
}
}
</style>