Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 205 lines (125 sloc) 6.556 kb
f97393c Seyhun Akyürek Update README.md
authored
1 # Twitter Bootstrap for Rails 3.1 Asset Pipeline
490c1ba Seyhun Akyürek v2
authored
2 Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
02c229c Seyhun Akyürek init
authored
3
f97393c Seyhun Akyürek Update README.md
authored
4 twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
02c229c Seyhun Akyürek init
authored
5
42b7141 Steve Richert Add Travis build status and Gemnasium dependency status images to README
laserlemon authored
6 [![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png)](http://travis-ci.org/seyhunak/twitter-bootstrap-rails)
7 [![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails)
02c229c Seyhun Akyürek init
authored
8
9 ## Installing Gem
10
11 Include Bootstrap in Gemfile;
12
8662165 Seyhun Akyürek Update README.md
authored
13 gem 'twitter-bootstrap-rails', :group => :assets
02c229c Seyhun Akyürek init
authored
14
15 or you can install from latest build;
16
17 gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git'
18
19 You can run bundle from command line
20
21 bundle install
22
23
3f51bdf Seyhun Akyürek version 1.4.3
authored
24 ## Installing to App (using Generators)
68ee351 Seyhun Akyürek updated to 1.4.1
authored
25
3f51bdf Seyhun Akyürek version 1.4.3
authored
26 You can run following generators to get started with Twitter Bootstrap quickly.
0e1931d Seyhun Akyürek fixes
authored
27
c5a0b38 Seyhun Akyürek Update README.md
authored
28
d2a0658 Seyhun Akyürek Update README.md
authored
29 Install (requires directives to Asset pipeline.)
c5a0b38 Seyhun Akyürek Update README.md
authored
30
31
3f51bdf Seyhun Akyürek version 1.4.3
authored
32 Usage:
0e1931d Seyhun Akyürek fixes
authored
33
c5a0b38 Seyhun Akyürek Update README.md
authored
34
35 rails g bootstrap:install
3f51bdf Seyhun Akyürek version 1.4.3
authored
36
37
3e38851 Seyhun Akyürek fixes
authored
38 Layout (generates Twitter Bootstrap compatible layout with flash messages) - (Haml and Slim supported)
c5a0b38 Seyhun Akyürek Update README.md
authored
39
40
3f51bdf Seyhun Akyürek version 1.4.3
authored
41 Usage:
42
c5a0b38 Seyhun Akyürek Update README.md
authored
43
3e38851 Seyhun Akyürek fixes
authored
44 rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
c5a0b38 Seyhun Akyürek Update README.md
authored
45
3f51bdf Seyhun Akyürek version 1.4.3
authored
46
47 Example:
48
c5a0b38 Seyhun Akyürek Update README.md
authored
49
50 rails g bootstrap:layout application fixed
3f51bdf Seyhun Akyürek version 1.4.3
authored
51
490c1ba Seyhun Akyürek v2
authored
52
f3cac1e Thomas Volkmar Worm Improved Slim layout, added themed templates for Slim.
tvw authored
53 Themed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)
c5a0b38 Seyhun Akyürek Update README.md
authored
54
55
3f51bdf Seyhun Akyürek version 1.4.3
authored
56 Usage:
57
c5a0b38 Seyhun Akyürek Update README.md
authored
58
3e38851 Seyhun Akyürek fixes
authored
59 rails g bootstrap:themed [RESOURCE_NAME]
490c1ba Seyhun Akyürek v2
authored
60
3f51bdf Seyhun Akyürek version 1.4.3
authored
61
62 Example:
63
c5a0b38 Seyhun Akyürek Update README.md
authored
64
65 rails g scaffold post title:string description:text
cf7e275 Luke Holder This is documentation change to fix errors when trying to run the bootst...
lukeholder authored
66 rake db:migrate
c5a0b38 Seyhun Akyürek Update README.md
authored
67 rails g bootstrap:themed posts
490c1ba Seyhun Akyürek v2
authored
68
0e1931d Seyhun Akyürek fixes
authored
69
70
02c229c Seyhun Akyürek init
authored
71 ## Using with Less
72
68ee351 Seyhun Akyürek updated to 1.4.1
authored
73 Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less, a CSS preprocessor for faster and easier web development.
02c229c Seyhun Akyürek init
authored
74
75 ## Using stylesheets with Less
76
77 You have to require Bootstrap LESS (bootstrap.less) in your application.css
78
79 /*
66e36a7 Seyhun Akyürek fixes
authored
80 *= require twitter/bootstrap
02c229c Seyhun Akyürek init
authored
81 */
82
83 /* Your stylesheets goes here... */
0e1931d Seyhun Akyürek fixes
authored
84
02c229c Seyhun Akyürek init
authored
85
86 Now, you can override LESS files provided by Twitter Bootstrap
3e38851 Seyhun Akyürek fixes
authored
87 Also, you can import additional files (.ie responsive)
88
89 @import "twitter/bootstrap";
02c229c Seyhun Akyürek init
authored
90
3e38851 Seyhun Akyürek fixes
authored
91 // import responsive layout
92 @import "twitter/bootstrap/responsive";
0e1931d Seyhun Akyürek fixes
authored
93
3e38851 Seyhun Akyürek fixes
authored
94 // Your custom stylesheets goes here (override Less here)
02c229c Seyhun Akyürek init
authored
95
96
66e36a7 Seyhun Akyürek fixes
authored
97 ## Using Javascripts
02c229c Seyhun Akyürek init
authored
98
99 You have to require Bootstrap JS (bootstrap.js) in your application.js
100
66e36a7 Seyhun Akyürek fixes
authored
101 //= require twitter/bootstrap
02c229c Seyhun Akyürek init
authored
102
103 $(document).ready(function(){
104 /* Your javascripts goes here... */
105 });
106
107
3f51bdf Seyhun Akyürek version 1.4.3
authored
108 ## Using Coffeescript (optionally)
02c229c Seyhun Akyürek init
authored
109
110 Using Twitter Bootstrap with the CoffeeScript is easy.
3f51bdf Seyhun Akyürek version 1.4.3
authored
111 twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
112 to /app/assets/javascripts/ folder.
02c229c Seyhun Akyürek init
authored
113
3e38851 Seyhun Akyürek fixes
authored
114 jQuery ->
115 $(".alert-message").alert()
490c1ba Seyhun Akyürek v2
authored
116 $(".tabs").button()
117 $(".carousel").carousel()
118 $(".collapse").collapse()
119 $(".dropdown-toggle").dropdown()
3e38851 Seyhun Akyürek fixes
authored
120 $(".modal").modal()
121 $("a[rel]").popover()
d50f451 Seyhun Akyürek update
authored
122 $(".navbar").scrollspy()
123 $(".tab").tab "show"
3e38851 Seyhun Akyürek fixes
authored
124 $(".tooltip").tooltip()
490c1ba Seyhun Akyürek v2
authored
125 $(".typeahead").typeahead()
0e1931d Seyhun Akyürek fixes
authored
126
02c229c Seyhun Akyürek init
authored
127
128 ## Using Static CSS, JS (w/o Less)
129
130 twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest static CSS, JS files.
131
132 You can install from latest build (from branch);
0e1931d Seyhun Akyürek fixes
authored
133
02c229c Seyhun Akyürek init
authored
134 gem 'twitter-bootstrap-rails', :git => "git://github.com/seyhunak/twitter-bootstrap-rails.git", :branch => "static"
135
136
137 ## Changelog
138 <ul>
139 <li>Version 0.0.5 deprecated</li>
140 <li>Asset files updated to latest and removed version numbers</li>
141 <li>Implemented Less::Rails Railtie to use with LESS</li>
142 <li>Fixed railtie to only initialize Less when installed</li>
3f51bdf Seyhun Akyürek version 1.4.3
authored
143 <li>New branch for the static version of Bootstrap (w/o Less) - check static branch</li>
02c229c Seyhun Akyürek init
authored
144 <li>Added path to support heroku deploy</li>
66e36a7 Seyhun Akyürek fixes
authored
145 <li>Rake precompile issue fixed</li>
68ee351 Seyhun Akyürek updated to 1.4.1
authored
146 <li>Updated asset files to 1.4.0</li>
147 <li>Updated dependency less-rails (now requires 2.1.0)</li>
148 <li>Added generators</li>
0e1931d Seyhun Akyürek fixes
authored
149 <li>Fixed generators</li>
150 <li>Fixed class name conflicts from (bootstrap.js.coffee)</li>
3f51bdf Seyhun Akyürek version 1.4.3
authored
151 <li>Fixed jquery-rails gem version dependency</li>
152 <li>Updated asset files</li>
153 <li>Added new generators (install, layout and themed)</li>
490c1ba Seyhun Akyürek v2
authored
154 <li>Compability to Rails 3.2</li>
155 <li>Transitioning to 2.0</li>
d50f451 Seyhun Akyürek update
authored
156 <li>Released gem v.2.0rc0</li>
02bdece Seyhun Akyürek Update README.md
authored
157 <li>Added Haml and Slim support</li>
3e38851 Seyhun Akyürek fixes
authored
158 <li>Added Twitter Bootstrap compatible flash messages</li>
bda8792 Seyhun Akyürek Update README.md
authored
159 <li>Added Responsive layout support</li>
3e38851 Seyhun Akyürek fixes
authored
160 <li>Fixes and release 2.0.0</li>
02c229c Seyhun Akyürek init
authored
161 </ul>
162
68ee351 Seyhun Akyürek updated to 1.4.1
authored
163
c66d005 Seyhun Akyürek v2
authored
164 ## Contributors & Patches & Forks
165 <ul>
166 <li>Daniel Morris</li>
167 <li>Bradly Feeley</li>
168 <li>Guilherme Moreira</li>
169 <li>Alex Behar</li>
170 <li>Brandon Keene</li>
171 <li>Anthony Corcutt</li>
172 <li>Colin Warren</li>
173 <li>Giovanni Cappellotto</li>
174 <li>Masakuni Kato</li>
6a8eec9 Seyhun Akyürek Update README.md
authored
175 <li>Gudleik Rasch</li>
3aaf933 Seyhun Akyürek Update README.md
authored
176 <li>Thomas Volkmar Worm</li>
c66d005 Seyhun Akyürek v2
authored
177 </ul>
178
179
68ee351 Seyhun Akyürek updated to 1.4.1
authored
180 ## Future
181 <ul>
0e1931d Seyhun Akyürek fixes
authored
182 <li>Writing tests (not implemented yet)</li>
480bc66 Seyhun Akyürek Update README.md
authored
183 <li>Markup Helpers (alert, tabs, pagination, breadcrumbs etc.)</li>
68ee351 Seyhun Akyürek updated to 1.4.1
authored
184 </ul>
185
186
02c229c Seyhun Akyürek init
authored
187 ## Credits
188 Seyhun Akyürek - seyhunak [at] gmail com
189
190 [Follow me on Twitter](http://twitter.com/seyhunak "Twitter")
b747bae Seyhun Akyürek Update README.md
authored
191 [Follow me on Google+](http://plus.ly/seyhunak "Google+")
02c229c Seyhun Akyürek init
authored
192
193
194 ## Thanks
b747bae Seyhun Akyürek Update README.md
authored
195 Twitter Bootstrap and all twitter-bootstrap-rails contributors
02c229c Seyhun Akyürek init
authored
196 http://twitter.github.com/bootstrap
197
198
199 ## License
200 Copyright (c) 2011 Seyhun Akyürek
201
202 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
203 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
204 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Something went wrong with that request. Please try again.