Fix dashboard cards squishing
This commit is contained in:
+4
-4
@@ -1,19 +1,19 @@
|
||||
<p class="text-left text-2xl mb-2.5 p-1.25">{{ title }}</p>
|
||||
<p class="dashboard-scroller-title">{{ title }}</p>
|
||||
|
||||
<div class="pt-12 flex justify-center items-center" *ngIf="!books || books.length === 0">
|
||||
<div class="dashboard-scroller-no-books" *ngIf="!books || books.length === 0">
|
||||
<p class="text-sm">
|
||||
{{ bookListType === 'lastRead' ? "You haven't read any books yet!" : "No books have been added to BookLore!" }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row overflow-x-auto overflow-y-hidden snap-x snap-mandatory p-1 gap-5 h-full box-border"
|
||||
<div class="dashboard-scroller-infinite"
|
||||
infiniteScroll
|
||||
[infiniteScrollDistance]="2"
|
||||
[infiniteScrollThrottle]="50"
|
||||
#scrollContainer
|
||||
[horizontal]="true">
|
||||
|
||||
<div class="overflow-hidden bg-[var(--card-background)] rounded-lg flex-[0_0_9.5%] snap-start relative" *ngFor="let book of books">
|
||||
<div class="dashboard-scroller-card" *ngFor="let book of books">
|
||||
<app-book-card [book]="book" [isCheckboxEnabled]="false"></app-book-card>
|
||||
</div>
|
||||
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
.dashboard-scroller-title {
|
||||
text-align: left;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 0.625rem;
|
||||
padding: 0.3125rem;
|
||||
}
|
||||
|
||||
.dashboard-scroller-no-books {
|
||||
padding-top: 3rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dashboard-scroller-infinite {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
scroll-snap-type: x mandatory;
|
||||
padding: 0.25rem;
|
||||
gap: 1.25rem;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.dashboard-scroller-card {
|
||||
height: 220px;
|
||||
width: 135px;
|
||||
flex-shrink: 0;
|
||||
flex-grow: 0;
|
||||
flex-basis: 135px;
|
||||
}
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
[title]="'Last Read Books'">
|
||||
</app-dashboard-scroller>
|
||||
|
||||
<div class="mb-8">
|
||||
<div class="mb-6">
|
||||
<p-divider></p-divider>
|
||||
</div>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
[title]="'Latest Added Books'">
|
||||
</app-dashboard-scroller>
|
||||
|
||||
<div class="mb-8">
|
||||
<div class="mb-6">
|
||||
<p-divider></p-divider>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user