feat(ui): add series number overlay for More in Series (#2208)
Co-authored-by: ACX <8075870+acx10@users.noreply.github.com>
This commit is contained in:
+6
@@ -5,6 +5,12 @@
|
|||||||
alt="Cover of {{ book.metadata?.title }}"
|
alt="Cover of {{ book.metadata?.title }}"
|
||||||
loading="lazy"/>
|
loading="lazy"/>
|
||||||
|
|
||||||
|
@if (showSeriesNumber && !book.seriesCount && book.metadata?.seriesNumber != null) {
|
||||||
|
<div class="series-number-overlay">
|
||||||
|
#{{ book.metadata?.seriesNumber }}
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
|
||||||
@if (!this.isActive) {
|
@if (!this.isActive) {
|
||||||
<p-button
|
<p-button
|
||||||
icon="pi pi-info"
|
icon="pi pi-info"
|
||||||
|
|||||||
+12
@@ -25,4 +25,16 @@
|
|||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.series-number-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 4px;
|
||||||
|
left: 4px;
|
||||||
|
background-color: rgba(0, 0, 0, 0.7);
|
||||||
|
color: white;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
padding: 1px 3px;
|
||||||
|
border-radius: 3px;
|
||||||
|
z-index: 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -23,6 +23,7 @@ import {TooltipModule} from 'primeng/tooltip';
|
|||||||
export class BookCardLiteComponent implements OnInit, OnDestroy {
|
export class BookCardLiteComponent implements OnInit, OnDestroy {
|
||||||
@Input() book!: Book;
|
@Input() book!: Book;
|
||||||
@Input() isActive: boolean = false;
|
@Input() isActive: boolean = false;
|
||||||
|
@Input() showSeriesNumber: boolean = false;
|
||||||
|
|
||||||
private router = inject(Router);
|
private router = inject(Router);
|
||||||
protected urlHelper = inject(UrlHelperService);
|
protected urlHelper = inject(UrlHelperService);
|
||||||
|
|||||||
+1
-1
@@ -634,7 +634,7 @@
|
|||||||
@for (bookInSeriesItem of bookInSeries; track bookInSeriesItem) {
|
@for (bookInSeriesItem of bookInSeries; track bookInSeriesItem) {
|
||||||
@if (bookInSeriesItem.id !== book.id) {
|
@if (bookInSeriesItem.id !== book.id) {
|
||||||
<div class="dashboard-scroller-card">
|
<div class="dashboard-scroller-card">
|
||||||
<app-book-card-lite-component [book]="bookInSeriesItem" [isActive]="bookInSeriesItem.id === book.id"></app-book-card-lite-component>
|
<app-book-card-lite-component [book]="bookInSeriesItem" [showSeriesNumber]="true" [isActive]="bookInSeriesItem.id === book.id"></app-book-card-lite-component>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user