Discourseで使用されているアイコンのリストはどこで見られますか?

In the sample “new like icon” repo, we see:

<script type="text/discourse-plugin" version="0.8">
      api.replaceIcon('d-liked', 'thumbs-up');
      api.replaceIcon('d-unliked', 'thumbs-o-up');
      api.replaceIcon('notification.liked', 'thumbs-o-up');
      api.replaceIcon('notification.liked_2', 'thumbs-o-up');
      api.replaceIcon('notification.liked_many', 'thumbs-o-up');
      api.replaceIcon('heart', 'thumbs-up');
</script>

I don’t know that I’d have guessed to replace notification.liked_many_2

Where could we see a list of all the icons in use by discourse?

「いいね!」 2

これがお探しのものだと思います:

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-common/addon/lib/icon-library.js

「いいね!」 11

I was trying to replace an icon over in this topic: How to replace an icon using CSS

The icon in question was .d-icon-lock, but I don’t see it in the list above. Where would I find the icon, so I know what to target in the api.replaceIcon above?

In this case you would just use the FA icon name:

<script type="text/discourse-plugin" version="0.8">
  api.replaceIcon('lock', 'times-circle');
</script>
「いいね!」 5

I see. I guess I was asking for a list of all icons… perhaps searching the source for {d-icon ' is what I’m looking for.

同じ質問があります。上記のリンクが機能しません。このトピックを多く検索してざっと読みましたが、Introducing Font Awesome 5 and SVG icons コアセットに含まれているアイコンかどうかを知るリストは見当たりません。フォーラムでも関連する検索結果は見つかりませんでした。

「いいね!」 1

Discourse は無料の Font Awesome アイコンを使用しています。使用可能なすべてのアイコンはこちらで確認できます。サイト設定の「svg アイコンサブセット」にいくつかのアイコンを追加する必要がある場合があります。サイト上のアイコンを確認するには、URL に /styleguide/atoms/icons を追加してください。表示されない場合は、サイト設定で「styleguide 有効」がチェックされているか確認してください。

Pro アイコンにアクセスしたい場合は、Discourse FontAwesome Pro プラグインをインストールする必要があります。

「いいね!」 5

https://meta.discourse.org/styleguide/atoms/icons

あなたのフォーラムにもこれが含まれています。プラグインを有効にする必要があるかもしれません。

「いいね!」 5

@ondrej さん、@pfaffman さん、ありがとうございます!Font Awesome の使い方は以前から知っていましたが、いくつか新しいアイコンを追加する必要があるかもしれないと考えていたので、何が含まれているか知りたかったのです。Meta プラグインと Styleguide プラグインへのリンクはどちらも非常に役立ちました。ただし、いくつかの場合(奇妙なことにすべてではないのですが)に新しいアイコンを追加する方法がまだ少しわかりにくいのですが、それについては別途トピック/返信を作成します。:wink:

「いいね!」 2