Alterar o ícone de Curtir para 👍

:discourse2: Resumo Alterar o Ícone de Curtir para :+1: permite que você troque o ícone :heart: pelo ícone :+1: — ou por qualquer outro glyph do Font Awesome 5.5 que preferir.
:eyeglasses: Pré-visualização Pré-visualizar no Discourse Theme Creator
:hammer_and_wrench: Link do Repositório https://github.com/discourse/new-like-icon
:open_book: Iniciante em Temas do Discourse? Guia para iniciantes sobre como usar Temas do Discourse

Instale este componente de tema

Funcionalidades

:information_source: Desde que migramos para o Font Awesome 5, desenvolvemos uma API interna que entrega um subconjunto de todos os ícones do FA aos clientes — apenas aqueles ícones usados ativamente pelo Discourse. Os proprietários do site podem usar a configuração do site subconjunto de ícones svg para registrar ícones adicionais para sua instância do Discourse.

Antes

like%20before
like%20before2

Depois

like
like%20after

Se desejar,

  • você pode alterar a cor do ícone de curtir em /admin/customize/colors/ (procure pela configuração de cor do amor)
  • você pode alterar o texto de “curtir” para um termo diferente em /admin/customize/site_texts/

:discourse2: Hospedado por nós? Componentes de tema estão disponíveis para uso em nossos planos Standard, Business e Enterprise.

59 curtidas

Hi,
Sorry to dredge up this topic again but I am totally confused. I just came across this as I saw another discourse forum using a thumbs up so I did some googling.
What I’d like to do is instead of using the Thumbs up, is to use the Pig icon from here - Font Awesome with the outline version being the Unliked icon. Is that possible? Since it’s a Pro icon, would I have to download it or make my own and add it as a custom icon or emoji and then apply it to the Like Icon component.? Not sure how to do that either.
I have the Change Like Icon component installed and tested it out on an unused theme and it does work as intended. The problem is I see no area in settings under that component to mess with CSS, so there’s no place to add the scripting from earlier on in this thread.
Any help would be appreciated, thanks.

2 curtidas

Like @Phlipups I’m trying to change the icon simply to the solid beer icon, but I get a blank.


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

Hi Tris,

Try add beer to admin/site_settings/category/all_results?filter=svg%20icon%20subset
svg icon subset site setting.
And I think use only beer instead fa-beer is enough. Beer icon has not an only bordered version in free so just the color will change after click.

3 curtidas

:star_struck:

image

Brilliant Don! Thanks for helping!

1 curtida

Hi guys, I installed this component and, while it works great and it successfully replace the heart icon on the post list, the email notifications that my users are receiving are still showing the old heart icon.
Am I missing something? do I need to modify something on the email template as well?
Thank you for developing this nice component

4 curtidas

Acabei de enviar um PR para tornar o repositório um pouco mais claro (depois de não conseguir identificar o TC na minha instância):

Eu me pergunto se o link do repositório também deveria ser alterado de new-like-icon para algo mais claro. Claro, isso causaria caos, então talvez não!