Files
grimmory/frontend/src/app/features/book/components/book-card-lite/book-card-lite-component.html
T

34 lines
1.1 KiB
HTML

<div class="book-cover-wrapper" [class.audiobook-only]="isAudiobookOnly()" (mouseenter)="isHovered = true" (mouseleave)="isHovered = false">
@if (getThumbnailUrl(); as coverUrl) {
<img
[src]="coverUrl"
class="book-cover"
alt="Cover of {{ book.metadata?.title }}"
width="250"
height="350"
loading="lazy"
decoding="async"
fetchpriority="low"/>
} @else {
<app-cover-placeholder class="book-cover" [title]="book.metadata?.title ?? ''" [author]="(book.metadata?.authors ?? []).join(', ')" size="sm" />
}
@if (showSeriesNumber && !book.seriesCount && book.metadata?.seriesNumber !== null && book.metadata?.seriesNumber !== undefined) {
<div class="series-number-overlay">
#{{ book.metadata?.seriesNumber }}
</div>
}
@if (!this.isActive) {
<p-button
icon="pi pi-info"
class="info-btn"
[rounded]="true"
[pTooltip]="book.metadata?.title"
tooltipPosition="top"
[ngClass]="{ 'is-visible': isHovered }"
(onClick)="openBookInfo(book)">
</p-button>
}
</div>