在类别名称中包含表情符号

Is it possible to display emojis in Category names like this?:

:loudspeaker: Announcements

:desktop_computer: Tech Support

2 个赞

You could probably do some fancy CSS customization to achieve something similar.

5 个赞

Probably not inside the drop-downs as the list items are not styled with classes that can distinguish different categories. Nor in category lists.

One way to do this is to use the category’s url as a guideline.

Here’s a very rough example:

[href="/c/hosting"] .badge-category-bg { // remove default category color marker
    display: none !important;
}

[href="/c/hosting"] .badge-category:before { // add new font awesome icon in its place
    font-family: fontawesome;
    content: "\f1b9";
    margin-right: 5px;
}

This would result in:

I have not tested this everywhere and it needs a lot more refinement but that’s the basic idea.

The composer selecter has attributes added to category list items like data-name="hosting"

9 个赞

This is cool. Probably the closest I can get for now. Thank you!

1 个赞

我一直在找这个——因为 MD-短代码在类别名称字段中不起作用——所以我尝试将一个红心 :heart: 复制粘贴到类别名称中,并发现 discourse 会欣然接受它,就像它可能会接受 :ringer_planet: 土星一样。

此主题已在 2353 天后自动关闭。不再允许回复。