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