Commits
Alfeu Uzai Tavares authored 6858b4b8e8b
1 + | <div *ngIf="uri && name" class="item-page-field"> |
2 + | <ds-metadata-field-wrapper [label]="'item.page.cc.license.title' | translate"> |
3 + | <div [ngClass]="{'row': variant === 'full', 'col': variant === 'small'}"> |
4 + | |
5 + | <!-- 'img' tag is not rendered if any errors occurs when loading it --> |
6 + | <div *ngIf="showImage" [ngClass]="{'col-auto': variant === 'full', 'row': variant === 'small'}" |
7 + | style="align-content: center;" |
8 + | > |
9 + | <a [href]="uri" target="_blank" class="link-anchor dont-break-out ds-simple-metadata-link"> |
10 + | <img (error)="showImage = false" [src]="imgSrc" [alt]="name" class="cc-image" |
11 + | [ngStyle]="{ |
12 + | 'width': 'var(--ds-thumbnail-max-width)', |
13 + | 'margin-bottom': variant === 'small'? '1ch' : '0', |
14 + | }" |
15 + | /> |
16 + | </a> |
17 + | </div> |
18 + | |
19 + | <!-- CC name is always displayed if the image fails to load --> |
20 + | <div [ngClass]="{ 'row': variant === 'small', 'col': variant === 'full' }"> |
21 + | <span> |
22 + | {{ variant === 'full' && showDisclaimer ? ('item.page.cc.license.disclaimer' | translate) : '' }} |
23 + | <a *ngIf="showName || !showImage" [href]="uri" target="_blank" id="cc-name">{{ name }}</a> |
24 + | </span> |
25 + | </div> |
26 + | </div> |
27 + | </ds-metadata-field-wrapper> |
28 + | </div> |