diff --git a/app/helpers/icon_helper.rb b/app/helpers/icon_helper.rb new file mode 100644 index 0000000..e169fec --- /dev/null +++ b/app/helpers/icon_helper.rb @@ -0,0 +1,9 @@ +# Font Awesome Helper +module IconHelper + def icon(name = :home, classname = nil, options = {}, style: :regular) + clazz = "fa-#{style.to_s.dasherize} fa-#{name.to_s.dasherize}" + clazz += " #{options[:class]}" if options[:class] + clazz += " #{classname}" if classname + tag.i(class: clazz) + end +end diff --git a/app/views/layouts/_navbar.html.erb b/app/views/layouts/_navbar.html.erb index 9956b43..b0fdcc0 100644 --- a/app/views/layouts/_navbar.html.erb +++ b/app/views/layouts/_navbar.html.erb @@ -1,7 +1,7 @@