aboutsummaryrefslogtreecommitdiff
path: root/src/components/favorite_button/favorite_button.vue
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2020-10-19 19:38:49 +0300
committerHenry Jameson <me@hjkos.com>2020-10-20 20:28:11 +0300
commit38142182774ea772aacc88f26586512d6279267f (patch)
treed350aba1b9e19741c8219e6ae54d2fedd74cf71f /src/components/favorite_button/favorite_button.vue
parent350f25016f7a42cf1775785dc0c3cb7e59bb321d (diff)
Some initial work on replacing icons with FA5
Diffstat (limited to 'src/components/favorite_button/favorite_button.vue')
-rw-r--r--src/components/favorite_button/favorite_button.vue33
1 files changed, 20 insertions, 13 deletions
diff --git a/src/components/favorite_button/favorite_button.vue b/src/components/favorite_button/favorite_button.vue
index fbc90f84..6c7bfdab 100644
--- a/src/components/favorite_button/favorite_button.vue
+++ b/src/components/favorite_button/favorite_button.vue
@@ -1,18 +1,23 @@
<template>
<div v-if="loggedIn">
- <i
+ <FAIcon
:class="classes"
- class="button-icon favorite-button fav-active"
+ class="FavoriteButton button-icon -interactive"
:title="$t('tool_tip.favorite')"
+ :icon="[status.favorited ? 'fas' : 'far', 'star']"
+ :spin="animated"
+ size="lg"
@click.prevent="favorite()"
/>
<span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
<div v-else>
- <i
+ <FAIcon
:class="classes"
- class="button-icon favorite-button"
+ class="FavoriteButton button-icon"
:title="$t('tool_tip.favorite')"
+ :icon="['far', 'star']"
+ size="lg"
/>
<span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
@@ -23,18 +28,20 @@
<style lang="scss">
@import '../../_variables.scss';
-.fav-active {
- cursor: pointer;
- animation-duration: 0.6s;
+.FavoriteButton {
+ &.-interactive {
+ cursor: pointer;
+ animation-duration: 0.6s;
- &:hover {
+ &:hover {
+ color: $fallback--cOrange;
+ color: var(--cOrange, $fallback--cOrange);
+ }
+ }
+
+ &.-favorited {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
}
-
-.favorite-button.icon-star {
- color: $fallback--cOrange;
- color: var(--cOrange, $fallback--cOrange);
-}
</style>