Using fa-icon in template node

#1

hi all.
I would use some fa-icons in my template node but I have 2 Problems:

  • where could I find the complete list of the fa-icon?
  • could you show me an example of template node code wich uses fa-icon?
    thanks a lot
    Paolo
0 Likes

#2
  1. https://fontawesome.com/v4.7.0/
0 Likes

#3

thanks a lot!
sorry but I have no experience about the plate node.
could you do me an example about the code which uses a fa-icons in the template node?

0 Likes

#4

Hi @cpaolojo

I'm assuming you're using the ui_template node as you're asking this in the #dashboard category.

The Node-RED Dashboard already has Font Awesome loaded, so to use an FA icon, you can use the HTML from the examples they provide (https://fontawesome.com/v4.7.0/examples/#basic) directly in the ui_template node.

0 Likes

#5

Yes, I'm using ui_template node.
Sorry but I have no experience about.
I would add an icon to my button (in the left side of the button):

 <md-button class="md-accent md-raised" style="background-color:white" ng-click="send({payload:'hide_done'})"> 
 <svg width="300" height="100">
   <style>
     /* il colore รจ definito da "fill" */
.small { font: 20px sans-serif; fill: black; text-transform: lowercase}
.heavy { font: bold 30px sans-serif; fill: black; text-transform: uppercase }
.Rrrrr { font: italic 40px serif; fill: black; text-transform: none }
   </style>
   <text x="20" y="35" class="small">El</text>
   <text x="40" y="35" class="heavy">me</text>
   <text x="55" y="55" class="small">compare/text><
   <text x="65" y="55" class="Rrrrr">giacometo</text>
 </svg>
 </md-button>

Could you help me by adding the part of code which manages the icon?
Thanks a lot
Paolo

1 Like