Skip to main content
Solved

Using Font Awesome in Universal GUI

  • December 11, 2023
  • 9 replies
  • 158 views

Harm Horstman
Superhero
Forum|alt.badge.img+21

Is there a way to make use of Font Awesome icons?

Since HTML is supported in grid views and form lists, I see new opportunities for making very powerful status overviews, by making use of font awesome icons in stead of images or image lookups.  

Something like this:

 

 

Best answer by Harm Horstman

@Freddy,

It works!

We added fontawesome to the Universal folder and added this line to custom.css:
@import url("fontawesome/css/all.css");

This makes it now very easy to do things like below (HTML in a card list)
 


 

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

9 replies

Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 531 replies
  • December 11, 2023

@Harm Horstman if your icons are simple, you could create your icon with SVG code directly in HTML. I use it as well, because it's also flexible if you want to dynamically want to steer the color or content:

 

 

Something in the line of checkmark:

<svg xmlns="http://www.w3.org/2000/svg"  viewBox="0 0 64 64" width="64px" height="64px">
    <path x="50%" y="50%" 
          fill="none" 
          d="M7.375,33.25 c0,0,10,11.375,14.125,11.375S44.875,8,44.875,8" 
          stroke="green" 
          stroke-width="6"/>
</svg> 

 


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • December 11, 2023

Hi Freddy,

This looks very good, thanks for the suggestion!

But I still think Font Awesome could be interesting for many scenarios. I hope there is a way to make use of that.


Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hey Harm,

Are you referring to be able to change the default icons the Universal GUI uses for the actions like Add, Copy, and Delete? That is currently not possible, but would certainly be a great addition for enhances customizability.

An idea for that has been created before: Replace standard icons to customize the UI (for ISV's) | Thinkwise Community (thinkwisesoftware.com)


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • December 22, 2023

Hi Mark, no this is not my intention.

I like te make use of font-awesome icons in HTML data fields. Like my example in the initial post.


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 531 replies
  • December 22, 2023
Harm Horstman wrote:

Hi Mark, no this is not my intention.

I like te make use of font-awesome icons in HTML data fields. Like my example in the initial post.

@Harm Horstman if you go to the font awesome site you can copy the svg/html code of the icons you want to use in your App. This code you can put in html field or image field.


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • January 11, 2024

Hi @Freddy, could you give a little example about how to do this. It is not clear to me.

We tried to add the Font Awesome library to the index.html of the Universal folder. But I noticed that on refresh of the page the FA library is disappeared from the page source. I think that the DOM is rebuild by Universal’s Javascript.

So, I like to know how we could add the Font Awesome library to Universal? 


Freddy
Forum|alt.badge.img+16
  • Thinkwise Local Partner Brasil
  • 531 replies
  • January 12, 2024
Harm Horstman wrote:

Hi @Freddy, could you give a little example about how to do this. It is not clear to me.

We tried to add the Font Awesome library to the index.html of the Universal folder. But I noticed that on refresh of the page the FA library is disappeared from the page source. I think that the DOM is rebuild by Universal’s Javascript.

So, I like to know how we could add the Font Awesome library to Universal? 



@Harm Horstman I guess you have 3 options:

First is to download the css : https://fontawesome.com/download and include it in custom.css file.

Second is to include only the svgs you pretend to use.

third, add the css as a proper image using tsql, with file_name and file_data column. You can get svg code from fontawesome site and cast it to varbinary.


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • January 12, 2024

Thank you Freddy, we will try that.


Harm Horstman
Superhero
Forum|alt.badge.img+21
  • Author
  • Superhero
  • 499 replies
  • Answer
  • January 22, 2024

@Freddy,

It works!

We added fontawesome to the Universal folder and added this line to custom.css:
@import url("fontawesome/css/all.css");

This makes it now very easy to do things like below (HTML in a card list)
 


 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings