added new componente for publication swiper

This commit is contained in:
Eudes Inácio
2024-04-11 08:19:07 +01:00
parent 80fe8a4041
commit 622061bd6b
9 changed files with 521 additions and 47 deletions
+29 -2
View File
@@ -1,9 +1,36 @@
<ion-header>
<!-- <ion-header>
<ion-toolbar>
<ion-title>swiper</ion-title>
</ion-toolbar>
</ion-header>
</ion-header> -->
<ion-content>
<swiper-container #swipers [slidechange]="onSlideChange()">
<swiper-slide *ngFor="let files of publicationList.Files let k = index">
<div >
<img *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'image'" class="post-img"
[src]="'data:image/jpg;base64,' + files.FileBase64">
<video #videoElement [appVisibility]="onVisibilityChange" *ngIf="checkFileType.checkFileType(files.FileExtension ) == 'video'" class="post-video" controls="controls" preload="none"
playsinline webkit-playsinline="webkit-playsinline" (play)="stopvideoService.registerVideoWithEvent($event)">
<source [src]="files.FileBase64" type="video/mp4" >
</video>
</div>
</swiper-slide>
</swiper-container>
</ion-content>
<ion-footer>
<div *ngIf="publicationList.Files.length > 2" class="dots-container">
<span *ngFor="let files of publicationList.Files; let k = index"
[class.dotsSwiper]="true"
[class.active-dot]="swiperIndex === k"
(click)="goToSlide(k)"
>
</span>
</div>
</ion-footer>