zeus.ugent.be/lib/helpers/font_awesome.rb

11 lines
232 B
Ruby
Raw Normal View History

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