generateSyndicationList () {
this.syndicationItems = this.videoService.getAccountFeedUrls(this.account.id)
}
+
+ displayAsRow () {
+ return this.screenService.isInMobileView()
+ }
}
}
.playlists {
- text-align: left !important;
- justify-content: left !important;
+ justify-content: left;
margin-left: pvar(--horizontalMarginContent) !important;
- margin-right: var(--horizontalMarginContent) !important;
+ margin-right: pvar(--horizontalMarginContent) !important;
}
}
this.reloadVideos()
}
+
+ displayAsRow () {
+ return this.screenService.isInMobileView()
+ }
}
<div class="no-results" i18n *ngIf="hasDoneFirstQuery && videos.length === 0">No results.</div>
<div
myInfiniteScroller (nearOfBottom)="onNearOfBottom()" [autoInit]="true" [dataObservable]="onDataSubject.asObservable()"
- class="videos"
+ class="videos" [ngClass]="{ 'display-as-row': displayAsRow() }"
>
<ng-container *ngFor="let video of videos; trackBy: videoById;">
<h2 class="date-title" *ngIf="getCurrentGroupedDateLabel(video)">
<div class="video-wrapper">
<my-video-miniature
- [video]="video" [user]="userMiniature"
+ [video]="video" [user]="userMiniature" [displayAsRow]="displayAsRow()"
[displayVideoActions]="displayVideoActions" [displayOptions]="displayOptions"
(videoBlocked)="removeVideoFromArray(video)" (videoRemoved)="removeVideoFromArray(video)"
>
@include grid-videos-miniature-layout;
}
+.display-as-row.videos {
+ margin-left: pvar(--horizontalMarginContent);
+ margin-right: pvar(--horizontalMarginContent);
+
+ .video-wrapper {
+ margin-bottom: 15px;
+ }
+}
+
@media screen and (max-width: $mobile-view) {
.videos-header {
flex-direction: column;
viewContainerRef.createComponent(componentFactory, 0, injector)
}
+ // Can be redefined by child
+ displayAsRow () {
+ return false
+ }
+
// On videos hook for children that want to do something
protected onMoreVideos () { /* empty */ }
}
}
}
-
- @media screen and (max-width: $mobile-view) {
- .videos,
- .playlists {
- text-align: center;
- }
- }
}