2016-10-31 02:12:35 +11:00
|
|
|
<template>
|
2018-02-02 09:45:29 +11:00
|
|
|
<div v-if="loggedIn">
|
2018-04-01 04:14:36 +10:00
|
|
|
<i :class='classes' class='favorite-button fav-active' @click.prevent='favorite()'/>
|
2018-02-02 09:45:29 +11:00
|
|
|
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
2018-04-01 04:14:36 +10:00
|
|
|
<i :class='classes' class='favorite-button'/>
|
2016-10-31 02:12:35 +11:00
|
|
|
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./favorite_button.js" ></script>
|
|
|
|
|
2018-04-01 12:28:20 +10:00
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
|
|
|
.fav-active {
|
|
|
|
cursor: pointer;
|
|
|
|
animation-duration: 0.6s;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.favorite-button.icon-star {
|
|
|
|
color: $fallback--cOrange;
|
|
|
|
color: var(--cOrange, $fallback--cOrange);
|
|
|
|
}
|
2017-03-09 15:45:40 +11:00
|
|
|
|
2016-10-31 02:12:35 +11:00
|
|
|
</style>
|