zeus.ugent.be/lib/helpers/font_awesome.rb
Lorin Werthen 2cc92cc60d
red heart
2016-12-12 14:34:43 +01:00

13 lines
374 B
Ruby

module FontAwesomeHelper
def fa(icon, opts = {})
classes = ['fa', "fa-#{icon}"]
classes << "fa-#{opts[:size]}" if opts[:size]
classes << 'fa-li' if opts[:li]
classes << "fa-stack-#{opts[:stack]}" if opts[:stack]
classes << 'fa-inverse' if opts[:inverse]
classes << opts[:class]
"<i class='#{classes.reject(&:nil?).join(' ')}'></i>"
end
end