Project

icon_link

0.0
No commit activity in last 3 years
No release in over 3 years
View helper methods that makes it easy adding icons to links and buttons. Meant to be used with Font Awesome or Twitter Bootstrap.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
 Project Readme

IconLink

Build Status Code Climate Gem Version

View helper methods that makes it easy to add the html that is needed to display icons (from Font Awesome or Twitter Bootstrap) within links, or buttons.

Installation

Add this line to your application's Gemfile:

gem 'icon_link'

And then execute:

$ bundle

Usage

Link with icon:

icon_link_to("Example", "http://www.example.com", icon: "icon-comment")
# => <a href="http://www.example.com" class="btn"><i class="icon-comment"></i> Example</a>

Button with icon:

icon_button_tag("Create example", icon: "icon-comment")
# => <button class="btn" type="submit"><i class="icon-comment"></i> Create example</button>

Text with icon:

iconize("Example", icon: "icon-comment")
# => <i class="icon-comment"></i> Example

Only icon:

icon_for("icon-comment")
# => <i class="icon-comment"></i>

See documentation: RubyDoc

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request