In [1]:
from IPython.html import widgets
from ipbs.widgets import Icon
import ipbs.bootstrap as bs
from ipbs.icons import FontAwesome, Size
First, grab a FontAwesome instance which knows about all of the icons.
In [2]:
fa = FontAwesome()
fa exposes Python-friendly, autocompletable names for all of the FontAwesome icons, and you can preview them immediately.
In [3]:
fa.space_shuttle
Out[3]:
You can apply effects like rotation and scaling.
In [4]:
fa.space_shuttle.rotate_270 * 3
Out[4]:
The actual widget supports the stack case, such that you can display a single icon...
In [5]:
icon = Icon(fa.space_shuttle)
icon
Or several icons stacked together...
In [7]:
icon = Icon(fa.square * 2, fa.empire.context_inverse, size=Size.x3)
icon