Composant de thème pour les en-têtes de catégories Discourse

Nice! It is back to tip-top shape. Thanks for being so amazingly responsive, and throwing an improvement in there as part of the bargain! How it now looks:

1 « J'aime »

Hi Nathan, I’m curious, would it be better if the Read more link was aligned with the description, or inline to the end of it?

I think that it would be best inline at the end of the text.

This would be much more compact / efficient, and more consistent with pinned posts (I think):

1 « J'aime »

@nathank I have added this feature!

This PR adds 2 new features:

  1. More paragraphs to the category description. This adds a new setting, show_full_category_description (default false) to show the full post contents of the About category topic.
  2. Inline ‘Read more’ link. This adds a new setting inline_read_more (default false) to append the ‘Read more’ link at the end of the category description, instead of a few lines down.

Things to note:

  • The inline ‘Read more’ link is not added to the end of the category description when show_full_category_description is true
  • There is no override regarding the category descriptions: you can set both show_category_description and show_full_category_description to true, and both descriptions will be shown. This may be addressed in a later PR.

Please post back here if you face any issues.

4 « J'aime »

Anyone else having issues on 3.5.0 where category logos and emojis are not being displayed? Even when the category lock icon is enabled, it’s not being displayed either.

Hi there, could you send screenshots of this, as well as any browser errors if any? This may have to do with version compatibility :thinking:.

You can see it live in action here: Hanfgarten-Contest - Forum | Cannabisanbauen.net
(I tested with tc preview only, exact same behavior…)

1 « J'aime »

Do you mean category logo, as the one you upload in the images section of the category settings, or do you mean the style you configure in the general settings where you can choose square, icon, or emoji?

Okay, do you have:

  • show_site_logo ticked?
  • logo_small site setting?

The lock icon situation is interesting. I’m taking a look.

EDIT: @jrgong I’ve just merged a PR. Thing is, you’re on stable and I don’t think you’ll get the update :thinking:… is the recent widget deprecations also on stable?

I think updating should work. There is no entry in the compatibility file that pins the current stable to an older version.

I sometimes add one when I change something and I don’t want to check if the changes also work on older versions like stable.

1 « J'aime »

Below are my settings:

I updated the TC but the issue persists

Do any of your categories have no category logo? If all do, then does ticking show_site_logo help?

that is the case

Unfortunately not

1 « J'aime »

If you try using a PNG image instead of an SVG, does it work?

In light mode yes. but in dark mode the category header still displays the light logo. see here in action.

my category image settings:

I’m not sure that compatibility with Dark Mode Category Logos is built in yet - this would be a feature request.

May I suggest considering a financial contribution to @NateDhaliwal (or at least offering it) to take that on?

1 « J'aime »

Yes, as Nathan said, the component currently does not use the dark mode image. However, I do see an interesting component:

I’ll have to test a few things to see if it can work.

2 « J'aime »