|
1 | 1 | <ngb-carousel #carousel [interval]="2000" (slide)="onSlide($event)" class="ds-carousel"> |
2 | | - <ng-template ngbSlide *ngFor="let item of items; let i = index; let last = last"> |
| 2 | + <ng-template ngbSlide *ngFor="let item of currentPageItems(); let i = index; let last = last"> |
3 | 3 | <ng-container *ngIf="getItemLink(item.indexableObject); let currentLink; else carouselContent"> |
4 | 4 | <a *ngIf="internalLinkService.isLinkInternal(currentLink)" [routerLink]="internalLinkService.getRelativePath(currentLink)"> |
5 | 5 | <ng-container *ngTemplateOutlet="carouselContent"></ng-container> |
|
39 | 39 | <i class="fas fa-pause" *ngIf="!paused"></i> |
40 | 40 | </button> |
41 | 41 | </div> |
| 42 | +<div class="mt-4 w-100 d-flex justify-content-center align-items-center" *ngIf="totalPages > 1"> |
| 43 | + <button (click)="previousPage()" [disabled]="currentPage === 1" class="prev border-0 bg-transparent"> |
| 44 | + <i class="fa fa-arrow-left"></i> |
| 45 | + </button> |
| 46 | + <button |
| 47 | + *ngFor="let page of pages()" |
| 48 | + class="number" |
| 49 | + (click)="changePage(page)" |
| 50 | + style="border: none; background: none; margin: 0 5px" |
| 51 | + [style.color]="page === currentPage ? '#000000' : '#7c7c7c'"> |
| 52 | + {{ page < 10 ? '0' + page : page }} |
| 53 | + </button> |
| 54 | + <button (click)="nextPage()" [disabled]="currentPage === pages().length" class="next border-0 bg-transparent"> |
| 55 | + <i class="fa fa-arrow-right"></i> |
| 56 | + </button> |
| 57 | +</div> |
| 58 | + |
| 59 | +<div |
| 60 | + class="carousel-content-wrapper" |
| 61 | + [ngStyle]="{ |
| 62 | + 'height': carouselOptions.keepAspectRatio ? null : carouselOptions.carouselHeightPx + 'px', |
| 63 | + 'aspect-ratio': carouselOptions.keepAspectRatio ? carouselOptions.aspectRatio : null |
| 64 | + }" |
| 65 | + *ngIf="(isLoading$ | async)" |
| 66 | +> |
| 67 | + <a |
| 68 | + href="#" |
| 69 | + target="_blank" |
| 70 | + class="img-container-el"> |
| 71 | + <div class="picsum-img-wrapper flex-column"> |
| 72 | + <img class="img-fluid" src="assets/images/replacement_image.svg"> |
| 73 | + {{'loading.default' | translate}} |
| 74 | + </div> |
| 75 | + </a> |
| 76 | +</div> |
0 commit comments