|
1 | | -<ngb-carousel #carousel [interval]="2000" (slide)="onSlide($event)" class="ds-carousel"> |
2 | | - <ng-template ngbSlide *ngFor="let item of currentPageItems(); let i = index; let last = last"> |
| 1 | +<ngb-carousel #carousel [interval]="2000" (slide)="onSlide($event)" class="ds-carousel" *ngIf="!(isLoading$ | async)"> |
| 2 | + <ng-template ngbSlide *ngFor="let item of (currentPageItems$ | async); 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> |
|
33 | 33 | </ng-template> |
34 | 34 | </ng-template> |
35 | 35 | </ngb-carousel> |
36 | | -<div class="text-center play-pause-button"> |
37 | | - <button type="button" class="btn btn-sm toggle-paused" (click)="togglePaused()"> |
38 | | - <i class="fas fa-play" *ngIf="paused"></i> |
39 | | - <i class="fas fa-pause" *ngIf="!paused"></i> |
40 | | - </button> |
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 | 36 |
|
59 | 37 | <div |
60 | 38 | class="carousel-content-wrapper" |
|
64 | 42 | }" |
65 | 43 | *ngIf="(isLoading$ | async)" |
66 | 44 | > |
67 | | - <a |
68 | | - href="#" |
69 | | - target="_blank" |
70 | | - class="img-container-el"> |
| 45 | + <div class="h-100 img-container-el"> |
71 | 46 | <div class="picsum-img-wrapper flex-column"> |
72 | 47 | <img class="img-fluid" src="assets/images/replacement_image.svg"> |
73 | 48 | {{'loading.default' | translate}} |
74 | 49 | </div> |
75 | | - </a> |
| 50 | + </div> |
| 51 | +</div> |
| 52 | + |
| 53 | +<div class="text-center play-pause-button"> |
| 54 | + <button [disabled]="isLoading$ | async" type="button" class="btn btn-sm toggle-paused" (click)="togglePaused()"> |
| 55 | + <i class="fas fa-play" *ngIf="paused"></i> |
| 56 | + <i class="fas fa-pause" *ngIf="!paused"></i> |
| 57 | + </button> |
76 | 58 | </div> |
| 59 | +<div class="mt-4 w-100 d-flex justify-content-center align-items-center" *ngIf="totalPages > 1"> |
| 60 | + <div |
| 61 | + class="page-item" |
| 62 | + [class.disabled]="currentPage === 1 || (isLoading$ | async)" |
| 63 | + > |
| 64 | + <button (click)="previousPage()" [disabled]="currentPage === 1 || (isLoading$ | async)" class="page-link prev"> |
| 65 | + « |
| 66 | + </button> |
| 67 | + </div> |
| 68 | + |
| 69 | + <div |
| 70 | + *ngFor="let page of (currentlyVisiblePages$ | async)" |
| 71 | + class="page-item" |
| 72 | + [class.active]="page === currentPage" |
| 73 | + > |
| 74 | + <button |
| 75 | + class="page-link" |
| 76 | + (click)="changePage(page)" |
| 77 | + [disabled]="isLoading$ | async" |
| 78 | + > |
| 79 | + {{ page < 10 ? '0' + page : page }} |
| 80 | + </button> |
| 81 | + </div> |
| 82 | + |
| 83 | + <div |
| 84 | + class="page-item" |
| 85 | + [class.disabled]="currentPage === totalPages || (isLoading$ | async)" |
| 86 | + > |
| 87 | + <button (click)="nextPage()" [disabled]="currentPage === totalPages || (isLoading$ | async)" class="page-link next"> |
| 88 | + » |
| 89 | + </button> |
| 90 | + </div> |
| 91 | +</div> |
| 92 | + |
| 93 | + |
0 commit comments