Download the PHP package kravcik/latte-font-awesome-icon without Composer
On this page you can find all versions of the php package kravcik/latte-font-awesome-icon. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kravcik/latte-font-awesome-icon
More information about kravcik/latte-font-awesome-icon
Files in kravcik/latte-font-awesome-icon
Package latte-font-awesome-icon
Short Description Simple {icon} macro for Latte, which allow short entry of font-awesome icons.
License MIT
Homepage https://github.com/kravcik/latte-font-awesome-icon
Informations about the package latte-font-awesome-icon
LatteFontAwesomeIcon
New font awesome icons - latte generator. Replace older https://github.com/kravcik/nette-macro-fontawesome.
Register Extension
You can also set default values, it is quite simple:
Extension parameters
defaultStyle
- choose FA style (fas|far|fal|fab etc.), default isfal
defaultFixedWidth
- auto addingfa-fw
to icons, defaults istrue
defaultElement
- HTML element to generate icon, default isspan
Macro parameters
Parameters can be named or ordered by numeral indexes (see examples)
color
- color for current icon, generatetext-primary
for bootstrap colors, for others gocolor-xxx
size
- size for current icon, for numeric generatefa-2x
, for stringsfa-lg
fw
- fixed widthfa-fw
for current iconelement
- custom HTML element for current iconstyle
- style for current icon (fas|far|fal|fab etc.)class
- custom class add for current HTML element
Examples
Examples depends on default values, so we using default setting (fal, fw, span).
{icon star}
-> <span class="fal fa-star fa-fw"></i>
{icon star, primary}
-> <span class="fal fa-star text-primary fa-fw"></span>
{icon star, red}
-> <span class="fal fa-star color-red fa-fw"></span>
{icon star, null, lg}
-> <span class="fal fa-star fa-lg fa-fw"></span>
{icon star, yellow, 2}
-> <span class="fal fa-star color-yellow fa-2x fa-fw"></span>
{icon star, blue, size: 2, style: far}
-> <span class="fal fa-star color-blue fa-2x"></span>
{icon star, class: foo, color: green}
-> <span class="fal fa-star color-green foo"></span>
Package | PHP | Latte | Font Awesome | Bootstrap |
---|---|---|---|---|
v1 | >=8.1 | >=3 | >5 | 5 |