Giter Site home page Giter Site logo

purpur's Introduction

PurPur

Free ‘plug and play’ set of SVG icons designed specifically for web projects. Available as a Ruby gem. Just use icon names with your templates and styles — and all the rest will be done automagically.

The 'purpur' gem originaly based on 'EvilIcons'.

Supported browsers

We support IE 11+, Firefox, Chrome, Safari (desktop and mobile), Opera, Android 4+.

Using with rails

Add the 'purpur' gem to your Gemfile:

gem 'purpur'

This gem is under deep development, so we would reccomend to use master branch:

gem 'purpur', github: 'cimon-io/purpur'

Add the purpur icons require to your application.css:

/*
 *= require purpur
 */

Next, you have to place all svg-icons inside app/assets/icons folder and generate purpur.svg file:

bin/rake purpur:process

Finally, you can render the icon using the icon_tag helper. Here are some examples:

<%= icon_tag 'search' %>
<%= icon_tag 'arrow-right', size: :m %>
<%= icon_tag 'envelope', size: :l, class: "custom-class" %>

If you would like to use icons on the client side only, include purpur_meta_tag to the head section and require purpur.js. You'll have purpur object with method html which return raw html to insert. Example:

  purpur.html('profile')

The meta tag is needed to know the path to the purpur.svg resource.

Roadmap

  • Implement possibility to use outside rails.
  • Allow to set animated icons inside icons
  • Describe algorithm to create cvg icons
  • Implement responsive icons

purpur's People

Contributors

aratak avatar madyankin avatar mib32 avatar ondblclick avatar

Watchers

 avatar  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.