add font awesome

This commit is contained in:
Arthur Deruytter 2020-02-27 23:10:55 +01:00
parent c165bd3574
commit c4945cb8c1
2 changed files with 17 additions and 1 deletions

View file

@ -0,0 +1,15 @@
#totaal geen plagiaat
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 << 'fa-fw' if opts[:fw]
classes << opts[:class]
"<i class='#{classes.reject(&:nil?).join(' ')}'></i>"
end
end

View file

@ -3,4 +3,5 @@ use_helper Nanoc::Helpers::Rendering
use_helper Nanoc::Helpers::ChildParent use_helper Nanoc::Helpers::ChildParent
use_helper NavigationHelper use_helper NavigationHelper
use_helper VerenigingenLists use_helper VerenigingenLists
use_helper FontAwesomeHelper