Recent videos now supports 2 card sizes

This commit is contained in:
Isaac Abadi
2020-08-02 18:03:50 -04:00
parent f0c4ed4590
commit 3df384de22
2 changed files with 3 additions and 2 deletions

View File

@@ -1,8 +1,8 @@
<div>
<div class="container">
<div class="row justify-content-center">
<div *ngFor="let file of files" class="col-6 col-lg-4 mb-2 mt-2 file-col">
<app-unified-file-card (goToFile)="goToFile($event)" (goToSubscription)="goToSubscription($event)" [file_obj]="file"></app-unified-file-card>
<div *ngFor="let file of files" [ngClass]="[ card_size === 'small' ? 'col-2 mb-2 mt-2 file-col' : '', card_size === 'medium' ? 'col-6 col-lg-4 mb-2 mt-2 file-col' : '' ]">
<app-unified-file-card [card_size]="card_size" (goToFile)="goToFile($event)" (goToSubscription)="goToSubscription($event)" [file_obj]="file"></app-unified-file-card>
</div>
</div>
</div>

View File

@@ -12,6 +12,7 @@ export class RecentVideosComponent implements OnInit {
normal_files_received = false;
subscription_files_received = false;
files: any[] = null;
card_size = 'medium';
constructor(private postsService: PostsService, private router: Router) { }