73
71

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bootswatchをRailsで使う

Posted at

##bootswatch とは

Twitter Bootstrapをカスタマイズしたテーマが置いてあるサイトです。

Twitter Bootstrapのさまざまなテーマをダウンロードできる『Bootswatch』 | 100SHIKI

##Railsでbootswatchを使う「twitter-bootswatch-rails」

scottvrosenthal/twitter-bootswatch-rails · GitHub

seyhunak/twitter-bootstrap-rails · GitHubも入っているそう。

##使い方
1.Gemfileに以下を記述後 bundle

group :assets do
	gem 'twitter-bootswatch-rails', '~> 2.3.1.2'

end

gem 'twitter-bootswatch-rails-helpers', '>= 2.3.1'

2.Bootswatch: Free themes for Twitter Bootstrapに掲載されているテーマを指定する(今回はcyborgを選択)

rails g bootswatch:install cyborg
rails g bootswatch:import cyborg
rails g bootswatch:layout cyborg

3.application.css, application.jsに以下を追加

application.css
/*
 *= require_self
 *= require [theme_name]/loader
 *= require font-awesome/font-awesome
*/
application.js
//= require jquery
//= require jquery_ujs
//= require [theme_name]/loader

これで使えるようになるはず。

##詳細は
ドキュメントにいろいろ書いてます。

73
71
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
73
71

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?