From c4945cb8c16e01c4601f4884ae9d49a40df1065a Mon Sep 17 00:00:00 2001 From: Arthur Deruytter Date: Thu, 27 Feb 2020 23:10:55 +0100 Subject: [PATCH] add font awesome --- lib/helpers/font_awesome.rb | 15 +++++++++++++++ lib/helpers_.rb | 3 ++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 lib/helpers/font_awesome.rb diff --git a/lib/helpers/font_awesome.rb b/lib/helpers/font_awesome.rb new file mode 100644 index 0000000..55be47d --- /dev/null +++ b/lib/helpers/font_awesome.rb @@ -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] + + "" + end + end \ No newline at end of file diff --git a/lib/helpers_.rb b/lib/helpers_.rb index 4d70f16..c91bb63 100644 --- a/lib/helpers_.rb +++ b/lib/helpers_.rb @@ -3,4 +3,5 @@ use_helper Nanoc::Helpers::Rendering use_helper Nanoc::Helpers::ChildParent use_helper NavigationHelper -use_helper VerenigingenLists \ No newline at end of file +use_helper VerenigingenLists +use_helper FontAwesomeHelper \ No newline at end of file