Added icons, helperfunction and new fancy notice message
Added icons from webcrunch resp. heroicons Added helperfunction to display inline svg with the plugin inline-svg Implemented fancy notice message webcrunch. Realy nice but does only work with javascript on.
This commit is contained in:
@@ -1,2 +1,12 @@
|
||||
module ApplicationHelper
|
||||
def icon(name, options = {})
|
||||
options[:title] ||= name.underscore.humanize
|
||||
options[:aria] = true
|
||||
options[:nocomment] = true
|
||||
options[:variant] ||= :outline
|
||||
#options[:class] = options.fetch(:class, nil)
|
||||
path = options.fetch(:path, "icons/#{options[:variant]}/#{name}.svg")
|
||||
icon = path
|
||||
inline_svg_tag(icon, options)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user