aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/shared/shared-actor-image/actor-avatar.component.html
blob: fb9efc20a7c7a29c9024f9d3e61918be053f7780 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                  
                                                                                                                    
 

                                                         
        

                                                              

              
                                                                                                 


                                                     
                                                                             


                                                     
                                                         

                                                     
<ng-template #img>
  <img *ngIf="displayImage()" [class]="classes" [src]="previewImage || avatarUrl || defaultAvatarUrl" [alt]="alt" />

  <div *ngIf="displayActorInitial()" [ngClass]="classes">
    <span>{{ getActorInitial() }}</span>
  </div>

  <div *ngIf="displayPlaceholder()" [ngClass]="classes"></div>
</ng-template>

<a *ngIf="actor && href" [href]="href" target="_blank" rel="noopener noreferrer" [title]="title">
  <ng-template *ngTemplateOutlet="img"></ng-template>
</a>

<a *ngIf="actor && internalHref" [routerLink]="internalHref" [title]="title">
  <ng-template *ngTemplateOutlet="img"></ng-template>
</a>

<ng-container *ngIf="!actor || (!href && !internalHref)">
  <ng-template *ngTemplateOutlet="img"></ng-template>
</ng-container>