Install this theme component
This theme component may cause conflicts with other customisations to the topic list
Features
This component takes inspiration from Topic Thumbnails , simplifies the use, adds excerpts & full-card clicking, and sprinkles some extra CSS magic.
Make full card clickable (except for the original poster avatar)
Show the excerpt
Show a topic thumbnail, if available
Show published date
Trim away some metadata and make likes more prominent
Desktop
Mobile
Settings
Translation
Default
published
Published
Hosted by us? Theme components are available to use on our Standard, Business, and Enterprise plans.
Last edited by @chapoi 2024-06-18T00:42:14Z
Check document Perform check on document:
37 „Gefällt mir“
Moin
20. Februar 2024 um 13:59
2
The vertical blue line covers parts of the text
(Seems not to depend on browser/device, I tried Edge/Windows, Chrome/Android and firefox/Android)
7 „Gefällt mir“
frold
20. Februar 2024 um 14:59
3
worked out of the box in chrome on windows and chrome at iphone 8
3 „Gefällt mir“
chapoi
(Charlie)
20. Februar 2024 um 15:03
4
Right, forgot this. Will fix – thanks
4 „Gefällt mir“
jayme
(Jayme )
21. Februar 2024 um 00:36
5
how do I get rid of the “replies” and the “activity” tabs under the “+New Topic” button?
its making my topic exert really short and it looks bad haha
1 „Gefällt mir“
Lilly
(Lillian Louis)
21. Februar 2024 um 00:59
7
Hi @jayme , it look like those tabs are not part of this component and are likely put there by another theme component or plugin. When I load a test forum with this component, those tabs don’t exist, nor do they show in the screenshots in the OP. You may have to disable other components to find which one, then if there is no setting for those tabs you may have to disable it.
5 „Gefällt mir“
chapoi
(Charlie)
21. Februar 2024 um 10:58
8
Border/box-shadow doesn’t work well with cards, so had to improvise a bit to get a replacement indication
discourse:main
← discourse:ux-j-k-select-style
opened 08:49AM - 21 Feb 24 UTC
The default border on a topic item doesn't work well with rounded corners and a … thumbnail in the way, so opting to replace that with highlighting the title instead on keyboard navigation.
<img width="854" alt="image" src="https://github.com/discourse/discourse-topic-cards/assets/101828855/47f9f0b9-bda5-4cce-9c55-5f172db5a602">
4 „Gefällt mir“
Moin
22. Februar 2024 um 21:48
9
2 „Gefällt mir“
chapoi
(Charlie)
23. Februar 2024 um 06:30
10
Are you using the j/k commands to navigate?
Moin
23. Februar 2024 um 08:49
11
No, I just used Tab. Well I actually used my tablet. After I used the back button, the post is usually highlighted. That didn’t happen here. I only tried this on the computer for the recording.
1 „Gefällt mir“
JammyDodger
Hat dieses Thema aufgeteilt,
1. März 2024 um 12:06
12
4 posts were split to a new topic: Topic cards for specific categories
Gonerdot
(Gonerdot)
2. März 2024 um 18:35
14
I tried to install this component on many themes, but it looks a little crooked everywhere. What am I doing wrong?
3 „Gefällt mir“
chapoi
(Charlie)
2. März 2024 um 18:40
15
Hmmm… difficult to say. It looks like somehow the height of the cards is constrained, and the content bigger than usual.
Can you first verify it’s not due to a conflict with other components or theme? I see you also have the right sidebar enabled and that could affect some size calculations maybe.
So please check that and let me know?
4 „Gefällt mir“
Gonerdot
(Gonerdot)
2. März 2024 um 18:44
16
I disabled all other components, but the problem did not solve.
2 „Gefällt mir“
chapoi
(Charlie)
2. März 2024 um 18:46
17
Odd! Can I have a look at the forum youve installed it on?
2 „Gefällt mir“
Gonerdot
(Gonerdot)
2. März 2024 um 18:48
18
But you need to change the theme to dracula in your profile settings.
3 „Gefällt mir“
Gonerdot
(Gonerdot)
2. März 2024 um 18:51
20
It seems to me that the problem can be solved by limiting the number of characters in the preview, but I don’t know how to do this
2 „Gefällt mir“
chapoi
(Charlie)
4. März 2024 um 16:21
21
Okay so, the topic-cards need a max-height, otherwise you get issues like:
I can’t say why yours is not fitting well, because in the example on theme creator I can also uses multi-line titles and still fits:
It might have something to do with the font-size, font-family, or line-height. Unfortunately that will require some individual tweaking, and not something I can apply a fix-for-all for.
A possible solution is, as you said, limiting the title to only take 1 line, which you could do by adding this css:
.topic-card {
.link-top-line {
max-width: 100%;
overflow: hidden;
.title {
display: block;
white-space: no-wrap;
}
}
}
4 „Gefällt mir“