2017 © Pedro Peláez
 

library nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of font-awesome icons.

image

kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of font-awesome icons.

  • Wednesday, May 16, 2018
  • by kravcik
  • Repository
  • 1 Watchers
  • 1 Stars
  • 397 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 12 % Grown

The README.md

This repo is discontinued - for Latte3 and PHP8.1 you should look here: https://github.com/kravcik/latte-font-awesome-icon, (*1)

Simple macro for generating Font Awesome icons. First parameter is required. Parameters can be set in order or randomly with string keys (macro detects if it's getting an associative array)., (*2)

Version 2.0.0

It's compatible with FontAwesome 5, but default style is set to light. Best option would be to create multiple macros or a static variable to set default style. Send me a PR or create an issue if you need this., (*3)

Thanks to @peldax it's also possible to change the html element. Default is span., (*4)

Register to config.neon

latte:
    macros:
        - Kravcik\Macros\FontAwesomeMacro::install

Parameters

  1. icon - icon name without fa-
  2. color - color (blue, red-dark, etc.)
  3. size - number (generates fa-{size}x) or sm, lg, etc.
  4. fw - if TRUE, disable fa-fw
  5. style - fas / far / fal / fab

Examples

{icon star, 'el' => 'i'} -> <i class="fal fa-star fa-fw"></i>, (*5)

{icon star} -> <span class="fal fa-star fa-fw"></span>, (*6)

{icon star, red} -> <span class="fal fa-star color-red fa-fw"></span>, (*7)

{icon star, NULL, lg} -> <span class="fal fa-star fa-lg fa-fw"></span>, (*8)

{icon star, yellow, 2} -> <span class="fal fa-star color-yellow fa-2x fa-fw"></span>, (*9)

{icon star, blue, 2, TRUE, far} -> <span class="far fa-star color-blue fa-2x"></span>, (*10)

{icon star, size => 2, fw => TRUE, color => 'green-light', style => 'fas'} -> <span class="fas fa-star color-green-light fa-2x"></span>, (*11)

Versions

Package PHP Nette Font Awesome Bootstrap
v4 >=8.0 >=3.0 5 4
v3 >=7.3 >=3.0 5 4
v2 >=7.1 >=2.4 5 3
v1 >=5.6 >=2.4 4 3

The Versions

16/05 2018

dev-master

9999999-dev https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of font-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

05/06 2017

v1.1.0

1.1.0.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of font-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

30/05 2017

1.0.1

1.0.1.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of font-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

21/02 2017

0.9.4

0.9.4.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of fotn-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

21/02 2017

1.0.0

1.0.0.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of fotn-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

21/02 2017

0.9.3

0.9.3.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of fotn-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

20/02 2017

0.9.1

0.9.1.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of fotn-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome

20/02 2017

0.9

0.9.0.0 https://github.com/kravcik/nette-macro-fontawesome

Simple macro for Nette framework, which allow short entry of fotn-awesome icons.

  Sources   Download

MIT

The Requires

 

The Development Requires

nette macro font awesome