add "add to favorite" buttons to artist and album page headers

+ fix album page play buttton
This commit is contained in:
geoffrey45
2022-12-27 18:55:35 +03:00
committed by Mungai Njoroge
parent 4476a8ebe0
commit f7a054d569
9 changed files with 63 additions and 23 deletions
+15 -9
View File
@@ -17,7 +17,7 @@
>
<section class="text">
<div class="card-title">Artist</div>
<div class="artist-name">{{ artist.info.name }}</div>
<div class="artist-name ellip2">{{ artist.info.name }}</div>
<div class="stats">
{{ artist.info.trackcount }} Track{{
`${artist.info.trackcount == 1 ? "" : "s"}`
@@ -29,7 +29,10 @@
{{ formatSeconds(artist.info.duration, true) }}
</div>
</section>
<PlayBtnRect :source="playSources.artist" :store="useArtistPageStore" />
<div class="buttons">
<PlayBtnRect :source="playSources.artist" :store="useArtistPageStore" />
<HeartSvg />
</div>
</div>
<div class="artist-img no-select">
<img :src="paths.images.artist.large + artist.info.image" />
@@ -54,6 +57,7 @@ import formatSeconds from "@/utils/useFormatSeconds";
import { isLight } from "@/composables/colors/album";
import { paths } from "@/config";
import { playSources } from "@/composables/enums";
import HeartSvg from "@/components/shared/HeartSvg.vue";
const artist = useArtistPageStore();
</script>
@@ -68,11 +72,13 @@ const artist = useArtistPageStore();
.artist-page-header {
height: 18rem;
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-columns: 50% 50%;
position: relative;
.artist-img {
// border: solid red;
height: 18rem;
width: 100%;
img {
height: 100%;
@@ -120,12 +126,7 @@ const artist = useArtistPageStore();
.artist-name {
font-size: 3rem;
font-weight: bold;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
}
.stats {
@@ -136,5 +137,10 @@ const artist = useArtistPageStore();
.artist-info.nocontrast {
color: $black;
}
.buttons {
display: flex;
gap: $small;
}
}
</style>