• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

cllns/material_design_lite-rails: Material Design Lite, for Rails

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

cllns/material_design_lite-rails

开源软件地址(OpenSource Url):

https://github.com/cllns/material_design_lite-rails

开源编程语言(OpenSource Language):

Ruby 100.0%

开源软件介绍(OpenSource Introduction):

Material Design Lite, for Rails!

A gemified version of Google's Material Design Lite library.

Installation

To your Rails application's Gemfile, add

gem 'material_design_lite-rails', '~> 1.3'

And then run

$ bundle

Javascripts

To your application.js file, add:

  //= require material

Stylesheets

Do one of the following:

To your application.css , add

  *= require material

OR

If you're using sass, use sass's @import in your application.scss.

  @import "material";

This gem only provides the compiled CSS file from google/material-design-lite.

If you're looking for the individual Sass files, so you can take only parts of Material Design Lite, you should use the rubysamurai/material_design_lite-sass gem instead.

Icons

Material Design Lite uses a font called 'Material Icons'. You can either load this font from google, or host it yourself.

Load font from google

Add the following line to your application.html.erb view layout file, in the <head> section:

  <%= stylesheet_link_tag "https://fonts.googleapis.com/icon?family=Material+Icons" %>

OR

Host font locally

Use the material_icons gem to host the font locally.

Versioning

This gem is versioned semantically, in line with google/material-design-lite

If there needs to be a release of this gem without a corresponding release to google/material-design-lite' to the repo, an additional digit will be added (so if this gem's version is 1.0.0.1, google's version would still be 1.0.0).

The first three digits will always be the same as google/material-design-lite.

TODO:

  • Add tests (make sure CSS/JS loads, and check version)
  • Add view helpers, to ease burden of manually adding all the classes.
  • Fix issue where you need to manually create node_modules directory

Contributing

  1. Fork it ( https://github.com/cllns/material_design_lite-rails/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap