2016-08-04 19:17:45 +02:00
|
|
|
module FontAwesomeHelper
|
2016-10-09 01:57:21 +02:00
|
|
|
def fa(icon, size: nil, li: false, stack: nil, inverse: false)
|
2016-08-04 19:17:45 +02:00
|
|
|
classes = ['fa', "fa-#{icon}"]
|
|
|
|
|
|
|
|
classes << "fa-#{size}" if size
|
|
|
|
classes << 'fa-li' if li
|
2016-10-09 01:57:21 +02:00
|
|
|
classes << "fa-stack-#{stack}" if stack
|
|
|
|
classes << 'fa-inverse' if inverse
|
2016-08-04 19:17:45 +02:00
|
|
|
|
|
|
|
"<i class='#{classes.join(' ')}'></i>"
|
|
|
|
end
|
|
|
|
end
|