|
1 |
| -<ng-container *ngIf="item$ | async as item"> |
2 |
| - <h2> |
3 |
| - <span [innerHtml]="item.name_html"></span> |
| 1 | +<h2 *ngIf="item$ | async as item; else h2Placeholder"> |
| 2 | + <span [innerHtml]="item.name_html"></span> |
| 3 | + <small> |
| 4 | + <span i18n *ngIf="item.item_type_id === 1">vehicle of the day</span> |
| 5 | + <span i18n *ngIf="item.item_type_id !== 1">theme of the day</span> |
| 6 | + <span *ngIf="user$ | async as user"> |
| 7 | + <span class="text-nowrap">by <app-user2 [user]="user"></app-user2></span> |
| 8 | + </span> |
| 9 | + </small> |
| 10 | +</h2> |
| 11 | + |
| 12 | +<ng-template #h2Placeholder> |
| 13 | + <h2 class="placeholder-glow"> |
| 14 | + <span class="placeholder w-25"></span> |
4 | 15 | <small>
|
5 |
| - <span i18n *ngIf="item.item_type_id === 1">vehicle of the day</span> |
6 |
| - <span i18n *ngIf="item.item_type_id !== 1">theme of the day</span> |
7 |
| - <span *ngIf="user"> |
8 |
| - <span style="white-space: nowrap">by <app-user2 [user]="user"></app-user2></span> |
9 |
| - </span> |
| 16 | + <span class="placeholder" style="width: 10%"></span> |
10 | 17 | </small>
|
11 | 18 | </h2>
|
| 19 | +</ng-template> |
12 | 20 |
|
13 |
| - <div class="row" *ngIf="itemOfDayPictures$ | async as pictures"> |
14 |
| - <div class="col-sm-6"> |
15 |
| - <ng-container *ngFor="let picture of pictures.first"> |
16 |
| - <a [routerLink]="picture.route" class="d-block rounded mb-4" *ngIf="picture"> |
| 21 | +<div class="row" *ngIf="itemOfDayPictures$ | async as pictures; else placeholder"> |
| 22 | + <div class="col-sm-6"> |
| 23 | + <ng-container *ngFor="let picture of pictures.first"> |
| 24 | + <a [routerLink]="picture.route" class="d-block rounded mb-4" *ngIf="picture"> |
| 25 | + <img |
| 26 | + [src]="picture.thumb.src" |
| 27 | + [alt]="picture.name" |
| 28 | + [title]="picture.name" |
| 29 | + class="rounded w-100 border border-light" |
| 30 | + /> |
| 31 | + </a> |
| 32 | + </ng-container> |
| 33 | + </div> |
| 34 | + <div class="col-sm-6"> |
| 35 | + <div class="row"> |
| 36 | + <ng-container *ngFor="let picture of pictures.others"> |
| 37 | + <a [routerLink]="picture.route" class="d-block rounded mb-3 col-6" *ngIf="picture"> |
17 | 38 | <img
|
18 | 39 | [src]="picture.thumb.src"
|
19 | 40 | [alt]="picture.name"
|
|
23 | 44 | </a>
|
24 | 45 | </ng-container>
|
25 | 46 | </div>
|
| 47 | + </div> |
| 48 | +</div> |
| 49 | + |
| 50 | +<ng-template #placeholder> |
| 51 | + <div class="row placeholder-glow"> |
| 52 | + <div class="col-sm-6"> |
| 53 | + <div class="rounded ratio ratio-4x3 border border-light placeholder d-block rounded mb-4"></div> |
| 54 | + </div> |
26 | 55 | <div class="col-sm-6">
|
27 | 56 | <div class="row">
|
28 |
| - <ng-container *ngFor="let picture of pictures.others"> |
29 |
| - <a [routerLink]="picture.route" class="d-block rounded mb-3 col-6" *ngIf="picture"> |
30 |
| - <img |
31 |
| - [src]="picture.thumb.src" |
32 |
| - [alt]="picture.name" |
33 |
| - [title]="picture.name" |
34 |
| - class="rounded w-100 border border-light" |
35 |
| - /> |
36 |
| - </a> |
37 |
| - </ng-container> |
| 57 | + <div class="d-block rounded mb-3 col-6"> |
| 58 | + <div class="rounded ratio ratio-4x3 border border-light placeholder"></div> |
| 59 | + </div> |
| 60 | + <div class="d-block rounded mb-3 col-6"> |
| 61 | + <div class="rounded ratio ratio-4x3 border border-light placeholder"></div> |
| 62 | + </div> |
| 63 | + <div class="d-block rounded mb-3 col-6"> |
| 64 | + <div class="rounded ratio ratio-4x3 border border-light placeholder"></div> |
| 65 | + </div> |
| 66 | + <div class="d-block rounded mb-3 col-6"> |
| 67 | + <div class="rounded ratio ratio-4x3 border border-light placeholder"></div> |
| 68 | + </div> |
38 | 69 | </div>
|
39 | 70 | </div>
|
40 | 71 | </div>
|
41 |
| - <p> |
42 |
| - <ng-container *ngIf="item.item_type_id === 3"> |
43 |
| - <span> |
44 |
| - <span class="bi bi-text-left" aria-hidden="true"></span> |
45 |
| - <a [routerLink]="['/category', item.catname]" i18n>details</a> |
46 |
| - </span> |
| 72 | +</ng-template> |
47 | 73 |
|
48 |
| - <span *ngIf="item.accepted_pictures_count > 6"> |
49 |
| - <span class="bi bi-grid-3x2-gap-fill" aria-hidden="true"></span> |
50 |
| - <a [routerLink]="['/category', item.catname, '/pictures']" |
51 |
| - ><ng-container i18n>all pictures</ng-container> ({{ item.accepted_pictures_count }})</a |
52 |
| - > |
53 |
| - </span> |
54 |
| - </ng-container> |
55 |
| - |
56 |
| - <span *ngIf="item.item_type_id === 5 && item.accepted_pictures_count > 6 && item.public_route"> |
57 |
| - <span class="bi bi-grid-3x2-gap-fill" aria-hidden="true"></span> |
58 |
| - <a [routerLink]="item.public_route" |
59 |
| - ><ng-container i18n>details</ng-container> ({{ item.accepted_pictures_count }})</a |
60 |
| - > |
| 74 | +<p *ngIf="item$ | async as item"> |
| 75 | + <ng-container *ngIf="item.item_type_id === 3"> |
| 76 | + <span> |
| 77 | + <span class="bi bi-text-left" aria-hidden="true"></span> |
| 78 | + <a [routerLink]="['/category', item.catname]" i18n>details</a> |
61 | 79 | </span>
|
62 | 80 |
|
63 |
| - <span |
64 |
| - *ngIf=" |
65 |
| - item.item_type_id !== 3 && item.item_type_id !== 5 && item.accepted_pictures_count > 6 && item.public_route |
66 |
| - " |
67 |
| - > |
| 81 | + <span *ngIf="item.accepted_pictures_count > 6"> |
68 | 82 | <span class="bi bi-grid-3x2-gap-fill" aria-hidden="true"></span>
|
69 |
| - <a [routerLink]="item.public_route" |
| 83 | + <a [routerLink]="['/category', item.catname, '/pictures']" |
70 | 84 | ><ng-container i18n>all pictures</ng-container> ({{ item.accepted_pictures_count }})</a
|
71 | 85 | >
|
72 | 86 | </span>
|
| 87 | + </ng-container> |
73 | 88 |
|
74 |
| - <ng-container *ngIf="item.twins_groups"> |
75 |
| - <span *ngFor="let group of item.twins_groups"> |
76 |
| - <span class="bi bi-circle-half" aria-hidden="true"></span> |
77 |
| - <a [routerLink]="['/twins/group', group.id]" i18n>twins</a> |
78 |
| - </span> |
79 |
| - </ng-container> |
| 89 | + <span *ngIf="item.item_type_id === 5 && item.accepted_pictures_count > 6 && item.public_route"> |
| 90 | + <span class="bi bi-grid-3x2-gap-fill" aria-hidden="true"></span> |
| 91 | + <a [routerLink]="item.public_route" |
| 92 | + ><ng-container i18n>details</ng-container> ({{ item.accepted_pictures_count }})</a |
| 93 | + > |
| 94 | + </span> |
80 | 95 |
|
81 |
| - <ng-container *ngIf="item.categories"> |
82 |
| - <span *ngFor="let category of item.categories"> |
83 |
| - <span class="bi bi-tag-fill" aria-hidden="true"></span> |
84 |
| - <a [routerLink]="['/category', category.catname]" [innerHTML]="category.name_html"></a> |
85 |
| - </span> |
86 |
| - </ng-container> |
| 96 | + <span |
| 97 | + *ngIf="item.item_type_id !== 3 && item.item_type_id !== 5 && item.accepted_pictures_count > 6 && item.public_route" |
| 98 | + > |
| 99 | + <span class="bi bi-grid-3x2-gap-fill" aria-hidden="true"></span> |
| 100 | + <a [routerLink]="item.public_route" |
| 101 | + ><ng-container i18n>all pictures</ng-container> ({{ item.accepted_pictures_count }})</a |
| 102 | + > |
| 103 | + </span> |
87 | 104 |
|
88 |
| - <span> |
89 |
| - <span class="bi bi-trophy" aria-hidden="true"></span> |
90 |
| - <a routerLink="/donate/vod" i18n>Want to choose next?</a> |
| 105 | + <ng-container *ngIf="item.twins_groups"> |
| 106 | + <span *ngFor="let group of item.twins_groups"> |
| 107 | + <span class="bi bi-circle-half" aria-hidden="true"></span> |
| 108 | + <a [routerLink]="['/twins/group', group.id]" i18n>twins</a> |
91 | 109 | </span>
|
92 |
| - </p> |
93 |
| -</ng-container> |
| 110 | + </ng-container> |
| 111 | + |
| 112 | + <ng-container *ngIf="item.categories"> |
| 113 | + <span *ngFor="let category of item.categories"> |
| 114 | + <span class="bi bi-tag-fill" aria-hidden="true"></span> |
| 115 | + <a [routerLink]="['/category', category.catname]" [innerHTML]="category.name_html"></a> |
| 116 | + </span> |
| 117 | + </ng-container> |
| 118 | + |
| 119 | + <span> |
| 120 | + <span class="bi bi-trophy" aria-hidden="true"></span> |
| 121 | + <a routerLink="/donate/vod" i18n>Want to choose next?</a> |
| 122 | + </span> |
| 123 | +</p> |
0 commit comments