33 lines
1001 B
TypeScript
33 lines
1001 B
TypeScript
import {Component, Input} from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'preview-zenodo-community',
|
|
template: `
|
|
<div class="uk-grid uk-flex uk-flex-middle">
|
|
<a *ngIf="item.logoUrl" target="_blank" [href]="item.link" class="uk-width-auto">
|
|
<img class="uk-comment-avatar" src="{{item.logoUrl}}" width="80" height="80" alt="">
|
|
</a>
|
|
<div class="uk-width-expand">
|
|
<a class="" target="_blank" href="{{item.link}}">
|
|
<span *ngIf="item.title">{{item.title}}</span>
|
|
<span *ngIf="!item.title">[no name available]</span>
|
|
<span class="custom-external custom-icon space"></span>
|
|
</a>
|
|
<div class="uk-comment-meta uk-margin-small-top">
|
|
last update: {{item.date | date:'yyyy/MM/dd'}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div *ngIf="item.description"
|
|
class="uk-comment-body uk-text-meta uk-margin-top multi-line-ellipsis lines-3 ">
|
|
<p>{{item.description|htmlToString}}</p>
|
|
</div>
|
|
|
|
`
|
|
})
|
|
|
|
export class PreviewZenodoCommunityComponent {
|
|
@Input() item;
|
|
}
|