Onderwerpen en ongelezen/nieuwe berichten verbergen in de categorie sectie

AI-generated summary

In a discussion about customizing the Discourse category page layout for a card-style design, rudypenajr seeks a configuration option to completely remove the Topics column and unread/new message indicators from the “desktop category page style,” which is built on table elements. While ondrej suggests using .category-list .topics { display: none; } to hide the Topics column, rudypenajr explains that this leaves residual whitespace due to table structure. As a workaround, they implemented CSS fixes including setting fixed heights, overflow: hidden, and collapsing the topic cell height to zero — acknowledging it’s not ideal but functional for now. The user expresses hope for a native configuration option to eliminate these elements entirely without CSS hacks.

Hello!

I’m working on a custom theme. Our “desktop category page style” is Categories and Latest Topics. I’m attempting to style the Categories section to look more like cards (so sadly I’m fighting tables since it is built in tables). One thing I noticed is that I don’t want the Topics column on the Categories section or the unread/new messages. Is there some configuration that will remove both topics and unread/new message portion it for the “desktop category page style”? Currently, I am trying some display: none logic on the section of the table cell but it continues to give issues because of unread/new messages.

Thank you in advance!

.category-list .topics {
    display: none;
}

Does this help? This will get rid of what you have outlined in the red box.

1 like

Thanks for responding @ondrej! That somewhat helps a bit.

Our layout looks similar to https://meta.discourse.org/categories but Im moving to use a more card design for categories. Using a display:none kind of works but, because the Categories is this huge table element. it still occupies space when there are Topics and/or unread/new messages. So you’ll this small white space gap of space occupied even with display: none.

I was able to find a solution but was hoping there was just a configuration option that would completely remove it.

My solution:

  • Set height on <tr> holding category/topic information such as height: 160px. Along with that property, set an overflow: hidden.
  • Set height on <td> holding category name to height of <tr>.
  • Set height of <td> holding topic to 0.

Definitely not best solution but worked for now.