Skip to content

Commit

Permalink
feat: add empty circle if no imageUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
Kout95 committed Jun 18, 2024
1 parent 514baee commit 227e200
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/search-term-line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class SearchaliciousTermLine extends LitElement {
width: calc(100% - var(--img-size) - var(--margin-left));
}
.term-line-img-wrapper img {
.term-line-img-wrapper > * {
width: 100%;
height: 100%;
object-fit: cover;
Expand Down Expand Up @@ -56,7 +56,9 @@ export class SearchaliciousTermLine extends LitElement {
return html`
<div class="term-line">
<div class="term-line-img-wrapper">
<img src=${this.term?.imageUrl ?? ''} />
${this.term?.imageUrl
? html`<img src=${this.term?.imageUrl} />`
: html`<div></div>`}
</div>
<div class="term-line-text-wrapper">
<div class="term-line-text">${this.term?.text}</div>
Expand Down

0 comments on commit 227e200

Please sign in to comment.