PhpTags/Widgets/FontAwesome

From Test foxway
Jump to: navigation, search

This page demonstrates the PhpTags extension

Bucket in the sand.svg You can play it in the namespace sandbox (editing is allowed for anonymous users there)


Basic Icons

There are several identical ways to use this widget

Result Source
camera-retro {{#phptag: FA::camera_retro }} camera-retro
camera-retro <phptag> echo FA::camera_retro; </phptag> camera-retro
camera-retro <phptag> echo FontAwesome::camera_retro; </phptag> camera-retro
camera-retro <phptag> echo new FontAwesomeIcon( 'camera-retro' ); </phptag> camera-retro
camera-retro <phptag> echo fa( 'camera-retro' ); </phptag> camera-retro
camera-retro <phptag> echo fontawesome( 'camera-retro' ); </phptag> camera-retro

Larger Icons

Result Source
lg {{#phptag: FA::camera_retro->lg }} lg
2x <phptag> echo FA::camera_retro->_2x; </phptag> 2x
3x <phptag> echo FontAwesome::camera_retro->_3x; </phptag> 3x
4x <phptag> echo new FontAwesomeIcon( 'camera-retro', ['4x'] ); </phptag> 4x
5x <phptag> $icon = new FontAwesomeIcon( 'camera-retro' ); echo $icon->_5x;</phptag> 5x

Fixed Width Icons

Result Source
  Home {{#phptag: FA::home->fw }}  Home
  Library <phptag> echo FA::BOOK->fw; </phptag>  Library
  Applications <phptag> echo FontAwesome::pencil->FW; </phptag>  Applications
  Settings <phptag> echo new FontAwesomeIcon( 'cog', ['fw'] ); </phptag>  Settings

Bordered & Pulled Icons

Result Source
…tomorrow we will run faster, stretch out our arms farther… And then one fine morning— So we beat on, boats against the current, borne back ceaselessly into the past. {{#phptag: echo fa( 'quote-left', ['3x', 'border', 'class'=>'pull-left'] ); }} …tomorrow we will run faster, stretch out our arms farther… And then one fine morning— So we beat on, boats against the current, borne back ceaselessly into the past.
…tomorrow we will run faster, stretch out our arms farther… And then one fine morning— So we beat on, boats against the current, borne back ceaselessly into the past. {{#phptag: $icon = FA::quote_left->_3x->border; $icon->class='pull-left'; echo $icon; }} …tomorrow we will run faster, stretch out our arms farther… And then one fine morning— So we beat on, boats against the current, borne back ceaselessly into the past.

Spinning Icons

Result Source
{{#phptag: FA::spinner->spin }}
<phptag> echo FA::circle_o_notch->spin; </phptag>
<phptag> echo fa( 'refresh', ['spin'] ); </phptag>
<phptag> echo new FontAwesomeIcon( 'cog', ['spin'] ); </phptag>

Rotated & Flipped

Result Source
normal {{#phptag: FA::shield }} normal
rotate-90 <phptag> echo FA::shield->rotate_90; </phptag> rotate-90
rotate-180 <phptag> echo FontAwesome::shield->rotate_180; </phptag> rotate-180
rotate-270 <phptag> echo new FontAwesomeIcon( 'shield', ['rotate-270'] ); </phptag> rotate-270
flip-horizontal <phptag> echo fa( 'shield', ['flip-horizontal'] ); </phptag> flip-horizontal
flip-vertical <phptag> echo fontawesome( 'shield', ['flip-vertical'] ); </phptag> flip-vertical