Giter Club home page Giter Club logo

material_design_icons's Introduction

Material Design Icons

Gem Version Maintainers Wanted

'material_design_icons' enables you to generate both HTML tags and inline SVG of Material Design Icons for your Ruby on Rails projects.

Maintainers Wanted

Unfortunately, I no longer use this project and don't have the time to work on it any further. This means that bugs will not be fixed and new releases will not be added unless someone else does so.

If you're interested in taking over maintenance of material_design_icons, please reply to this GitHub issue (#9).

Installation

Add this line to your application's Gemfile:

gem 'material_design_icons'

And then execute:

$ bundle

Or install it yourself as:

$ gem install material_design_icons

Import the stylesheet by adding this line to your application's CSS manifest (application.css):

*= require materialdesignicons

Usage

Webfont Tags

mdi_tag(names, class: 'class-name')

You can specify a single or multiple Material Design Icons class names:

<%= mdi_tag('hexagon 48px') %>
<i class="mdi mdi-hexagon mdi-48px"></i>

You can optionally specify additional class names:

<%= mdi_tag('hexagon 48px', class: 'orange') %>
<i class="mdi mdi-hexagon mdi-48px orange"></i>

Inline SVG

mdi_svg(name, options={})

You can specify a single icon name with options:

<%= mdi_svg('hexagon') %>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="24" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve">
  <path fill="#000000" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16,3L 8,3L 3,8L 3,16L 8,21L 16,21L 21,16L 21,8"></path>
</svg>

The inline SVG makes use of the inline_svg gem, so you can use any of the options it provides.

Licenses

Community Icons - SIL Open Font License 1.1

Google Material Design Icons - Attribution 4.0 International

material_design_icons's People

Contributors

barrymieny avatar hobbypunk90 avatar abdullaachilov avatar amgoncalves avatar br3nda avatar

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.