LoginSignup
4
4

More than 5 years have passed since last update.

RailsでTODC Bootstrapを使う

Posted at

TODC BootstrapはTwitter Boostrapの定義を上書きする仕様なので、まずはTwitter Boostrapを導入。これはgemで提供されているので、Gemfileに以下を追記。

gem 'twitter-bootstrap-rails'
gem 'less-rails', :group => :assets

以下のコマンドで必要なファイルを作成。

$ bundle exec rails g bootstrap:install less

次にTODC Bootstrapを導入。gemで提供されていないので、http://todc.github.io/todc-bootstrap/getting-started.html より、TODC Bootstrapのソースをダウンロードし、中のlessディレクトリにあるすべての.lessファイルをAPP_ROOT/vendor/assets/stylesheets以下に配置する。

最後に下記の1行をapp/assets/stylesheets/bootstrap_and_overrides.css.lessに追記。

@import "todc-bootstrap";

以上でTODC Bootstrapが使えるようになる。

4
4
0

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
4
4