aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-account-avatar/account-avatar.component.html
blob: 083daccfbd1b17c5c53ac77b8b55c8bfee07c12c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<ng-template #img>
  <img *ngIf="avatarUrl || !initial" [class]="class" [src]="avatarUrl || defaultAvatarUrl" i18n-alt alt="Account avatar" />
  <div *ngIf="!avatarUrl && initial" [class]="class">
    <span>{{ initial }}</span>
  </div>
</ng-template>

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

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

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