Initial commit
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
.book-list {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.book-item {
|
||||
color: #fff;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||||
overflow: hidden;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
height: auto;
|
||||
background-color: var(--surface-card);
|
||||
border-radius: 8px;
|
||||
position: relative; /* Positioning container for the button and overlay */
|
||||
}
|
||||
|
||||
.book-cover {
|
||||
width: 100%;
|
||||
height: 225px; /* Adjust this as per the image height */
|
||||
object-fit: cover;
|
||||
background-color: #444;
|
||||
transition: background-color 0.3s ease, filter 0.3s ease; /* Add transition for blur effect */
|
||||
position: relative; /* Make this the reference point for the overlay */
|
||||
}
|
||||
|
||||
/* Blur and overlay effect */
|
||||
.book-item:hover .book-cover {
|
||||
filter: blur(2px); /* Apply blur effect to the image */
|
||||
}
|
||||
|
||||
.book-item:hover .book-cover::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
|
||||
z-index: 0; /* Put overlay behind the button */
|
||||
}
|
||||
|
||||
.book-info {
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
flex-grow: 1;
|
||||
z-index: 1; /* Ensure the text stays above the overlay */
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1rem;
|
||||
color: var(--text-color);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 5px;
|
||||
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--text-color-secondary);
|
||||
font-size: 0.8rem;
|
||||
line-height: 1.4;
|
||||
margin-top: 0;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.authors {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.no-authors {
|
||||
color: #888;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* PrimeNG button styling */
|
||||
.view-btn {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%); /* Center button on the image */
|
||||
display: none; /* Hide by default */
|
||||
z-index: 1; /* Ensure it appears over the image */
|
||||
}
|
||||
|
||||
.book-item:hover .view-btn {
|
||||
display: block; /* Show the button when the card is hovered */
|
||||
}
|
||||
|
||||
.infinite-scroll {
|
||||
margin-top: 20px;
|
||||
}
|
||||
Reference in New Issue
Block a user