Nitrogen plugin for Font Awesome
A quick way to include font-awesome incons into nitrogen; small record name; assumes to add "fa fa-"; and no need to specificially state that aria hidden etc.
This creates a #fa{}
element for Nitrogen Web Framework
Add it as a rebar dependency by adding into the deps section of rebar.config:
{nitrogen_fa, "", {git, "git://github.com/stuart-thackray/nitrogen_fa.git", {branch, master}}}
You need to include font awesome CSS/Fonts/etc this can either be done with the below or you can use a CDN
To include the included CSS version (5.8.1) you can include like below in your template
<link rel="stylesheet" href="/plugins/nitrogen_fa/css/all.min.css" type ="text/css" charset="utf-8" media="screen" />
Run make
in your Application.
To include the element add the follwoing include after including the nitrogen lib.
-include_lib("nitrogen_fa/include/records.hrl").
Basic example is provide at
http:\\<YOURIP>:<YOURPORT>\fa_demo
OR JUST
http://localhost:8000/fa_demo if running locally.
You specify an element like below
#fa{fa="camera-retro"}
There are many additional settings such as sizes/combining with buttons; or using with bootstrap that maybe found at FontAwesome examples
See the list of available FontAwesome icons here.
-[ ] A lot better example/demo page is needed. Currently not displaying as hoping.