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

mkhairi/material-sass: A rubygem of Material Design for Bootstrap 4

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

开源软件名称(OpenSource Name):

mkhairi/material-sass

开源软件地址(OpenSource Url):

https://github.com/mkhairi/material-sass

开源编程语言(OpenSource Language):

Ruby 100.0%

开源软件介绍(OpenSource Introduction):

Material-sass Gem Version

material-sass is a rubygems version of Material Design for Bootstrap 4

Offical repo github.com/Daemonite/material

Documentation daemonite.github.io/material

Dependencies

Rails 5.1+ The Rails JavaScript helpers has been rewritten in a new gem called rails-ujs and they use vanilla JavaScript, so jQuery is not a dependency of Rails anymore. Since bootstrap relies on it, install it with bin/yarn add jquery or via gem 'jquery-rails' and add //= require jquery to application.js.

NOTE: Ensure that the sass-rails gem is presented in your Gemfile.

Installation

Add this line to your application's Gemfile:

gem 'bootstrap',     '4.1.1'
gem 'material-sass', '4.1.1'

And then run the bundler and restart your server to make the files available through the pipeline:

$ bundle install

Or install it yourself as:

$ gem install material-sass

Usage

a. Sass

Import Materialize styles in app/assets/stylesheets/application.scss:

@import "material";
//ps: no need to import 'bootstrap'

NOTE: If you have just generated a new Rails application, it may come with a .css file instead. If this file exists, it will be served instead of Sass, so remove it.

$ rm app/assets/stylesheets/application.css

b. JavaScript

Require Material javascripts in app/assets/javascripts/application.js:

//= require jquery
//= require popper
//= require bootstrap
//= require material

c. Icons

Include this line in the portion of your HTML code

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

or import this line in your application.scss

@import "https://fonts.googleapis.com/icon?family=Material+Icons";

or install this gem for offline icons

gem 'material_icons'

see docs

Contributing

note: Any changes or Pull Request regarding material assets should be made in official material repo.

  1. Fork it ( https://github.com/mkhairi/material-sass/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人参与评论

请发表评论

全部评论

专题导读
上一篇:
LeonStaufer/material-dokuwiki: A material design template for DokuWiki发布时间:2022-08-18
下一篇:
inferusvv/MeeInk: Material Design click effect发布时间:2022-08-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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