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
tshenry
(Taylor)
2019 年 3 月 22 日午前 12:28
2
「いいね!」 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?
tshenry
(Taylor)
2019 年 3 月 24 日午前 1:44
4
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.
oshyan
(Oshyan Greene)
2021 年 10 月 31 日午前 2:35
6
同じ質問があります。上記のリンクが機能しません。このトピックを多く検索してざっと読みましたが、Introducing Font Awesome 5 and SVG icons コアセットに含まれているアイコンかどうかを知るリストは見当たりません。フォーラムでも関連する検索結果は見つかりませんでした。
「いいね!」 1
ondrej
2021 年 10 月 31 日午前 9:48
7
Discourse は無料の Font Awesome アイコンを使用しています。使用可能なすべてのアイコンはこちら で確認できます。サイト設定の「svg アイコンサブセット」にいくつかのアイコンを追加する必要がある場合があります。サイト上のアイコンを確認するには、URL に /styleguide/atoms/icons を追加してください。表示されない場合は、サイト設定で「styleguide 有効」がチェックされているか確認してください。
Pro アイコンにアクセスしたい場合は、Discourse FontAwesome Pro プラグインをインストールする必要があります。
「いいね!」 5
pfaffman
(Jay Pfaffman)
2021 年 10 月 31 日午後 2:25
8
「いいね!」 5
oshyan
(Oshyan Greene)
2021 年 10 月 31 日午後 5:17
9
@ondrej さん、@pfaffman さん、ありがとうございます!Font Awesome の使い方は以前から知っていましたが、いくつか 新しいアイコンを追加する必要があるかもしれないと考えていたので、何が含まれているか知りたかったのです。Meta プラグインと Styleguide プラグインへのリンクはどちらも非常に役立ちました。ただし、いくつかの 場合(奇妙なことにすべてではないのですが)に新しいアイコンを追加する方法がまだ少しわかりにくいのですが、それについては別途トピック/返信を作成します。
「いいね!」 2