akkoma-fe/src/components/favorite_button/favorite_button.vue

32 lines
826 B
Vue
Raw Normal View History

2016-10-30 15:12:35 +00:00
<template>
<div v-if="loggedIn">
2018-12-03 17:12:43 +00:00
<i :class='classes' class='favorite-button fav-active' @click.prevent='favorite()' :title="$t('tool_tip.star')"/>
<span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
</div>
<div v-else>
2018-12-03 17:12:43 +00:00
<i :class='classes' class='favorite-button' :title="$t('tool_tip.star')"/>
<span v-if='!hidePostStatsLocal && status.fave_num > 0'>{{status.fave_num}}</span>
2016-10-30 15:12:35 +00:00
</div>
</template>
<script src="./favorite_button.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
.fav-active {
2018-04-07 16:30:27 +00:00
cursor: pointer;
animation-duration: 0.6s;
2018-04-07 16:30:27 +00:00
&:hover {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
2018-04-07 16:30:27 +00:00
}
}
2018-04-07 16:30:27 +00:00
.favorite-button.icon-star {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
2016-10-30 15:12:35 +00:00
</style>