Dashboard component uses app-book-card
This commit is contained in:
+1
-7
@@ -13,13 +13,7 @@
|
|||||||
#scrollContainer
|
#scrollContainer
|
||||||
[horizontal]="true">
|
[horizontal]="true">
|
||||||
<div class="book-item" *ngFor="let book of booksSignal!()">
|
<div class="book-item" *ngFor="let book of booksSignal!()">
|
||||||
<img [src]="coverImageSrc(book.id)" class="book-cover" alt="Cover of {{ book.metadata?.title }}" loading="lazy"/>
|
<app-book-card [book]="book"></app-book-card>
|
||||||
<div class="book-info">
|
|
||||||
<h4>{{ book.metadata?.title }}</h4>
|
|
||||||
<p>{{ getAuthorNames(book) }}</p>
|
|
||||||
<p-button [rounded]="true" icon="pi pi-eye" class="view-btn" (click)="openBook(book)"></p-button>
|
|
||||||
<p-button [rounded]="true" icon="pi pi-info" class="read-btn" (click)="openBookInfo(book.id, book.libraryId)"></p-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+3
-1
@@ -5,6 +5,7 @@ import {Button} from 'primeng/button';
|
|||||||
import {InfiniteScrollDirective} from 'ngx-infinite-scroll';
|
import {InfiniteScrollDirective} from 'ngx-infinite-scroll';
|
||||||
import {NgForOf, NgIf} from '@angular/common';
|
import {NgForOf, NgIf} from '@angular/common';
|
||||||
import {Router} from '@angular/router';
|
import {Router} from '@angular/router';
|
||||||
|
import {BookCardComponent} from '../book-card/book-card.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-dashboard-scroller',
|
selector: 'app-dashboard-scroller',
|
||||||
@@ -14,7 +15,8 @@ import {Router} from '@angular/router';
|
|||||||
Button,
|
Button,
|
||||||
InfiniteScrollDirective,
|
InfiniteScrollDirective,
|
||||||
NgForOf,
|
NgForOf,
|
||||||
NgIf
|
NgIf,
|
||||||
|
BookCardComponent
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class DashboardScrollerComponent implements OnInit {
|
export class DashboardScrollerComponent implements OnInit {
|
||||||
|
|||||||
Reference in New Issue
Block a user