Harmonizing Discourse icons and emojis

Continuing the discussion from Actions and markup: Icons vs Tags:

From time to time I’m writing documentation for new users and end up typing : to trigger the emoji completion and find the :bookmark: icon, or the :pin: icon, or the :gear: icon to show what to look for to accomplish a certain action. As exemplified with these three: :bookmark:, :pin:, and :gear:, the iconography seems not to be designed for such a use-case. I end up using longer sentence to avoid adding to the confusion of the (usually impressed) users who freshly dived into Discourse.

It seems there’s already a (fastidious) way to Change icons globally using the APIs, but I’m wondering whether there are other options to use Discourse UI icons in posts somehow.

5 个赞

I agree. I often end up taking a screen shot of the icons and paste them in.

1 个赞

I vaguely recall many years ago I had a plugin that did this, it is broken by now, I recommend holding off on this idea till we are done with our fontawesome upgrade, cause once that is done the palate of optional icons becomes enormous making it far more appealing to re-build that old trivial plugin :blush:

13 个赞

Today I discovered Fork Awesome, a fork of the iconic font and CSS toolkit, a fork of Font-Awesome that

  • does not require JavaScript
  • accepts new custom icons
  • is GPL friendly.

Switching from Font Awesome 4.7?

If you were using Font Awesome 4.7, you should be able to just switch to Fork Awesome 1.1 and get all the benefits from it. If you were using npm or composer packages, replace the ones you were using by this Fork Awesome ones. Or if you downloaded a static copy of Font Awesome, download the latest version of Fork Awesome and replace CSS and font files in your project and you should be good to go.

We paid special attention not to change unicode codepoints for the existing icons, nor changed the CSS class names or icon names from Font Awesome 4.7. Though we added a few more icons and made the process of contributing to this project much easier. Though, if you see a mistake, please don’t hesitate to file a bug.

P.S.: and they could use a Discourse :wink:

4 个赞

Good point @erlend_sh maybe we can contact them and suggest they use Discourse :wink:

@hellekin in this upcoming release we are planning to move to all SVG icons for flexibility and away from a specific icon font, it’s a project @awesomerobot is heading up.

6 个赞

They’re pretty low volume so they seem to have what they need with a SO + GitHub setup.

1 个赞

@awesomerobot could you please indicate a link to how-to documentation for this feature?

1 个赞

I think you are probably looking for this component: GitHub - discourse/discourse-icon. There isn’t a corresponding topic for it here on Meta at the moment, but it will work like this in posts:

[wrap=icon id="bookmark"][/wrap]

Other icon resources just in case you are interested:

7 个赞

这太棒了。我认为这是相关主题:Discourse Icon

2 个赞

不幸的是,它在 \\faq 页面上不起作用(只显示空白而不是图标)。

另外,当我向 FAQ 帖子添加一个 [wrap] 图标并查看页面时,图标在普通帖子上的显示就停止了。然后当我从 FAQ 帖子中删除 [wrap] 图标时,图标又神奇地重新出现在普通帖子上了。

就是它!感谢您找到它。

虽然 FAQ 页面在技术上是基于帖子的内容构建的,但它是一种特殊的设置,因此在该上下文中不起作用并不奇怪。

嗯。我无法重现这种行为。

这可能不是由 FAQ 页面引起的(可能只是巧合),但表情符号在我眼前消失又重新出现确实发生了两次。

1 个赞