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"
|
||||
>
|
||||
<div class="with-img">
|
||||
<img class="rounded-sm shadow-lg" :src="imguri + album.image" alt="" />
|
||||
<div class="with-img rounded-sm no-scroll">
|
||||
<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
|
||||
:store="useAlbumStore"
|
||||
:source="playSources.album"
|
||||
@ -53,18 +59,34 @@ defineProps<{
|
||||
gap: $small;
|
||||
padding: $medium;
|
||||
border-radius: 1rem;
|
||||
height: fit-content;
|
||||
position: relative;
|
||||
|
||||
.with-img {
|
||||
position: relative;
|
||||
padding: 0;
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.gradient {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.play-btn {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 0 0 $medium $medium;
|
||||
}
|
||||
|
||||
.gradient {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user