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
@@ -4,6 +4,12 @@
|
||||
class="book-cover"
|
||||
alt="Cover of {{ book.metadata?.title }}"
|
||||
loading="lazy"/>
|
||||
|
||||
@if (showSeriesNumber && !book.seriesCount && book.metadata?.seriesNumber != null) {
|
||||
<div class="series-number-overlay">
|
||||
#{{ book.metadata?.seriesNumber }}
|
||||
</div>
|
||||
}
|
||||
|
||||
@if (!this.isActive) {
|
||||
<p-button
|
||||
|
||||
+12
@@ -25,4 +25,16 @@
|
||||
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 {
|
||||
@Input() book!: Book;
|
||||
@Input() isActive: boolean = false;
|
||||
@Input() showSeriesNumber: boolean = false;
|
||||
|
||||
private router = inject(Router);
|
||||
protected urlHelper = inject(UrlHelperService);
|
||||
|
||||
+1
-1
@@ -634,7 +634,7 @@
|
||||
@for (bookInSeriesItem of bookInSeries; track bookInSeriesItem) {
|
||||
@if (bookInSeriesItem.id !== book.id) {
|
||||
<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>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user