font-awesome-rails

https://github.com/bokmann/font-awesome-rails

HTML

the font-awesome font bundled as an asset for the rails asset pipeline

FontAwesome::Rails::IconHelper#fa_stacked_icon

Creates an stack set of icon tags given a base icon name, a main icon
name, and possible icon modifiers.

Examples

  fa_stacked_icon "twitter", base: "square-o"
  # => <span class="fa-stack">
  # =>   <i class="fa fa-square-o fa-stack-2x"></i>
  # =>   <i class="fa fa-twitter fa-stack-1x"></i>
  # => </span>

  fa_stacked_icon "terminal inverse", base: "square", class: "pull-right", text: "Hi!"
  # => <span class="fa-stack pull-right">
  # =>   <i class="fa fa-square fa-stack-2x"></i>
  # =>   <i class="fa fa-terminal fa-inverse fa-stack-1x"></i>
  # => </span> Hi!

  fa_stacked_icon "camera", base: "ban-circle", reverse: true
  # => <span class="fa-stack">
  # =>   <i class="fa fa-camera fa-stack-1x"></i>
  # =>   <i class="fa fa-ban-circle fa-stack-2x"></i>
  # => </span>

Source | Google | Stack overflow

Edit

git clone [email protected]:bokmann/font-awesome-rails.git

cd font-awesome-rails

open app/helpers/font_awesome/rails/icon_helper.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-FontAwesome--Rails--IconHelper-fa_stacked_icon-for-pr


# Commit to git

git add app/helpers/font_awesome/rails/icon_helper.rbgit commit -m "better docs for FontAwesome::Rails::IconHelper#fa_stacked_icon"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-FontAwesome--Rails--IconHelper-fa_stacked_icon-for-pr

hub pull-request


# Celebrate!