|
1 |
| -@if (_item) { |
2 |
| - @if (_item.imageGalleryFull) { |
3 |
| - <img |
4 |
| - alt="" |
5 |
| - [src]="_item.imageGalleryFull.src" |
6 |
| - [class.crop-mode]="cropMode()" |
7 |
| - class="full" |
8 |
| - [ngStyle]="fullStyle" |
9 |
| - (load)="fullLoaded()" |
10 |
| - /> |
| 1 | +@if (item(); as item) { |
| 2 | + @if (item.imageGalleryFull) { |
| 3 | + @if (fullStyle(); as fullStyle) { |
| 4 | + <img |
| 5 | + alt="" |
| 6 | + [src]="item.imageGalleryFull.src" |
| 7 | + [class.crop-mode]="cropModeAvailable() && cropMode()" |
| 8 | + class="full" |
| 9 | + [ngStyle]="fullStyle" |
| 10 | + (load)="fullLoaded()" |
| 11 | + /> |
| 12 | + } |
11 | 13 | }
|
12 |
| - @if (_item.imageGallery) { |
| 14 | + @if (item.imageGallery) { |
13 | 15 | <img
|
14 | 16 | alt=""
|
15 |
| - [src]="_item.imageGallery.src" |
16 |
| - [class.crop-mode]="cropMode()" |
| 17 | + [src]="item.imageGallery.src" |
| 18 | + [class.crop-mode]="cropModeAvailable() && cropMode()" |
17 | 19 | class="crop"
|
18 |
| - [ngStyle]="cropStyle" |
| 20 | + [ngStyle]="cropStyle()" |
19 | 21 | (load)="cropLoaded()"
|
20 | 22 | />
|
21 | 23 | }
|
22 |
| - @if (_item) { |
23 |
| - @for (area of areas; track area) { |
24 |
| - <app-gallery-carousel-item-area [area]="area.pictureItem" [styles]="area.styles" /> |
25 |
| - } |
26 |
| - |
27 |
| - <div class="carousel-caption"> |
28 |
| - <h3 [innerHTML]="nameHtml"></h3> |
29 |
| - </div> |
30 | 24 |
|
31 |
| - @if (_item.image) { |
32 |
| - <a class="download carousel-control" role="button" [href]="_item.image.src"> |
33 |
| - <i class="bi bi-download" aria-hidden="true"></i> |
34 |
| - <div class="badge rounded-pill text-bg-info text-dark">{{ _item.image.filesize | bytes: 2 }}</div> |
35 |
| - </a> |
36 |
| - } |
| 25 | + @for (area of areas(); track area) { |
| 26 | + <app-gallery-carousel-item-area [area]="area.pictureItem" [styles]="area.styles" /> |
| 27 | + } |
37 | 28 |
|
38 |
| - <a class="comments carousel-control" role="button" [routerLink]="prefix().concat([_item.identity])"> |
39 |
| - <i class="bi bi-chat-fill" aria-hidden="true"></i> |
40 |
| - @if (_item.commentsCountTotal) { |
41 |
| - <div class="badge rounded-pill text-bg-info text-dark"> |
42 |
| - {{ _item.commentsCountTotal - _item.commentsCountNew }} |
43 |
| - @if (_item.commentsCountNew) { |
44 |
| - <span>+{{ _item.commentsCountNew }}</span> |
45 |
| - } |
46 |
| - </div> |
47 |
| - } |
48 |
| - </a> |
| 29 | + <div class="carousel-caption"> |
| 30 | + <h3 [innerHTML]="nameHtml()"></h3> |
| 31 | + </div> |
49 | 32 |
|
50 |
| - <a class="details carousel-control" role="button" [routerLink]="prefix().concat([_item.identity])"> |
51 |
| - <i class="bi bi-card-image" aria-hidden="true"></i> |
| 33 | + @if (item.image) { |
| 34 | + <a class="download carousel-control" role="button" [href]="item.image.src"> |
| 35 | + <i class="bi bi-download" aria-hidden="true"></i> |
| 36 | + <div class="badge rounded-pill text-bg-info text-dark">{{ item.image.filesize | bytes: 2 }}</div> |
52 | 37 | </a>
|
53 | 38 | }
|
54 |
| - @if (cropLoading() || fullLoading()) { |
| 39 | + |
| 40 | + <a class="comments carousel-control" role="button" [routerLink]="prefix().concat([item.identity])"> |
| 41 | + <i class="bi bi-chat-fill" aria-hidden="true"></i> |
| 42 | + @if (item.commentsCountTotal) { |
| 43 | + <div class="badge rounded-pill text-bg-info text-dark"> |
| 44 | + {{ item.commentsCountTotal - item.commentsCountNew }} |
| 45 | + @if (item.commentsCountNew) { |
| 46 | + <span>+{{ item.commentsCountNew }}</span> |
| 47 | + } |
| 48 | + </div> |
| 49 | + } |
| 50 | + </a> |
| 51 | + |
| 52 | + <a class="details carousel-control" role="button" [routerLink]="prefix().concat([item.identity])"> |
| 53 | + <i class="bi bi-card-image" aria-hidden="true"></i> |
| 54 | + </a> |
| 55 | + |
| 56 | + @if ((item.imageGallery && cropLoading()) || (item.imageGalleryFull && fullLoading())) { |
55 | 57 | <div class="loading-icon">
|
56 | 58 | <div class="spinner-border" role="status"><span class="visually-hidden" i18n>Loading…</span></div>
|
57 | 59 | </div>
|
58 | 60 | }
|
59 |
| - @if (_item && _item.imageGallery && !cropLoading() && !fullLoading()) { |
| 61 | + @if (item.imageGallery && !cropLoading() && !fullLoading()) { |
60 | 62 | <span class="carousel-control-full" (click)="toggleCrop()" (keyup.enter)="toggleCrop()" tabindex="0"
|
61 | 63 | ><i class="bi bi-arrows-fullscreen" aria-hidden="true"></i
|
62 | 64 | ></span>
|
|
0 commit comments