Code Monkey home page Code Monkey logo

icomoon-rails's Introduction

Icomoon::Rails

IcoMoon provides an application to create your own icon fonts, and also releases an icon pack for free.

The icomoon-rails gem integrates the free icon pack of IcoMoon with the Rails asset pipeline. It also provide a way to fork with your own icon fonts.

It is highly recommanded to create your own fork.

Usage

Install icomoon-rails gem

Add this line to your application's Gemfile:

gem 'icomoon-rails'

And then execute:

bundle

Include icomoon-free stylesheet assets

Add to your app/assets/stylesheets/application.css

*= require icomoon-free/style

IE7 suppot

If you need to support IE7, there is a icomoon-free/lte-ie7.js in javascripts assets.

Use this stylesheet with conditional comment may be the best way to support IE7. But it can be difficult when it comes to assets pipeline. See this article on StackOverflow for a workaround: Using Rails 3.1 assets pipeline to conditionally use certain css

Customization

YOU SHOULD ONLY USE ACTULLY NEEDED ICON FONTS.

You can go to IcoMoon App to create your own fonts pack.

  1. select the fonts you needed, and click 'Font->' button
  2. click 'More Settings' to set your font name and CSS class prefix
  3. click 'Save/Load' to save your font pack for futher use
  4. click 'Download' to download your font pack as zip file
  5. fork this gem from github
  6. follow gem maintenace section and replace NAME and ZIP value to create your own fonts assets
  7. use gem 'icomoon-rails', git: 'xxxxxx' in your Gemfile instead
  8. follow other part of usage section

Gem maintenance

Maintain icomoon-rails gem with Rake commands.

Download icon fonts from IcoMoon App.

Update icomoon-free source files.

rake update-icomoon NAME=icomoon-free ZIP=~/Download/icomoon.zip

Publish gem.

rake release

License

The assets from IcoMoon free icon pack use CC License (CC BY-SA 3.0).

Other parts of gem use MIT license.

icomoon-rails's People

Contributors

duckworth avatar tsechingho avatar

Watchers

 avatar  avatar

Forkers

scrazy77

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.