9

I've got a Ruby on Rails app running with Bootstrap, which I installed using the gem twitter-bootstrap-rails.

I'd now like to integrate a new Bootswatch theme, but I'm having trouble figuring out what to do.

There are four possible downloads for each theme - a bootstrap.css file, a bootstrap.min.css file, a variables.less file, and a bootswatch.less. My question is: do I need to download and add them ALL to my ~/app/assets/stylesheets folder? or do I just need a subset of those? Currently inside ~/app/assets/stylesheets are just two files: application.css and boostrap_and_overrides.css.less. LESS really throws me off here so I'm totally confused with how it works and what I need to do to add new css files with this setup. Any help is appreciated.

4

2 回答 2

7

您只需要下载 bootstrap.css 文件,然后重命名即可。bootstrap.min.css 与 css 文件相同,只是它的缩小版本。Less 只是另一种编写 css 并以不同方式访问每个属性的方式。签出。添加 css 文件并开始集成到 html 中,同时将 html 指向新的样式表。

于 2012-06-08T20:41:58.753 回答
5

这是一个 twitter bootstrap gem,用于轻松地为 Rails 集成/自定义 Bootswatch 主题:

https://github.com/scottvrosenthal/twitter-bootswatch-rails

于 2012-09-20T17:18:43.253 回答