Add theme switching
More reactivity in Library Browser
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
<div class="book-metadata">
|
||||
<div class="book-header">
|
||||
<div class="cover-container">
|
||||
<img [src]="coverImageSrc(book?.id)" class="book-cover placeholder" alt="Cover of {{ book?.metadata?.title }}" loading="lazy"/>
|
||||
<div class="cover-wrapper">
|
||||
<img [src]="coverImageSrc(book?.id)" class="book-cover placeholder" alt="Cover of {{ book?.metadata?.title }}" loading="lazy"/>
|
||||
<div class="overlay" (click)="readBook(book?.id)">
|
||||
<p-button icon="pi pi-book" [rounded]="true"></p-button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="book-navigation">
|
||||
<p-button
|
||||
|
||||
@@ -17,14 +17,36 @@
|
||||
}
|
||||
|
||||
.cover-container {
|
||||
position: relative;
|
||||
max-width: 200px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.cover-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.book-cover {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
|
||||
transition: filter 0.3s ease;
|
||||
}
|
||||
|
||||
.cover-container:hover .book-cover {
|
||||
filter: blur(2px);
|
||||
}
|
||||
|
||||
.overlay {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.cover-container:hover .overlay {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.metadata {
|
||||
|
||||
@@ -36,7 +36,7 @@ export class BookMetadataComponent implements OnInit, OnDestroy {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.routeSubscription = this.activatedRoute.paramMap.subscribe((paramMap) => {
|
||||
const bookId = +paramMap.get('bookId')!;
|
||||
const bookId = +paramMap.get('bookId')!;
|
||||
const libraryId = +paramMap.get('libraryId')!;
|
||||
if (bookId && libraryId) {
|
||||
this.loadBookWithNeighbors(bookId, libraryId);
|
||||
|
||||
Reference in New Issue
Block a user