Kavita/src/app/shared/card-item/card-item.component.html

24 lines
No EOL
1.1 KiB
HTML

<div class="card" style="width: 18rem;">
<!-- TODO: I need an anchor around this so you can open in new page easily -->
<img (click)="handleClick()" class="card-img-top" src="{{isNullOrEmpty(imageUrl) ? placeholderImage : imageUrl}}" alt="{{title}}">
<div class="card-body text-center" *ngIf="title.length > 0 || actions.length > 0">
<span class="card-title" (click)="handleClick()">
{{title}}
</span>
<div class="pull-right">
<ng-container *ngIf="actions.length > 0">
<div ngbDropdown container="body" class="d-inline-block">
<button class="btn" id="actions-{{title}}" ngbDropdownToggle><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button>
<div ngbDropdownMenu attr.aria-labelledby="actions-{{title}}">
<button ngbDropdownItem *ngFor="let action of actions" (click)="performAction($event, action)">{{action.title}}</button>
</div>
</div>
</ng-container>
</div>
</div>
</div>