Skip to content

Commit 0dab2f1

Browse files
committed
fix: ListView arrow and navbar banner sticky
1 parent 789ed97 commit 0dab2f1

File tree

6 files changed

+29
-16
lines changed

6 files changed

+29
-16
lines changed

src/app/_samples/mediaco/components/banner/banner.component.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<div style="margin-bottom: '2rem'">
2-
<div class="background-image-style">
3-
<div class="background-style content">
4-
<div>
5-
<h1 class="title" [innerHTML]="title"></h1>
6-
<p class="message">{{ message }}</p>
7-
</div>
1+
<div class="background-image-style">
2+
<div class="background-style content">
3+
<div>
4+
<h1 class="title" [innerHTML]="title"></h1>
5+
<p class="message">{{ message }}</p>
86
</div>
97
</div>
8+
</div>
9+
<div class="scrollable-content">
1010
<div
1111
[ngClass]="{
1212
'psdk-grid-filter-1 psdk-main-content-section': this.layout$ === 'two-column',

src/app/_samples/mediaco/components/banner/banner.component.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,16 @@
3434
}
3535

3636
.background-image-style {
37-
height: calc(20rem);
38-
background-size: cover;
39-
background-position: center center;
37+
height: calc(18rem);
38+
position: sticky;
39+
top: var(--mat-toolbar-standard-height, 64px);
40+
background: var(--mat-toolbar-container-background-color, var(--mat-sys-surface));
41+
z-index: 10;
4042
}
4143

4244
.background-style {
43-
background-color: transparent;
4445
color: var(--app-inverse-form-color);
4546
width: 100%;
46-
height: 100%;
4747
text-align: center;
4848
}
4949

src/app/_samples/mediaco/components/list-view/list-view.component.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ <h3>{{ title }}</h3>
77
<div class="active-line"></div>
88
</div>
99
</div>
10+
<div *ngIf="referenceDataPage === 'D_AccountHistoryList'" class="arrow-icon">
11+
<button mat-icon-button (click)="openShowAll()" class="tilt-icon">
12+
<mat-icon>arrow_forward</mat-icon>
13+
</button>
14+
</div>
1015
</div>
1116
<div *ngIf="template === 'Table'">
1217
<div class="info-container">
@@ -41,6 +46,6 @@ <h3>{{ title }}</h3>
4146
</div>
4247
</div>
4348
<div class="carousel-footer">
44-
<a mat-button color="primary" *ngIf="referenceDataPage !== 'D_TrendingItemsList'" (click)="openShowAll()">Show All</a>
49+
<a mat-button color="primary" *ngIf="referenceDataPage !== 'D_TrendingItemsList' && template === 'Gallery'" (click)="openShowAll()">Show All</a>
4550
</div>
4651
</ng-template>

src/app/_samples/mediaco/components/list-view/list-view.component.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ $primary-purple: #9c27b0;
3636
justify-content: space-between;
3737
align-items: center;
3838
width: 100%;
39+
margin-bottom: 28px;
3940
}
4041

4142
.icon-wrapper {
@@ -170,7 +171,6 @@ $primary-purple: #9c27b0;
170171

171172
.section-header {
172173
display: flex;
173-
margin-bottom: 32px;
174174
padding: 0 4px;
175175

176176
.title-group {
@@ -214,3 +214,8 @@ $primary-purple: #9c27b0;
214214
cursor: pointer;
215215
text-decoration: underline;
216216
}
217+
218+
.tilt-icon:hover {
219+
transform: rotate(15deg);
220+
transition: transform 0.1s ease-in-out;
221+
}

src/app/_samples/mediaco/components/list-view/list-view.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { Utils, ListViewComponent as OOTBListViewComponent } from '@pega/angular
44
import { CarouselComponent } from '../carousel/carousel.component';
55
import { GalleryGridComponent } from '../gallery-grid/gallery-grid.component';
66
import { MatDialog } from '@angular/material/dialog';
7+
import { MatIconButton } from '@angular/material/button';
8+
import { MatIcon } from '@angular/material/icon';
79

810
interface ListViewProps {
911
inheritedProps: any;
@@ -29,7 +31,7 @@ interface ListViewProps {
2931

3032
@Component({
3133
selector: 'mediaco-list-view',
32-
imports: [CommonModule, CarouselComponent, OOTBListViewComponent],
34+
imports: [CommonModule, CarouselComponent, OOTBListViewComponent, MatIconButton, MatIcon],
3335
templateUrl: './list-view.component.html',
3436
styleUrl: './list-view.component.scss',
3537
providers: [Utils]

src/app/_samples/mediaco/components/wss-nav-bar/wss-nav-bar.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
</mat-sidenav>
3535
<mat-sidenav-content>
3636
<!-- Top Toolbar -->
37-
<mat-toolbar style="position: relative; background: transparent">
37+
38+
<mat-toolbar style="position: sticky; top: 0; z-index: 10">
3839
<mat-toolbar-row mat-icon-button style="justify-content: space-between">
3940
<div class="psdk-nav-header" (click)="navPanelButtonClick(homePage)">
4041
<div>

0 commit comments

Comments
 (0)