Replace all use of <a> + href='#' with proper buttons

This commit is contained in:
Shpuld Shpuldson 2020-11-24 12:32:42 +02:00
parent 14ce0c1c07
commit 7b99d98c55
60 changed files with 384 additions and 363 deletions

View file

@ -31,11 +31,6 @@ const FavoriteButton = {
}
},
computed: {
classes () {
return {
'-favorited': this.status.favorited
}
},
...mapGetters(['mergedConfig'])
}
}

View file

@ -1,18 +1,20 @@
<template>
<div v-if="loggedIn">
<FAIcon
:class="classes"
class="FavoriteButton fa-scale-110 fa-old-padding -interactive"
<div>
<button
v-if="loggedIn"
class="FavoriteButton -interactive button-unstyled -padded"
:class="status.favorited && '-favorited'"
:title="$t('tool_tip.favorite')"
:icon="[status.favorited ? 'fas' : 'far', 'star']"
:spin="animated"
@click.prevent="favorite()"
/>
<span v-if="!mergedConfig.hidePostStats && status.fave_num > 0">{{ status.fave_num }}</span>
</div>
<div v-else>
>
<FAIcon
class="fa-scale-110 fa-old-padding"
:icon="[status.favorited ? 'fas' : 'far', 'star']"
:spin="animated"
/>
</button>
<FAIcon
:class="classes"
v-else
class="FavoriteButton fa-scale-110 fa-old-padding"
:title="$t('tool_tip.favorite')"
:icon="['far', 'star']"
@ -28,18 +30,16 @@
.FavoriteButton {
&.-interactive {
cursor: pointer;
animation-duration: 0.6s;
&:hover {
.svg-inline--fa {
animation-duration: 0.6s;
}
&:hover .svg-inline--fa,
&.-favorited .svg-inline--fa {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
}
&.-favorited {
color: $fallback--cOrange;
color: var(--cOrange, $fallback--cOrange);
}
}
</style>