refactor(ui): replace SVG artwork placeholders with CSS (#292)

* chore(ui): replace SVG placeholders with CSS alternative

* fix(ui): Placeholder review followup
This commit is contained in:
Alex
2026-04-22 17:26:58 -04:00
committed by Zach Yale
parent 5ac7b5553e
commit 2fd7310e81
34 changed files with 392 additions and 511 deletions
@@ -138,7 +138,11 @@
<div class="settings-card book-group-card">
<!-- Book Header -->
<div class="book-group-header" role="button" tabindex="0" (click)="toggleGroup(group.bookId)" (keydown.enter)="toggleGroup(group.bookId)">
<img [src]="group.thumbnailUrl" [alt]="group.bookTitle" class="book-thumbnail" />
@if (group.thumbnailUrl) {
<img [src]="group.thumbnailUrl" [alt]="group.bookTitle" class="book-thumbnail" />
} @else {
<app-cover-placeholder class="book-thumbnail" [title]="group.bookTitle" size="sm" />
}
<div class="book-info">
<span class="book-title">{{ group.bookTitle }}</span>
<span class="book-entry-count">
@@ -12,12 +12,13 @@ import {TranslocoDirective, TranslocoService} from '@jsverse/transloco';
import {NotebookService} from '../../service/notebook.service';
import {NotebookEntry, NotebookPage} from '../../model/notebook.model';
import {UrlHelperService} from '../../../../shared/service/url-helper.service';
import {CoverPlaceholderComponent} from '../../../../shared/components/cover-generator/cover-generator.component';
import {PageTitleService} from '../../../../shared/service/page-title.service';
interface BookGroup {
bookId: number;
bookTitle: string;
thumbnailUrl: string;
thumbnailUrl: string | null;
entries: NotebookEntry[];
}
@@ -43,6 +44,7 @@ const EMPTY_PAGE: NotebookPage = {
TooltipModule,
Paginator,
TranslocoDirective,
CoverPlaceholderComponent,
],
templateUrl: './notebook.component.html',
styleUrls: ['./notebook.component.scss'],
@@ -184,7 +186,7 @@ export class NotebookComponent implements OnInit, OnDestroy {
bookId: entry.bookId,
bookTitle: entry.bookTitle,
thumbnailUrl: isAudiobook
? this.urlHelper.getAudiobookThumbnailUrl(entry.bookId)
? this.urlHelper.getDirectAudiobookThumbnailUrl(entry.bookId)
: this.urlHelper.getDirectThumbnailUrl(entry.bookId),
entries: [],
});