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