Fixed the weird merging of heart and explicit icons and made a few changes.

In this PR:
* The Explicit and Love icon(s) don't merge and are of same size
* Added Display of unlove icon as well in case song is not loved

Screenshots:
This commit is contained in:
Monochromish 2022-05-02 06:52:07 +10:00
parent 59f0cd7ee2
commit 5ee5eac35a
5 changed files with 38 additions and 11 deletions

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24" fill="currentColor" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>

Before

Width:  |  Height:  |  Size: 379 B

After

Width:  |  Height:  |  Size: 373 B

Before After
Before After

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg>

Before

Width:  |  Height:  |  Size: 371 B

After

Width:  |  Height:  |  Size: 364 B

Before After
Before After

View file

@ -364,6 +364,21 @@
align-items: center;
justify-content: center;
}
.cd-mediaitem-list-item .heart-unfilled {
background-image: url("assets/feather/heart.svg");
height: 12px;
width: 36px;
filter: contrast(0);
background-repeat: no-repeat;
}
.cd-mediaitem-list-item .heart-filled {
background-image: url("assets/feather/heart-fill.svg");
height: 12px;
width: 36px;
filter: contrast(0);
background-repeat: no-repeat;
}
.cd-mediaitem-list-item .explicit-icon {
background-image: url("assets/explicit.svg");
height: 12px;
@ -372,9 +387,7 @@
background-repeat: no-repeat;
}
.heart-icon {
position: absolute;
filter: contrast(0);
background-repeat: no-repeat;
display: flex
}
@keyframes load-bar {
10% {

View file

@ -448,6 +448,22 @@
justify-content: center;
}
.heart-unfilled {
background-image: url("assets/feather/heart.svg");
height: 12px;
width: 36px;
filter: contrast(0);
background-repeat: no-repeat;
}
.heart-filled {
background-image: url("assets/feather/heart-fill.svg");
height: 12px;
width: 36px;
filter: contrast(0);
background-repeat: no-repeat;
}
.explicit-icon {
background-image: url("./assets/explicit.svg");
height: 12px;
@ -457,10 +473,7 @@
}
.heart-icon {
position: absolute;
right:0;
filter: contrast(0);
background-repeat: no-repeat;
display: flex
}
/* CSS.gg

View file

@ -65,8 +65,9 @@
</template>
</div>
</div>
<div class="heart-icon" v-if="isLoved">
<div class="svg-icon" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}"></div>
<div class="heart-icon">
<div class="heart-unfilled" v-if="isLoved == false" :style="{'--url': 'url(./assets/feather/heart.svg)'}" />
<div class="heart-filled" v-if="isLoved == true" :style="{'--url': 'url(./assets/feather/heart-fill.svg)'}" />
</div>
<div class="explicit-icon" v-if="item.attributes && item.attributes.contentRating == 'explicit'"></div>
<template v-if="showMetaData == true" @dblclick="route()">