Add hover

This commit is contained in:
aditya.chandel
2025-01-03 13:15:55 -07:00
parent 8453bfb2c9
commit 45809622e2
2 changed files with 27 additions and 4 deletions
@@ -36,8 +36,8 @@
</div> </div>
<div *ngIf="!loading" class="mt-8 flex-1 overflow-y-auto"> <div *ngIf="!loading" class="mt-8 flex-1 overflow-y-auto">
<div *ngFor="let book of books" class="flex flex-col w-full"> <div *ngFor="let book of books" class="book-item flex flex-col w-full">
<div class="flex w-full flex-row"> <div class="flex w-full flex-row book-item-content">
<img [src]="book.thumbnailUrl" alt="Image" class="img-fixed-dimensions pr-2" /> <img [src]="book.thumbnailUrl" alt="Image" class="img-fixed-dimensions pr-2" />
<div class=" flex flex-col w-full m-2"> <div class=" flex flex-col w-full m-2">
<div class="flex flex-row gap-4 justify-between"> <div class="flex flex-row gap-4 justify-between">
@@ -11,3 +11,26 @@
width: 100px; width: 100px;
object-fit: fill; object-fit: fill;
} }
.book-item {
position: relative;
cursor: pointer;
}
.book-item-content {
position: relative;
}
.book-item:hover .book-item-content::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(255, 255, 255, 0.075);
}
.book-item:hover .book-item-content {
box-shadow: 0 0 0 rgba(255, 255, 255, 0.9);
}