LoginSignup
15
16

More than 5 years have passed since last update.

RailsでMaterial Designを使う (Material Design for Bootstrapの使い方)

Last updated at Posted at 2016-10-28

Material Design for Bootstrap

dist/css/bootstrap-material-design.css
dist/css/ripples.min.css

上記2つを任意の場所に持って行きます。
ここでは
app/assets/stylesheets/material-design
に入れました。

以下のようにCSSを指定して読み込みます。

application.css.scss
/*
 *= require_self
 *= require material-design/bootstrap-material-design
 *= require material-design/ripples.min
 *= require style
 */
material.js
material.min.js
ripples.min.js

この3つを
app/assets/javascripts/material-design
に入れます。

そしてapplication.jsに以下を追記します。

application.js
//= require_tree ./material-design

$(document).on('ready page:load', function() {
    $.material.init();
});

関連リンク

15
16
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
16