diff --git a/common/common.scss b/common/common.scss index 4f3684e..d5dc89a 100644 --- a/common/common.scss +++ b/common/common.scss @@ -138,6 +138,10 @@ html:has(body.kanban-active) { } } + &__thumbnail-row { + margin-top: 5px; + } + .last-post-by, .topic-title { flex-grow: 1; @@ -162,6 +166,11 @@ html:has(body.kanban-active) { } } + .thumbnail { + overflow: hidden; + width: 100%; + } + .last-post-by { text-align: left; font-size: $font-down-2; diff --git a/javascripts/discourse/components/kanban/card.gjs b/javascripts/discourse/components/kanban/card.gjs index d19c1de..3b80c13 100644 --- a/javascripts/discourse/components/kanban/card.gjs +++ b/javascripts/discourse/components/kanban/card.gjs @@ -51,6 +51,14 @@ export default class KanbanCard extends Component { .map((t) => renderTag(t)); } + get showImage() { + return settings.show_topic_thumbnail && this.imageUrl; + } + + get imageUrl() { + return this.args.topic.image_url; + } + get showCategory() { const definitionCategory = this.args.definition.params.category; const discoveryCategory = this.kanbanManager.discoveryCategory; @@ -176,6 +184,12 @@ export default class KanbanCard extends Component { {{/if}} + {{#if this.showImage}} +
+ +
+ {{/if}} +