display tags in thumbnail

This commit is contained in:
Jonas Winkler 2020-11-22 21:06:48 +01:00
parent a316521ea6
commit d9ae4322ea
2 changed files with 11 additions and 5 deletions

View File

@ -1,9 +1,15 @@
<div class="col p-2 h-100" style="width: 16rem;"> <div class="col p-2 h-100" style="width: 16rem;">
<div class="card h-100"> <div class="card h-100">
<img [src]="getThumbUrl()" class="card-img-top doc-img border-bottom" style="height: 200px;"/> <div class=" border-bottom doc-img pr-1" [ngStyle]="{'background-image': 'url(' + getThumbUrl() + ')'}">
<div class="row" *ngFor="let t of document.tags">
<app-tag [tag]="t" class="col text-right"></app-tag>
</div>
</div>
<div class="card-body p-2"> <div class="card-body p-2">
<p class="card-title" *ngIf="document.correspondent">{{document.correspondent.name}}</p> <p class="card-title" *ngIf="document.correspondent">{{document.correspondent.name}}</p>
<p class="card-text">{{document.title}} <app-tag [tag]="t" *ngFor="let t of document.tags" class="ml-1"></app-tag></p> <p class="card-text">{{document.title}}</p>
</div> </div>
<div class="card-footer"> <div class="card-footer">

View File

@ -1,5 +1,5 @@
.doc-img { .doc-img {
object-fit: cover; background-size: cover;
object-position: top; background-position: top;
height: 200px;
} }