Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mkhairi/undraw
unDraw rubygem, MIT licensed illustrations by unDraw for your rails projects
https://github.com/mkhairi/undraw
rails ruby svg undraw-rubygem
Last synced: 3 days ago
JSON representation
unDraw rubygem, MIT licensed illustrations by unDraw for your rails projects
- Host: GitHub
- URL: https://github.com/mkhairi/undraw
- Owner: mkhairi
- License: mit
- Created: 2018-10-10T10:08:05.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-04-12T06:05:57.000Z (over 1 year ago)
- Last Synced: 2024-12-30T18:16:58.408Z (10 days ago)
- Topics: rails, ruby, svg, undraw-rubygem
- Language: Ruby
- Homepage: https://undraw.co/illustrations
- Size: 4.73 MB
- Stars: 106
- Watchers: 4
- Forks: 31
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# unDraw rubygem [![Gem Version](https://badge.fury.io/rb/undraw.svg)](http://badge.fury.io/rb/undraw)
Embed SVG illustrations by [unDraw.io](https://undraw.co/illustrations) for your rails projects
![screenshot](https://user-images.githubusercontent.com/7901659/46782215-ff11b700-cd57-11e8-9bdc-e417053d7189.png)
## InstallationAdd this line to your application's Gemfile:
```ruby
gem 'undraw'
```And then execute:
$ bundle
Or install it yourself as:
$ gem install undraw
## Usage
Browse to find the [images](https://undraw.co/illustrations) that fit your needs. Take advantage of the on-the-fly color image generation to match your brand identity.
**hint: downcase the svg title and replace space with underscore. eg: `Features Overview` to `features_overview`
```ruby
# default color
<%= undraw("features_overview") %>
``````ruby
# set size
<%= undraw("features_overview", color: "#3f51b5", size: "350*150") %>
``````ruby
# set id
<%= undraw("building", color: "#ff6347", id: "undraw-building") %>
``````ruby
# set class
<%= undraw("designer_life", color: "#ff6347", class: "undraw-designer-life") %>
```## Update
Run bundle update to latest gem released```$ bundle update undraw```
Due the license issue, any new illustrations released are no longer added to this gems and existing assets might be removed in a future release.
You need to manually download preferred svg file and put on:```\vendor\images\undraw\.svg```
```ruby
# default color
<%= undraw("") %>
```## Development
DEMO: http://materialize.labs.my/undraw## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/mkhairi/undraw. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
## Code of Conduct
Everyone interacting in the Undraw project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/mkhairi/undraw/blob/master/CODE_OF_CONDUCT.md).