mirror of
https://github.com/tcsenpai/swingmusic.git
synced 2025-07-29 14:12:21 +00:00
set album color as img hover bg
This commit is contained in:
parent
92172fe1c0
commit
11951e396a
@ -6,8 +6,14 @@
|
|||||||
}"
|
}"
|
||||||
class="album-card"
|
class="album-card"
|
||||||
>
|
>
|
||||||
<div class="with-img">
|
<div class="with-img rounded-sm no-scroll">
|
||||||
<img class="rounded-sm shadow-lg" :src="imguri + album.image" alt="" />
|
<div
|
||||||
|
class="gradient"
|
||||||
|
:style="{
|
||||||
|
background: `linear-gradient(to top, ${album.colors[0]} 20%, transparent)`,
|
||||||
|
}"
|
||||||
|
></div>
|
||||||
|
<img class="shadow-lg" :src="imguri + album.image" alt="" />
|
||||||
<PlayBtn
|
<PlayBtn
|
||||||
:store="useAlbumStore"
|
:store="useAlbumStore"
|
||||||
:source="playSources.album"
|
:source="playSources.album"
|
||||||
@ -53,18 +59,34 @@ defineProps<{
|
|||||||
gap: $small;
|
gap: $small;
|
||||||
padding: $medium;
|
padding: $medium;
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
height: fit-content;
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
.with-img {
|
.with-img {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0;
|
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gradient {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.play-btn {
|
.play-btn {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 0 0 $medium $medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gradient {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user