Skip to content

Commit e1d71f0

Browse files
committed
browse page thumbnail spillover fix
1 parent c3399ea commit e1d71f0

File tree

2 files changed

+32
-14
lines changed

2 files changed

+32
-14
lines changed

src/app/components/browse-models/browse-models.component.html

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@
1212
</mat-form-field>
1313
</mat-card-content>
1414
</mat-card>
15-
<mat-grid-list #gridContainer [cols]="gridCols" rowHeight="2:1" gutterSize="10px" infiniteScroll [infiniteScrollDistance]="1" [infiniteScrollThrottle]="50" (scrolled)="loadMoreItems()">
16-
@for (item of displayedData; track item) {
17-
<mat-grid-tile class="rounded-xl border-solid border border-sky-800" [routerLink]="['/items', item.id]">
18-
<div class="thumbnail" [ngStyle]="{'background-image': 'url(' + thumbnails[item.filename] + ')'}">
19-
<mat-grid-tile-footer>
20-
<span class="!text-xl">
21-
{{ item.title }}
22-
</span>
23-
</mat-grid-tile-footer>
24-
</div>
25-
</mat-grid-tile>
26-
}
27-
</mat-grid-list>
15+
<div class="grid-scroll-container">
16+
<mat-grid-list #gridContainer [cols]="gridCols" rowHeight="2:1" gutterSize="10px" infiniteScroll [infiniteScrollDistance]="1" [infiniteScrollThrottle]="50" (scrolled)="loadMoreItems()">
17+
@for (item of displayedData; track item) {
18+
<mat-grid-tile class="rounded-xl border-solid border border-sky-800" [routerLink]="['/items', item.id]">
19+
<div class="thumbnail" [ngStyle]="{'background-image': 'url(' + thumbnails[item.filename] + ')'}">
20+
<mat-grid-tile-footer>
21+
<span class="!text-xl">
22+
{{ item.title }}
23+
</span>
24+
</mat-grid-tile-footer>
25+
</div>
26+
</mat-grid-tile>
27+
}
28+
</mat-grid-list>
29+
</div>
2830
</mat-card-content>
2931
</mat-card>

src/app/components/browse-models/browse-models.component.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,21 @@
2828
}
2929

3030
.full-height {
31-
height: 100vh;
31+
display: flex;
32+
flex-direction: column;
33+
height: 90vh; /* or whatever max height you want */
34+
min-height: 0;
35+
}
36+
.mat-card-content {
37+
flex: 1 1 auto;
38+
min-height: 0;
39+
display: flex;
40+
flex-direction: column;
41+
}
42+
.grid-scroll-container {
43+
flex: 1 1 auto;
44+
min-height: 0;
45+
max-height: 70vh;
46+
overflow-y: auto;
47+
transition: max-height 0.2s;
3248
}

0 commit comments

Comments
 (0)