Sha256: 26216079bee764f6d1e88f20fa63805d0f9840e64f4d2776e4f70ae43df1671b
Contents?: true
Size: 856 Bytes
Versions: 3
Compression:
Stored size: 856 Bytes
Contents
module IconHelper def icon(icon_key) if icon_key.to_s.in? ['beer', 'coffee', 'key', 'unlock-alt'] awesome_icon(icon_key) else glyphicon(icon_key) end end # This includes an icon from Twitter-Bootstrap's Glyphicon icon set: # http://getbootstrap.com/components/#glyphicons # def glyphicon(icon_key) content_tag :span, '', class: "glyphicon glyphicon-#{icon_key}", 'aria-hidden' => true end # This includes an icon from the Font-Awesome icon set: # http://fortawesome.github.io/Font-Awesome/icons/ # # This inserts something like # <i class="fa fa-beer fa-2x"></i> # def awesome_icon(icon_key) # This helper is defined in: # https://github.com/bokmann/font-awesome-rails fa_icon icon_key end def large_awesome_icon(icon_key) fa_icon "#{icon_key} 2x" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
your_platform-1.0.1 | app/helpers/icon_helper.rb |
your_platform-1.0.0 | app/helpers/icon_helper.rb |
your_platform-0.0.2 | app/helpers/icon_helper.rb |