2016-10-30 08:12:35 -07:00
|
|
|
<template>
|
2018-02-01 14:45:29 -08:00
|
|
|
<div v-if="loggedIn">
|
|
|
|
<i :class='classes' class='favorite-button fav-active base09' @click.prevent='favorite()'/>
|
|
|
|
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
|
|
|
|
</div>
|
|
|
|
<div v-else>
|
|
|
|
<i :class='classes' class='favorite-button base09'/>
|
2016-10-30 08:12:35 -07:00
|
|
|
<span v-if='status.fave_num > 0'>{{status.fave_num}}</span>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./favorite_button.js" ></script>
|
|
|
|
|
2016-11-13 08:52:20 -08:00
|
|
|
<style lang='scss'>
|
2018-02-01 14:45:29 -08:00
|
|
|
.fav-active {
|
2016-11-13 08:52:20 -08:00
|
|
|
cursor: pointer;
|
2017-03-08 20:45:40 -08:00
|
|
|
animation-duration: 0.6s;
|
2016-11-13 08:52:20 -08:00
|
|
|
&:hover {
|
2017-01-15 06:44:56 -08:00
|
|
|
color: orange;
|
2016-11-13 08:52:20 -08:00
|
|
|
}
|
|
|
|
}
|
2017-11-24 13:55:46 -08:00
|
|
|
.favorite-button.icon-star {
|
2017-01-15 06:44:56 -08:00
|
|
|
color: orange;
|
2016-11-13 08:52:20 -08:00
|
|
|
}
|
2017-03-08 20:45:40 -08:00
|
|
|
|
2016-10-30 08:12:35 -07:00
|
|
|
</style>
|