Update to Font Awesome 5. Add experimental Icon class. Simplify document loading icon.

Signed-off-by: Michael Price <loneviking72@gmail.com>
Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Michael Price
2018-03-05 04:21:13 -04:00
committed by Roberto Rosario
parent 69adce5c02
commit 381dafc7b9
3056 changed files with 94979 additions and 7990 deletions

View File

@@ -0,0 +1,30 @@
from __future__ import unicode_literals
from django.template import Template, Context
class Icon(object):
templates = {
'classes': '<i class="{{ classes }}"></i>',
'symbol': '<i class="fa fa-{{ symbol }}"></i>'
}
def __init__(self, classes=None, symbol=None):
self.classes = classes
self.symbol = symbol
if self.classes:
self.template = self.templates['classes']
else:
self.template = self.templates['symbol']
def render(self):
return Template(self.template).render(
context=Context(
{
'classes': self.classes,
'symbol': self.symbol,
}
)
)