Componente del tema degli intestazioni delle categorie del forum

Here’s the PR to support dark mode category logos:

This bugged me a little too. A bit of custom CSS does the trick:

// let Category Headers Read More link use same color as summary text

.category-about-url a {
  color: inherit;

}
2 Mi Piace

My remaining wish for the “read more” link: show it only if more content actually exists. I have some long About category pages and some short ones, & I’d rather not offer a link to no added content.

(I have no idea if this is feasible. Might be a lot to ask of a TC.)

1 Mi Piace

When the full category description is showing, I also encounter this on Theme Creator and on my dev instance. I’m looking into it. I suspect it’s because the route changes but the tracked variable does not.

UPDATE: I have added an expand/collapse functionality for category descriptions here. @nathank Also fixed the bug in:

With a little nudge from Ask Discourse for using willDestroy with the router service.

2 Mi Piace

Wow, Nate! :open_mouth: 55 commits and a PR in one evening… amazing.
I’ll watch for a merge and look forward to trying it out!

1 Mi Piace

A late morning for me, actually :wink:. I’ll look into whether your suggestion about checking if the description has any more text is possible. I also felt myself needing that during my testing.

2 Mi Piace

This is a fantastic addition! :heart:

Just one small point of feedback: It might make sense to add a chevron icon to the top right corner or right edge of the category header to indicate expand/collapse functionality to the users. But it’s a great starter, and for now using an emoji in link text as an indicator does the job:


(Sidenote, maybe also add translations for the link text?

2 Mi Piace

PR has been merged :git_merged: !

Got it :+1: . I’ll take a look.

3 Mi Piace

Nate, the read more/less functionality is excellent, thank you!

If there’s a way to condition that link on more text existing, that’d be great – but I could also just write longer descriptions :laughing:

I do see a couple issues you might not have had a chance to spot:

  • category & tag links aren’t rendering their SVG icons
  • the category image isn’t coming through so I’m getting the default site icon
(screenshot)

A little thing I’ve managed to work around: links in the About text weren’t inheriting the text color, like the read more link mentioned earlier. This CSS styles the text links without affecting category and tag links:

// text link styling, to exclude category and tag links
.category-title-header .category-title-description 
a:not([data-type="tag"], [data-type="category"]) {
  color: inherit;
  text-decoration: underline;
}
(screenshots)

image
image

I’m really impressed with the updates, & hope my SVG & icon issues are just a simple fix.

Interesting. Do you know if this was there previously?

I’ll take a look. I also encountered this. Try disabling the show site logo setting in the meantime, that seems to fix it.

Thanks. Was this the case previously and some change occurred?

Try disabling the show site logo setting in the meantime, that seems to fix it.

That works - thanks! I should have experimented with more settings.

As to the SVG link icons and text link colors, I can’t say what they might’ve done before – I wasn’t including any links in the short summary part of the About text.

(I shared that link-color CSS in case it was helpful to you or anyone, but I know that kind of styling tweaking isn’t necessarily the component’s responsibility.)