twitter-bootstrap-rails 2.2.8 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of twitter-bootstrap-rails might be problematic. Click here for more details.

Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +229 -322
  3. data/Rakefile +4 -6
  4. data/app/assets/fonts/glyphicons-halflings-regular.eot +0 -0
  5. data/app/assets/fonts/glyphicons-halflings-regular.svg +288 -0
  6. data/app/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
  7. data/app/assets/fonts/glyphicons-halflings-regular.woff +0 -0
  8. data/app/assets/fonts/glyphicons-halflings-regular.woff2 +0 -0
  9. data/app/assets/javascripts/twitter/bootstrap.js +12 -13
  10. data/app/assets/javascripts/twitter/bootstrap/affix.js +162 -0
  11. data/app/assets/javascripts/twitter/bootstrap/alert.js +94 -0
  12. data/app/assets/javascripts/twitter/bootstrap/button.js +120 -0
  13. data/app/assets/javascripts/twitter/bootstrap/carousel.js +237 -0
  14. data/app/assets/javascripts/twitter/bootstrap/collapse.js +211 -0
  15. data/app/assets/javascripts/twitter/bootstrap/dropdown.js +165 -0
  16. data/app/assets/javascripts/twitter/bootstrap/modal.js +337 -0
  17. data/app/assets/javascripts/twitter/bootstrap/popover.js +108 -0
  18. data/app/assets/javascripts/twitter/bootstrap/scrollspy.js +172 -0
  19. data/app/assets/javascripts/twitter/bootstrap/tab.js +155 -0
  20. data/app/assets/javascripts/twitter/bootstrap/tooltip.js +514 -0
  21. data/app/assets/javascripts/twitter/bootstrap/transition.js +59 -0
  22. data/app/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +1 -890
  23. data/app/assets/stylesheets/twitter-bootstrap-static/sprites.css.erb +1 -146
  24. data/app/helpers/bootstrap_flash_helper.rb +14 -7
  25. data/app/helpers/form_errors_helper.rb +22 -0
  26. data/app/helpers/glyph_helper.rb +12 -6
  27. data/app/helpers/modal_helper.rb +26 -22
  28. data/app/helpers/navbar_helper.rb +47 -32
  29. data/app/helpers/twitter_breadcrumbs_helper.rb +6 -2
  30. data/app/views/twitter-bootstrap/_breadcrumbs.html.erb +8 -8
  31. data/lib/generators/bootstrap/install/install_generator.rb +3 -2
  32. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.css +3 -4
  33. data/lib/generators/bootstrap/install/templates/bootstrap_and_overrides.less +9 -18
  34. data/lib/generators/bootstrap/install/templates/en.bootstrap.yml +5 -0
  35. data/lib/generators/bootstrap/layout/layout_generator.rb +1 -4
  36. data/lib/generators/bootstrap/layout/templates/layout.html.erb +27 -48
  37. data/lib/generators/bootstrap/layout/templates/layout.html.haml +19 -34
  38. data/lib/generators/bootstrap/layout/templates/layout.html.slim +13 -30
  39. data/lib/generators/bootstrap/partial/templates/_login.html.erb +2 -3
  40. data/lib/generators/bootstrap/themed/templates/_form.html.erb +30 -10
  41. data/lib/generators/bootstrap/themed/templates/_form.html.haml +10 -8
  42. data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -9
  43. data/lib/generators/bootstrap/themed/templates/edit.html.slim +1 -1
  44. data/lib/generators/bootstrap/themed/templates/index.html.erb +4 -2
  45. data/lib/generators/bootstrap/themed/templates/index.html.haml +3 -2
  46. data/lib/generators/bootstrap/themed/templates/index.html.slim +6 -5
  47. data/lib/generators/bootstrap/themed/templates/new.html.slim +1 -1
  48. data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -7
  49. data/lib/generators/bootstrap/themed/templates/show.html.haml +4 -4
  50. data/lib/generators/bootstrap/themed/templates/show.html.slim +6 -7
  51. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.erb +5 -5
  52. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.haml +3 -3
  53. data/lib/generators/bootstrap/themed/templates/simple_form/_form.html.slim +4 -4
  54. data/lib/generators/bootstrap/themed/themed_generator.rb +2 -2
  55. data/lib/twitter/bootstrap/rails/breadcrumbs.rb +69 -0
  56. data/lib/twitter/bootstrap/rails/engine.rb +17 -10
  57. data/lib/twitter/bootstrap/rails/version.rb +2 -2
  58. data/spec/lib/breadcrumbs_spec.rb +99 -0
  59. data/spec/lib/twitter_bootstrap_rails/badge_label_helper_spec.rb +12 -4
  60. data/spec/lib/twitter_bootstrap_rails/bootstrap_flash_helper_spec.rb +128 -0
  61. data/spec/lib/twitter_bootstrap_rails/form_errors_helper_spec.rb +148 -0
  62. data/spec/lib/twitter_bootstrap_rails/glyph_helper_spec.rb +24 -0
  63. data/spec/lib/twitter_bootstrap_rails/modal_helper_spec.rb +15 -15
  64. data/spec/lib/twitter_bootstrap_rails/navbar_helper_spec.rb +207 -173
  65. data/spec/lib/twitter_bootstrap_rails/uri_state_spec.rb +18 -16
  66. data/spec/spec_helper.rb +11 -1
  67. data/vendor/assets/stylesheets/twitter-bootstrap-static/bootstrap.css.erb +5796 -1
  68. data/vendor/static-source/bootstrap.less +0 -1
  69. data/vendor/static-source/sprites.less +1 -1
  70. data/vendor/toolkit/twitter/bootstrap/alerts.less +51 -57
  71. data/vendor/toolkit/twitter/bootstrap/badges.less +66 -0
  72. data/vendor/toolkit/twitter/bootstrap/bootstrap.less +29 -36
  73. data/vendor/toolkit/twitter/bootstrap/breadcrumbs.less +11 -9
  74. data/vendor/toolkit/twitter/bootstrap/button-groups.less +167 -152
  75. data/vendor/toolkit/twitter/bootstrap/buttons.less +107 -169
  76. data/vendor/toolkit/twitter/bootstrap/carousel.less +177 -65
  77. data/vendor/toolkit/twitter/bootstrap/close.less +21 -19
  78. data/vendor/toolkit/twitter/bootstrap/code.less +38 -30
  79. data/vendor/toolkit/twitter/bootstrap/component-animations.less +15 -4
  80. data/vendor/toolkit/twitter/bootstrap/dropdowns.less +120 -152
  81. data/vendor/toolkit/twitter/bootstrap/forms.less +470 -547
  82. data/vendor/toolkit/twitter/bootstrap/glyphicons.less +305 -0
  83. data/vendor/toolkit/twitter/bootstrap/grid.less +74 -11
  84. data/vendor/toolkit/twitter/bootstrap/input-groups.less +171 -0
  85. data/vendor/toolkit/twitter/bootstrap/jumbotron.less +54 -0
  86. data/vendor/toolkit/twitter/bootstrap/labels.less +64 -0
  87. data/vendor/toolkit/twitter/bootstrap/list-group.less +130 -0
  88. data/vendor/toolkit/twitter/bootstrap/media.less +40 -29
  89. data/vendor/toolkit/twitter/bootstrap/mixins.less +37 -699
  90. data/vendor/toolkit/twitter/bootstrap/mixins/alerts.less +14 -0
  91. data/vendor/toolkit/twitter/bootstrap/mixins/background-variant.less +9 -0
  92. data/vendor/toolkit/twitter/bootstrap/mixins/border-radius.less +18 -0
  93. data/vendor/toolkit/twitter/bootstrap/mixins/buttons.less +65 -0
  94. data/vendor/toolkit/twitter/bootstrap/mixins/center-block.less +7 -0
  95. data/vendor/toolkit/twitter/bootstrap/mixins/clearfix.less +22 -0
  96. data/vendor/toolkit/twitter/bootstrap/mixins/forms.less +85 -0
  97. data/vendor/toolkit/twitter/bootstrap/mixins/gradients.less +59 -0
  98. data/vendor/toolkit/twitter/bootstrap/mixins/grid-framework.less +91 -0
  99. data/vendor/toolkit/twitter/bootstrap/mixins/grid.less +122 -0
  100. data/vendor/toolkit/twitter/bootstrap/mixins/hide-text.less +21 -0
  101. data/vendor/toolkit/twitter/bootstrap/mixins/image.less +33 -0
  102. data/vendor/toolkit/twitter/bootstrap/mixins/labels.less +12 -0
  103. data/vendor/toolkit/twitter/bootstrap/mixins/list-group.less +30 -0
  104. data/vendor/toolkit/twitter/bootstrap/mixins/nav-divider.less +10 -0
  105. data/vendor/toolkit/twitter/bootstrap/mixins/nav-vertical-align.less +9 -0
  106. data/vendor/toolkit/twitter/bootstrap/mixins/opacity.less +8 -0
  107. data/vendor/toolkit/twitter/bootstrap/mixins/pagination.less +24 -0
  108. data/vendor/toolkit/twitter/bootstrap/mixins/panels.less +24 -0
  109. data/vendor/toolkit/twitter/bootstrap/mixins/progress-bar.less +10 -0
  110. data/vendor/toolkit/twitter/bootstrap/mixins/reset-filter.less +8 -0
  111. data/vendor/toolkit/twitter/bootstrap/mixins/reset-text.less +18 -0
  112. data/vendor/toolkit/twitter/bootstrap/mixins/resize.less +6 -0
  113. data/vendor/toolkit/twitter/bootstrap/mixins/responsive-visibility.less +15 -0
  114. data/vendor/toolkit/twitter/bootstrap/mixins/size.less +10 -0
  115. data/vendor/toolkit/twitter/bootstrap/mixins/tab-focus.less +9 -0
  116. data/vendor/toolkit/twitter/bootstrap/mixins/table-row.less +28 -0
  117. data/vendor/toolkit/twitter/bootstrap/mixins/text-emphasis.less +9 -0
  118. data/vendor/toolkit/twitter/bootstrap/mixins/text-overflow.less +8 -0
  119. data/vendor/toolkit/twitter/bootstrap/mixins/vendor-prefixes.less +227 -0
  120. data/vendor/toolkit/twitter/bootstrap/modals.less +109 -54
  121. data/vendor/toolkit/twitter/bootstrap/navbar.less +547 -384
  122. data/vendor/toolkit/twitter/bootstrap/navs.less +192 -359
  123. data/vendor/toolkit/twitter/bootstrap/normalize.less +424 -0
  124. data/vendor/toolkit/twitter/bootstrap/pager.less +45 -34
  125. data/vendor/toolkit/twitter/bootstrap/pagination.less +71 -105
  126. data/vendor/toolkit/twitter/bootstrap/panels.less +271 -0
  127. data/vendor/toolkit/twitter/bootstrap/popovers.less +66 -68
  128. data/vendor/toolkit/twitter/bootstrap/print.less +101 -0
  129. data/vendor/toolkit/twitter/bootstrap/progress-bars.less +40 -75
  130. data/vendor/toolkit/twitter/bootstrap/responsive-embed.less +35 -0
  131. data/vendor/toolkit/twitter/bootstrap/responsive-utilities.less +177 -42
  132. data/vendor/toolkit/twitter/bootstrap/scaffolding.less +131 -23
  133. data/vendor/toolkit/twitter/bootstrap/tables.less +172 -182
  134. data/vendor/toolkit/twitter/bootstrap/theme.less +291 -0
  135. data/vendor/toolkit/twitter/bootstrap/thumbnails.less +27 -44
  136. data/vendor/toolkit/twitter/bootstrap/tooltip.less +58 -27
  137. data/vendor/toolkit/twitter/bootstrap/type.less +209 -154
  138. data/vendor/toolkit/twitter/bootstrap/utilities.less +32 -7
  139. data/vendor/toolkit/twitter/bootstrap/variables.less +784 -216
  140. data/vendor/toolkit/twitter/bootstrap/wells.less +7 -7
  141. metadata +156 -141
  142. data/app/assets/fonts/fontawesome-webfont.eot +0 -0
  143. data/app/assets/fonts/fontawesome-webfont.svg +0 -399
  144. data/app/assets/fonts/fontawesome-webfont.ttf +0 -0
  145. data/app/assets/fonts/fontawesome-webfont.woff +0 -0
  146. data/app/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
  147. data/app/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
  148. data/app/assets/javascripts/twitter/bootstrap/bootstrap-affix.js +0 -117
  149. data/app/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +0 -99
  150. data/app/assets/javascripts/twitter/bootstrap/bootstrap-button.js +0 -105
  151. data/app/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +0 -207
  152. data/app/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +0 -167
  153. data/app/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +0 -169
  154. data/app/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +0 -247
  155. data/app/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +0 -114
  156. data/app/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +0 -162
  157. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +0 -144
  158. data/app/assets/javascripts/twitter/bootstrap/bootstrap-tooltip.js +0 -361
  159. data/app/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +0 -60
  160. data/app/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +0 -335
  161. data/app/assets/stylesheets/twitter-bootstrap-static/fontawesome.css.erb +0 -787
  162. data/lib/twitter/bootstrap/rails/twitter-bootstrap-breadcrumbs.rb +0 -42
  163. data/test/lib/breadcrumbs_test.rb +0 -75
  164. data/test/test_helper.rb +0 -11
  165. data/vendor/static-source/fontawesome.less +0 -9
  166. data/vendor/toolkit/fontawesome/bootstrap.less +0 -84
  167. data/vendor/toolkit/fontawesome/core.less +0 -129
  168. data/vendor/toolkit/fontawesome/extras.less +0 -93
  169. data/vendor/toolkit/fontawesome/font-awesome-ie7.less +0 -1953
  170. data/vendor/toolkit/fontawesome/font-awesome.less +0 -33
  171. data/vendor/toolkit/fontawesome/icons.less +0 -381
  172. data/vendor/toolkit/fontawesome/mixins.less +0 -48
  173. data/vendor/toolkit/fontawesome/path.less +0 -14
  174. data/vendor/toolkit/fontawesome/variables.less +0 -735
  175. data/vendor/toolkit/twitter/bootstrap/accordion.less +0 -34
  176. data/vendor/toolkit/twitter/bootstrap/hero-unit.less +0 -25
  177. data/vendor/toolkit/twitter/bootstrap/labels-badges.less +0 -84
  178. data/vendor/toolkit/twitter/bootstrap/layouts.less +0 -16
  179. data/vendor/toolkit/twitter/bootstrap/reset.less +0 -216
  180. data/vendor/toolkit/twitter/bootstrap/responsive-1200px-min.less +0 -28
  181. data/vendor/toolkit/twitter/bootstrap/responsive-767px-max.less +0 -193
  182. data/vendor/toolkit/twitter/bootstrap/responsive-768px-979px.less +0 -19
  183. data/vendor/toolkit/twitter/bootstrap/responsive-navbar.less +0 -189
  184. data/vendor/toolkit/twitter/bootstrap/responsive.less +0 -48
  185. data/vendor/toolkit/twitter/bootstrap/sprites.less +0 -197
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 95c5367e90ff42aa6e3e6f34f994dfe7b5bf3385
4
+ data.tar.gz: 94de97bcb6dc03f1c2cfd67a4f0500816cf0ea79
5
+ SHA512:
6
+ metadata.gz: a00ee57e25ff5b706d2075b0226f101eb4932001ec4f8dc088e488c99ac3c9d3ff27e4a4e51308ea0c2f8b809fd76621abb05630719ce103f39a9f3dc8e864cc
7
+ data.tar.gz: 650348b073474697a89bd68085524cad957b364c146e91d4da876d1b579707c79636b96a2f803602a72926e6c79ad855a5454dfb6e29a8e8946f2b6567c765f7
data/README.md CHANGED
@@ -1,50 +1,42 @@
1
- # Twitter Bootstrap for Rails 3.1 Asset Pipeline
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.
1
+ # Twitter Bootstrap for Rails 5 and Rails 4 Asset Pipeline
3
2
 
4
- twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
3
+ Bootstrap is a toolkit from Twitter designed to kickstart development of web apps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
5
4
 
6
- [![Gem Version](https://badge.fury.io/rb/twitter-bootstrap-rails.png)][gem]
7
- [![Build Status](https://secure.travis-ci.org/seyhunak/twitter-bootstrap-rails.png?branch=master)][travis]
8
- [![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.png?travis)][gemnasium]
9
- [![Code Climate](https://codeclimate.com/github/seyhunak/twitter-bootstrap-rails.png)][codeclimate]
10
- [![Coverage Status](https://coveralls.io/repos/seyhunak/twitter-bootstrap-rails/badge.png?branch=master)][coveralls]
5
+ twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails Asset Pipeline (Rails 4, 3.x versions are supported)
11
6
 
12
- [gem]: https://rubygems.org/gems/twitter-bootstrap-rails
13
- [travis]: http://travis-ci.org/seyhunak/twitter-bootstrap-rails
14
- [gemnasium]: https://gemnasium.com/seyhunak/twitter-bootstrap-rails
15
- [codeclimate]: https://codeclimate.com/github/seyhunak/twitter-bootstrap-rails
16
- [coveralls]: https://coveralls.io/r/seyhunak/twitter-bootstrap-rails
7
+ [![Gem Version](https://badge.fury.io/rb/twitter-bootstrap-rails.svg)](http://badge.fury.io/rb/twitter-bootstrap-rails)
8
+ [![Dependency Status](https://gemnasium.com/seyhunak/twitter-bootstrap-rails.svg?travis)](https://gemnasium.com/seyhunak/twitter-bootstrap-rails?travis)
9
+ [![Code Climate](https://codeclimate.com/github/seyhunak/twitter-bootstrap-rails/badges/gpa.svg)](https://codeclimate.com/github/seyhunak/twitter-bootstrap-rails?branch=master)
10
+ [![Coverage Status](https://coveralls.io/repos/seyhunak/twitter-bootstrap-rails/badge.png?branch=master)](https://coveralls.io/repos/seyhunak/twitter-bootstrap-rails/badge.png?branch=master)
11
+ [![GitHub stars](https://img.shields.io/github/stars/seyhunak/twitter-bootstrap-rails.svg)](https://github.com/seyhunak/twitter-bootstrap-rails/stargazers)
12
+ [![GitHub forks](https://img.shields.io/github/forks/seyhunak/twitter-bootstrap-rails.svg)](https://github.com/seyhunak/twitter-bootstrap-rails/network)
13
+ [![GitHub issues](https://img.shields.io/github/issues/seyhunak/twitter-bootstrap-rails.svg)](https://github.com/seyhunak/twitter-bootstrap-rails/issues)
17
14
 
18
15
  ## Screencasts
19
16
  #### Installing twitter-bootstrap-rails, generators, usage and more
20
17
  <img width="180" height="35" src="http://oi49.tinypic.com/s5wn05.jpg"></img>
21
18
 
22
- Screencasts provided by <a href="http://railscasts.com">Railscasts</a> (Ryan Bates)
19
+ Screencasts provided by <a href="http://railscasts.com">RailsCasts</a> (Ryan Bates)
23
20
 
24
21
  [Twitter Bootstrap Basics](http://railscasts.com/episodes/328-twitter-bootstrap-basics "Twitter Bootstrap Basics")
25
- in this episode you will learn how to include Twitter Bootstrap into Rails application with the twitter-bootstrap-rails gem.
22
+ in this episode you will learn how to include Bootstrap into Rails application with the twitter-bootstrap-rails gem.
26
23
 
27
24
  [More on Twitter Bootstrap](http://railscasts.com/episodes/329-more-on-twitter-bootstrap "More on Twitter Bootstrap")
28
- in this episode continues on the Twitter Bootstrap project showing how to display flash messages, add form validations with SimpleForm, customize layout with variables, and switch to using Sass.
25
+ in this episode continues on the Bootstrap project showing how to display flash messages, add form validations with SimpleForm, customise layout with variables, and switch to using Sass.
29
26
  (Note: This episode is pro episode)
30
27
 
31
-
32
- ## Example Application
33
- An example application is available at [toadkicker/teststrap](https://github.com/toadkicker/teststrap). You can view it running on heroku [here.](http://teststrap.herokuapp.com/) Contributions welcome.
34
-
35
-
36
28
  ## Installing the Gem
37
29
 
38
- The [Twitter Bootstrap Rails gem](http://rubygems.org/gems/twitter-bootstrap-rails) can provide the Twitter Bootstrap stylesheets in two ways.
30
+ The [Twitter Bootstrap Rails gem](http://rubygems.org/gems/twitter-bootstrap-rails) can provide the Bootstrap stylesheets in two ways.
39
31
 
40
- The plain CSS way is how Twitter Bootstrap is provided on [the official website](http://twitter.github.com/bootstrap/).
32
+ The plain CSS way is how Bootstrap is provided on [the official website](http://twbs.github.io/bootstrap/).
41
33
 
42
- The [Less](http://lesscss.org/) way provides more customisation options, like changing theme colors, and provides useful Less mixins for your code, but requires the
34
+ The [Less](http://lesscss.org/) way provides more customisation options, like changing theme colors and provides useful Less mixins for your code, but requires the
43
35
  Less gem and the Ruby Racer Javascript runtime (not available on Microsoft Windows).
44
36
 
45
37
  ### Installing the Less stylesheets
46
38
 
47
- To use Less stylesheets, you'll need the [less-rails gem](http://rubygems.org/gems/less-rails), and one of [Javascript runtimes supported by CommonJS](https://github.com/cowboyd/commonjs.rb#supported-runtimes).
39
+ To use Less stylesheets, you'll need the [less-rails gem](http://rubygems.org/gems/less-rails), and one of [JavaScript runtimes supported by CommonJS](https://github.com/cowboyd/commonjs.rb#supported-runtimes).
48
40
 
49
41
  Include these lines in the Gemfile to install the gems from [RubyGems.org](http://rubygems.org):
50
42
 
@@ -68,6 +60,10 @@ Then run the bootstrap generator to add Bootstrap includes into your assets:
68
60
 
69
61
  rails generate bootstrap:install less
70
62
 
63
+ If you need to skip coffeescript replacement into app generators, use:
64
+
65
+ rails generate bootstrap:install --no-coffeescript
66
+
71
67
  ### Installing the CSS stylesheets
72
68
 
73
69
  If you don't need to customize the stylesheets using Less, the only gem you need is the `twitter-bootstrap-rails` gem:
@@ -82,31 +78,19 @@ After running `bundle install`, run the generator:
82
78
 
83
79
  ## Generating layouts and views
84
80
 
85
- You can run following generators to get started with Twitter Bootstrap quickly.
81
+ You can run following generators to get started with Bootstrap quickly.
86
82
 
87
83
 
88
- Layout (generates Twitter Bootstrap compatible layout) - (Haml and Slim supported)
84
+ Layout (generates Bootstrap compatible layout) - (Haml and Slim supported)
89
85
 
90
86
 
91
87
  Usage:
92
88
 
93
89
 
94
- rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
95
-
96
-
97
- Example of a fixed layout:
98
-
90
+ rails g bootstrap:layout [LAYOUT_NAME]
99
91
 
100
- rails g bootstrap:layout application fixed
101
92
 
102
-
103
- Example of a responsive layout:
104
-
105
-
106
- rails g bootstrap:layout application fluid
107
-
108
-
109
- Themed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)
93
+ Themed (generates Bootstrap compatible scaffold views.) - (Haml and Slim supported)
110
94
 
111
95
 
112
96
  Usage:
@@ -142,33 +126,65 @@ You have to require Bootstrap LESS (bootstrap_and_overrides.css.less) in your ap
142
126
 
143
127
  To use individual components from bootstrap, your bootstrap_and_overrides.less could look like this:
144
128
 
145
- ```css
146
- @import "twitter/bootstrap/reset.less";
129
+ ```less
130
+ // Core variables and mixins
147
131
  @import "twitter/bootstrap/variables.less";
148
132
  @import "twitter/bootstrap/mixins.less";
133
+
134
+ // Reset and dependencies
135
+ @import "twitter/bootstrap/normalize.less";
136
+ @import "twitter/bootstrap/print.less";
137
+ //@import "twitter/bootstrap/glyphicons.less"; // Excludes glyphicons
138
+
139
+ // Core CSS
149
140
  @import "twitter/bootstrap/scaffolding.less";
150
- @import "twitter/bootstrap/grid.less";
151
- @import "twitter/bootstrap/layouts.less";
152
141
  @import "twitter/bootstrap/type.less";
142
+ @import "twitter/bootstrap/code.less";
143
+ @import "twitter/bootstrap/grid.less";
144
+ @import "twitter/bootstrap/tables.less";
153
145
  @import "twitter/bootstrap/forms.less";
154
- @import "twitter/bootstrap/wells.less";
155
- @import "twitter/bootstrap/component-animations.less";
156
146
  @import "twitter/bootstrap/buttons.less";
157
- @import "twitter/bootstrap/close.less";
147
+
148
+ // Components
149
+ @import "twitter/bootstrap/component-animations.less";
150
+ @import "twitter/bootstrap/dropdowns.less";
151
+ @import "twitter/bootstrap/button-groups.less";
152
+ @import "twitter/bootstrap/input-groups.less";
158
153
  @import "twitter/bootstrap/navs.less";
159
154
  @import "twitter/bootstrap/navbar.less";
160
- @import "twitter/bootstrap/labels-badges.less";
161
- @import "twitter/bootstrap/hero-unit.less";
155
+ @import "twitter/bootstrap/breadcrumbs.less";
156
+ @import "twitter/bootstrap/pagination.less";
157
+ @import "twitter/bootstrap/pager.less";
158
+ @import "twitter/bootstrap/labels.less";
159
+ @import "twitter/bootstrap/badges.less";
160
+ @import "twitter/bootstrap/jumbotron.less";
161
+ @import "twitter/bootstrap/thumbnails.less";
162
+ @import "twitter/bootstrap/alerts.less";
163
+ @import "twitter/bootstrap/progress-bars.less";
164
+ @import "twitter/bootstrap/media.less";
165
+ @import "twitter/bootstrap/list-group.less";
166
+ @import "twitter/bootstrap/panels.less";
167
+ @import "twitter/bootstrap/responsive-embed.less";
168
+ @import "twitter/bootstrap/wells.less";
169
+ @import "twitter/bootstrap/close.less";
170
+
171
+ // Components w/ JavaScript
172
+ @import "twitter/bootstrap/modals.less";
173
+ @import "twitter/bootstrap/tooltip.less";
174
+ @import "twitter/bootstrap/popovers.less";
175
+ @import "twitter/bootstrap/carousel.less";
176
+
177
+ // Utility classes
162
178
  @import "twitter/bootstrap/utilities.less";
163
- @import "twitter/bootstrap/responsive";
179
+ @import "twitter/bootstrap/responsive-utilities.less";
164
180
  ```
165
181
 
166
182
  If you'd like to alter Bootstrap's own variables, or define your LESS
167
183
  styles inheriting Bootstrap's mixins, you can do so inside bootstrap_and_overrides.css.less:
168
184
 
169
185
 
170
- ```css
171
- @linkColor: #ff0000;
186
+ ```less
187
+ @link-color: #ff0000;
172
188
  ```
173
189
 
174
190
  ### SASS
@@ -185,50 +201,28 @@ If this is the case, you **must** use @import instead of `*=` in your manifest f
185
201
 
186
202
  ### Icons
187
203
 
188
- By default, this gem overrides standard Bootstraps's Glyphicons with Font Awesome (http://fortawesome.github.com/Font-Awesome/).
204
+ By default, this gem (when using less generator) won't enable standard Bootstraps's Glyphicons.
189
205
 
190
- This should appear inside _bootstrap_and_overrides *(based on you twitter-bootstrap-rails version)*
206
+ If you would like to restore the default Glyphicons, inside the generated `bootstrap_and_overrides.css.less` uncomment these lines:
191
207
 
192
- **From 2.2.7**
193
-
194
- ```css
195
- // Font Awesome
196
- @fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
197
- @fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot?#iefix");
198
- @fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
199
- @fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
200
- @fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
201
- @import "fontawesome/font-awesome";
208
+ ```less
209
+ // Glyphicons are not required by default, uncomment the following lines to enable them.
210
+ @glyphiconsEotPath: font-url("glyphicons-halflings-regular.eot");
211
+ @glyphiconsEotPath_iefix: font-url("glyphicons-halflings-regular.eot?#iefix");
212
+ @glyphiconsWoffPath: font-url("glyphicons-halflings-regular.woff");
213
+ @glyphiconsTtfPath: font-url("glyphicons-halflings-regular.ttf");
214
+ @glyphiconsSvgPath: font-url("glyphicons-halflings-regular.svg#glyphicons_halflingsregular");
215
+
216
+ @import "twitter/bootstrap/glyphicons.less";
202
217
  ```
203
218
 
204
- **Before 2.2.7**
205
-
206
- ```css
207
- // Font Awesome
208
- @fontAwesomeEotPath: "/assets/fontawesome-webfont.eot";
209
- @fontAwesomeEotPath_iefix: "/assets/fontawesome-webfont.eot?#iefix";
210
- @fontAwesomeWoffPath: "/assets/fontawesome-webfont.woff";
211
- @fontAwesomeTtfPath: "/assets/fontawesome-webfont.ttf";
212
- @fontAwesomeSvgPath: "/assets/fontawesome-webfont.svg#fontawesomeregular";
213
- @import "fontawesome";
214
- ```
219
+ This gem was used to bundle the excellent [Font-Awesome](http://fortawesome.github.io/Font-Awesome/) library.
220
+ However that was another maintenance effort that is not worth to do here.
215
221
 
216
- If you would like to restore the default Glyphicons, inside the _bootstrap_and_overrides.css.less_ remove the FontAwesome declaration and uncomment the line:
222
+ For Rails projects that need it there is the [font-awesome-rails gem](https://github.com/bokmann/font-awesome-rails) that
223
+ provides same functionality that this gems was used to provide and it also have some other interesting features (e.g. view helpers).
217
224
 
218
- ```less
219
- // Font Awesome
220
- // @fontAwesomeEotPath: asset-url("fontawesome-webfont.eot");
221
- // @fontAwesomeEotPath_iefix: asset-url("fontawesome-webfont.eot?#iefix");
222
- // @fontAwesomeWoffPath: asset-url("fontawesome-webfont.woff");
223
- // @fontAwesomeTtfPath: asset-url("fontawesome-webfont.ttf");
224
- // @fontAwesomeSvgPath: asset-url("fontawesome-webfont.svg#fontawesomeregular");
225
- // @import "fontawesome/font-awesome";
226
-
227
- // Glyphicons
228
- @import "twitter/bootstrap/sprites.less";
229
- ```
230
-
231
- ## Using Javascripts
225
+ ## Using JavaScript
232
226
 
233
227
  Require Bootstrap JS (bootstrap.js) in your application.js
234
228
 
@@ -236,7 +230,7 @@ Require Bootstrap JS (bootstrap.js) in your application.js
236
230
  //= require twitter/bootstrap
237
231
 
238
232
  $(function(){
239
- /* Your javascripts goes here... */
233
+ /* Your JavaScript goes here... */
240
234
  });
241
235
  ```
242
236
 
@@ -245,18 +239,18 @@ If you want to customize what is loaded, your application.js would look somethin
245
239
  ```js
246
240
  #= require jquery
247
241
  #= require jquery_ujs
248
- #= require twitter/bootstrap/bootstrap-transition
249
- #= require twitter/bootstrap/bootstrap-alert
250
- #= require twitter/bootstrap/bootstrap-modal
251
- #= require twitter/bootstrap/bootstrap-button
252
- #= require twitter/bootstrap/bootstrap-collapse
242
+ #= require twitter/bootstrap/transition
243
+ #= require twitter/bootstrap/alert
244
+ #= require twitter/bootstrap/modal
245
+ #= require twitter/bootstrap/button
246
+ #= require twitter/bootstrap/collapse
253
247
  ```
254
248
 
255
249
  ...and so on for each bootstrap js component.
256
250
 
257
- ## Using Coffeescript (optionally)
251
+ ## Using CoffeeScript (optionally)
258
252
 
259
- Using Twitter Bootstrap with the CoffeeScript is easy.
253
+ Using Bootstrap with the CoffeeScript is easy.
260
254
  twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
261
255
  to /app/assets/javascripts/ folder.
262
256
 
@@ -270,22 +264,23 @@ jQuery ->
270
264
 
271
265
  ### Modal Helper
272
266
  You can create modals easily using the following example. The header, body, and footer all accept content_tag or plain html.
273
- The href of the button to launch the modal must matche the id of the modal dialog.
267
+ The href of the button to launch the modal must match the id of the modal dialog. It also accepts a block for the header, body, and footer. If you are getting a complaint about the modal_helper unable to merge a hash it is due to this.
274
268
 
275
- ````
276
- <%= content_tag :a, "Modal", :href => "#modal", :class => 'btn', :data => {:toggle => 'modal'} %>
269
+ ```erb
270
+ <%= content_tag :a, "Modal", href: "#modal", class: 'btn', data: {toggle: 'modal'} %>
277
271
 
278
- <%= modal_dialog :id => "modal",
279
- :header => { :show_close => true, :dismiss => 'modal', :title => 'Modal header' },
280
- :body => 'This is the body',
281
- :footer => content_tag(:button, 'Save', :class => 'btn') %>
282
- ````
272
+ <%= modal_dialog id: "modal",
273
+ header: { show_close: true, dismiss: 'modal', title: 'Modal header' },
274
+ body: { content: 'This is the body' },
275
+ footer: { content: content_tag(:button, 'Save', class: 'btn') } %>
276
+
277
+ ```
283
278
 
284
279
  ### Navbar Helper
285
280
  It should let you write things like:
286
281
 
287
- ````
288
- <%= nav_bar :fixed => :top, :brand => "Fashionable Clicheizr 2.0", :responsive => true do %>
282
+ ```erb
283
+ <%= nav_bar fixed: :top, brand: "Fashionable Clicheizr 2.0", responsive: true do %>
289
284
  <%= menu_group do %>
290
285
  <%= menu_item "Home", root_path %>
291
286
  <%= menu_divider %>
@@ -300,11 +295,11 @@ It should let you write things like:
300
295
  <%= menu_item "About Us", about_us_path %>
301
296
  <%= menu_item "Contact", contact_path %>
302
297
  <% end %>
303
- <%= menu_group :pull => :right do %>
298
+ <%= menu_group pull: :right do %>
304
299
  <% if current_user %>
305
300
  <%= menu_item "Log Out", log_out_path %>
306
301
  <% else %>
307
- <%= form_for @user, :url => session_path(:user), html => {:class=> "navbar-form pull-right"} do |f| -%>
302
+ <%= form_for @user, url: session_path(:user), html => {class: "navbar-form pull-right"} do |f| -%>
308
303
  <p><%= f.text_field :email %></p>
309
304
  <p><%= f.password_field :password %></p>
310
305
  <p><%= f.submit "Sign in" %></p>
@@ -312,109 +307,105 @@ It should let you write things like:
312
307
  <% end %>
313
308
  <% end %>
314
309
  <% end %>
315
- ````
310
+ ```
316
311
 
317
312
  ### Navbar scaffolding
318
313
 
319
314
  In your view file (most likely application.html.erb) to get a basic navbar set up you need to do this:
320
315
 
321
- ````
322
- <%= nav_bar %>
323
- ````
316
+ ```erb
317
+ <%= nav_bar %>
318
+ ```
324
319
 
325
320
  Which will render:
326
321
 
327
- <div class="navbar">
328
- <div class="navbar-inner">
329
- <div class="container">
330
- </div>
331
- </div>
332
- </div>
333
-
322
+ ```html
323
+ <div class="navbar">
324
+ <div class="container">
325
+ </div>
326
+ </div>
327
+ ```
334
328
 
335
329
  ### Fixed navbar
336
330
 
337
331
  If you want the navbar to stick to the top of the screen, pass in the option like this:
338
332
 
339
- ````
340
- <%= nav_bar :fixed => :top %>
341
- ````
333
+ ```erb
334
+ <%= nav_bar fixed: :top %>
335
+ ```
342
336
 
343
337
  To render:
344
338
 
345
- <div class="navbar navbar-fixed-top">
346
- <div class="navbar-inner">
347
- <div class="container">
348
- </div>
349
- </div>
350
- </div>
339
+ ```html
340
+ <div class="navbar navbar-fixed-top">
341
+ <div class="container">
342
+ </div>
343
+ </div>
344
+ ```
351
345
 
352
346
  ### Static navbar
353
347
 
354
348
  If you want a full-width navbar that scrolls away with the page, pass in the option like this:
355
349
 
356
- ````
357
- <%= nav_bar :static => :top %>
358
- ````
350
+ ```erb
351
+ <%= nav_bar static: :top %>
352
+ ```
359
353
 
360
354
  To render:
361
355
 
362
- <div class="navbar navbar-static-top">
363
- <div class="navbar-inner">
364
- <div class="container">
365
- </div>
366
- </div>
367
- </div>
368
-
356
+ ```html
357
+ <div class="navbar navbar-static-top">
358
+ <div class="container">
359
+ </div>
360
+ </div>
361
+ ```
369
362
 
370
363
  ### Brand name
371
364
 
372
365
  Add the name of your site on the left hand edge of the navbar. By default, it will link to root_url. Passing a brand_link option will set the url to whatever you want.
373
366
 
374
- ````
375
- <%= nav_bar :brand => "We're sooo web 2.0alizr", :brand_link => account_dashboard_path %>
376
- ````
367
+ ```erb
368
+ <%= nav_bar brand: "We're sooo web 2.0alizr", brand_link: account_dashboard_path %>
369
+ ```
377
370
 
378
371
  Which will render:
379
372
 
380
- <div class="navbar">
381
- <div class="navbar-inner">
382
- <div class="container">
383
- <a class="brand" href="/accounts/dashboard">
384
- We're sooo web 2.0alizr
385
- </a>
386
- </div>
387
- </div>
388
- </div>
389
-
373
+ ```html
374
+ <div class="navbar">
375
+ <div class="container">
376
+ <a class="navbar-brand" href="/accounts/dashboard">
377
+ We're sooo web 2.0alizr
378
+ </a>
379
+ </div>
380
+ </div>
381
+ ```
390
382
 
391
383
  ### Optional responsive variation
392
384
 
393
385
  If you want the responsive version of the navbar to work (One that shrinks down on mobile devices etc.), you need to pass this option:
394
386
 
395
- ````
396
- <%= nav_bar :responsive => true %>
397
- ````
398
- Which renders the html quite differently:
387
+ ```erb
388
+ <%= nav_bar responsive: true %>
389
+ ```
399
390
 
391
+ Which renders the html quite differently:
400
392
 
401
- <div class="navbar">
402
- <div class="navbar-inner">
403
- <div class="container">
404
- <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
405
- <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
406
- <span class="icon-bar"></span>
407
- <span class="icon-bar"></span>
408
- <span class="icon-bar"></span>
409
- </a>
410
- <!-- Everything in here gets hidden at 940px or less -->
411
- <div class="nav-collapse">
412
- <!-- menu items gets rendered here instead -->
413
- </div>
414
- </div>
415
- </div>
393
+ ```html
394
+ <div class="navbar">
395
+ <div class="container">
396
+ <!-- .navbar-toggle is used as the toggle for collapsed navbar content -->
397
+ <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
398
+ <span class="icon-bar"></span>
399
+ <span class="icon-bar"></span>
400
+ <span class="icon-bar"></span>
401
+ </button>
402
+ <!-- Everything in here gets hidden at 940px or less -->
403
+ <div class="navbar-collapse collapse">
404
+ <!-- menu items gets rendered here instead -->
416
405
  </div>
417
-
406
+ </div>
407
+ </div>
408
+ ```
418
409
 
419
410
  ### Nav links
420
411
 
@@ -430,9 +421,9 @@ menu_group only takes one argument - :pull - this moves the group left or right
430
421
 
431
422
  menu_item generates a link wrapped in an li tag. It takes two arguments and an options hash. The first argument is the name (the text that will appear in the menu), and the path (which defaults to "#" if left blank). The rest of the options are passed straight through to the link_to helper, so that you can add classes, ids, methods or data tags etc.
432
423
 
433
- ````
434
- <%= nav_bar :fixed => :top, :brand => "Ninety Ten" do %>
435
- <% menu_group do %>
424
+ ```erb
425
+ <%= nav_bar fixed: :top, brand: "Ninety Ten" do %>
426
+ <%= menu_group do %>
436
427
  <%= menu_item "Home", root_path %>
437
428
  <%= menu_item "About Us", about_us_path %>
438
429
  <%= menu_item "Contact", contact_path %>
@@ -440,9 +431,9 @@ menu_item generates a link wrapped in an li tag. It takes two arguments and an o
440
431
  <% if current_user %>
441
432
  <%= menu_item "Log Out", log_out_path %>
442
433
  <% else %>
443
- <% menu_group :pull => :right do %>
434
+ <%= menu_group pull: :right do %>
444
435
  <%= menu_item "Sign Up", registration_path %>
445
- <% form_for @user, :url => session_path(:user) do |f| -%>
436
+ <%= form_for @user, url: session_path(:user) do |f| -%>
446
437
  <p><%= f.text_field :email %></p>
447
438
  <p><%= f.password_field :password %></p>
448
439
  <p><%= f.submit "Sign in" %></p>
@@ -450,13 +441,13 @@ menu_item generates a link wrapped in an li tag. It takes two arguments and an o
450
441
  <% end %>
451
442
  <% end %>
452
443
  <% end %>
453
- ````
444
+ ```
454
445
 
455
446
  ### Dropdown menus
456
447
 
457
448
  For multi-level list options, where it makes logical sense to group menu items, or simply to save space if you have a lot of pages, you can group menu items into drop down lists like this:
458
449
 
459
- ````
450
+ ```erb
460
451
  <%= nav_bar do %>
461
452
  <%= menu_item "Home", root_path %>
462
453
 
@@ -470,14 +461,14 @@ For multi-level list options, where it makes logical sense to group menu items,
470
461
  <%= menu_item "About Us", about_us_path %>
471
462
  <%= menu_item "Contact", contact_path %>
472
463
  <% end %>
473
- ````
464
+ ```
474
465
 
475
466
  ### Dividers
476
467
 
477
468
  Dividers are just vertical bars that visually separate logically disparate groups of menu items
478
469
 
479
- ````
480
- <%= nav_bar :fixed => :bottom do %>
470
+ ```erb
471
+ <%= nav_bar fixed: :bottom do %>
481
472
  <%= menu_item "Home", root_path %>
482
473
  <%= menu_item "About Us", about_us_path %>
483
474
  <%= menu_item "Contact", contact_path %>
@@ -488,7 +479,7 @@ Dividers are just vertical bars that visually separate logically disparate group
488
479
  <%= menu_item "Account Settings", edit_user_account_path(current_user, @account) %>
489
480
  <%= menu_item "Log Out", log_out_path %>
490
481
  <% end %>
491
- ````
482
+ ```
492
483
 
493
484
  ### Forms in navbar
494
485
 
@@ -496,23 +487,23 @@ At the moment - this is just a how to...
496
487
 
497
488
  You need to add this class to the form itself (Different form builders do this in different ways - please check out the relevant docs)
498
489
 
499
- ````css
490
+ ```css
500
491
  .navbar-form
501
- ````
492
+ ```
502
493
  To pull the form left or right, add either of these classes:
503
- ````css
494
+ ```css
504
495
  .pull-left
505
496
  .pull-right
506
- ````
497
+ ```
507
498
 
508
499
  If you want the Bootstrap search box (I think it just rounds the corners), use:
509
- ````css
500
+ ```css
510
501
  .navbar-search
511
- ````
502
+ ```
512
503
  Instead of:
513
- ````css
504
+ ```css
514
505
  .navbar-form
515
- ````
506
+ ```
516
507
 
517
508
  To change the size of the form fields, use .span2 (or however many span widths you want) to the input itself.
518
509
 
@@ -520,49 +511,63 @@ To change the size of the form fields, use .span2 (or however many span widths y
520
511
 
521
512
  You can shift things to the left or the right across the nav bar. It's easiest to do this on grouped menu items:
522
513
 
523
- ````
524
- <%= nav_bar :fixed => :bottom do %>
514
+ ```erb
515
+ <%= nav_bar fixed: :bottom do %>
525
516
  <% menu_group do %>
526
517
  <%= menu_item "Home", root_path %>
527
518
  <%= menu_item "About Us", about_us_path %>
528
519
  <%= menu_item "Contact", contact_path %>
529
520
  <% end %>
530
- <% menu_group :pull => :right do %>
521
+ <% menu_group pull: :right do %>
531
522
  <%= menu_item "Edit Profile", edit_user_path(current_user) %>
532
523
  <%= menu_item "Account Settings", edit_user_account_path(current_user, @account) %>
533
524
  <%= menu_item "Log Out", log_out_path %>
534
525
  <% end %>
535
526
  <% end %>
536
- ````
527
+ ```
537
528
 
538
529
  ### Text in the navbar
539
530
 
540
531
  If you want to put regular plain text in the navbar anywhere, you do it like this:
541
532
 
542
- ````
543
- <%= nav_bar :brand => "Apple" do %>
533
+ ```erb
534
+ <%= nav_bar brand: "Apple" do %>
544
535
  <%= menu_text "We make shiny things" %>
545
536
  <%= menu_item "Home", root_path %>
546
537
  <%= menu_item "About Us", about_us_path %>
547
538
  <% end %>
548
- ````
549
- It also takes the :pull option to drag it to the left or right.
539
+ ```
550
540
 
541
+ It also takes the :pull option to drag it to the left or right.
551
542
 
552
543
  ### Flash helper
553
544
 
554
- Add flash helper `<%= bootstrap_flash %>` to your layout (built-in with layout generator)
545
+ Add flash helper `<%= bootstrap_flash %>` to your layout (built-in with layout generator).
546
+ You can pass the attributes you want to add to the main div returned: `<%= bootstrap_flash(class: "extra-class", id: "your-id") %>`
547
+
555
548
 
556
549
  ### Breadcrumbs Helpers
557
550
 
558
- *Notice* If your application is using [breadcrumbs-on-rails](https://github.com/weppos/breadcrumbs_on_rails) you will have a namespace collision with the add_breadcrumb method.
559
- You do not need to use these breadcrumb gems since this gem provides the same functionality out of the box without the additional dependency.
551
+ *Notice* If your application is using [breadcrumbs-on-rails](https://github.com/weppos/breadcrumbs_on_rails) you will have a namespace collision with the add_breadcrumb method. For this reason if breadcrumbs-on-rails is detected in `Gemfile` gem methods will be accessible using `boostrap` prefix, i.e. `render_bootstrap_breadcrumbs` and `add_bootstrap_breadcrumb`
552
+
553
+ Usually you do not need to use these breadcrumb gems since this gem provides the same functionality out of the box without the additional dependency.
554
+
555
+ However if there are some `breadcrumbs-on-rails` features you need to keep you can still use them and use this gem with the prefixes explained above.
560
556
 
561
557
  Add breadcrumbs helper `<%= render_breadcrumbs %>` to your layout.
558
+ You can also specify a divider for it like this: `<%= render_breadcrumbs('>') %>` (default divider is `/`).
559
+ If you do not need dividers at all you can use `nil`: `<%= render_breadcrumbs(nil) %>`.
560
+
561
+ Full example:
562
+ ```ruby
563
+
564
+ render_breadcrumbs(" / ", { class: '', item_class: '', divider_class: '', active_class: 'active' })
565
+
566
+ ```
562
567
 
563
568
  ```ruby
564
569
  class ApplicationController
565
- add_breadcrumb :index, :root_path
570
+ add_breadcrumb :root # 'root_path' will be used as url
566
571
  end
567
572
  ```
568
573
 
@@ -570,16 +575,15 @@ end
570
575
  class ExamplesController < ApplicationController
571
576
  add_breadcrumb :index, :examples_path
572
577
 
573
- def index
574
- end
575
-
576
- def show
578
+ def edit
577
579
  @example = Example.find params[:id]
578
- add_breadcrumb @example.name, example_path(@example)
579
- # add_breadcrumb :show, example_path(@example)
580
+ add_breadcrumb @example # @example.to_s as name, example_path(@example) as url
581
+ add_breadcrumb :edit, edit_example_path(@example)
580
582
  end
581
583
  end
582
584
  ```
585
+ All symbolic names translated with I18n. See [I18n Internationalization Support](#i18n-internationalization-support)
586
+ section.
583
587
 
584
588
  ### Element utility helpers
585
589
 
@@ -590,141 +594,44 @@ Badge:
590
594
 
591
595
  Label:
592
596
  ```erb
593
- <%= label('Gut!', :success) %> <span class="badge badge-success">Gut!</span>
597
+ <%= tag_label('Gut!', :success) %> <span class="label label-success">Gut!</span>
594
598
  ```
595
599
 
596
600
  Glyph:
597
601
  ```erb
598
602
  <%= glyph(:pencil) %> <i class="icon-pencil"></i>
603
+
604
+ <%= glyph(:pencil, {tag: :span}) %> <span class="icon-pencil"></span>
605
+
606
+ <%= glyph(:pencil, {class: 'foo'}) %> <i class="icon-pencil foo"></i>
599
607
  ```
600
608
 
601
- ###i18n Internationalization Support
602
- The installer creates an english translation file for you and copies it to config/locales/en.bootstrap.yml
609
+ ### I18n Internationalization Support
610
+ The installer creates an English translation file for you and copies it to config/locales/en.bootstrap.yml
603
611
 
604
612
 
605
613
  NOTE: If you are using Devise in your project, you must have a devise locale file
606
614
  for handling flash messages, even if those messages are blank. See https://github.com/plataformatec/devise/wiki/I18n
607
615
 
608
616
  ## Changelog
609
- <ul>
610
- <li>Version 0.0.5 deprecated</li>
611
- <li>Asset files updated to latest and removed version numbers</li>
612
- <li>Implemented Less::Rails Railtie to use with LESS</li>
613
- <li>Fixed railtie to only initialize Less when installed</li>
614
- <li>New branch for the static version of Bootstrap (w/o Less) - check static branch</li>
615
- <li>Added path to support heroku deploy</li>
616
- <li>Rake precompile issue fixed</li>
617
- <li>Updated asset files to 1.4.0</li>
618
- <li>Updated dependency less-rails (now requires 2.1.0)</li>
619
- <li>Added generators</li>
620
- <li>Fixed generators</li>
621
- <li>Fixed class name conflicts from (bootstrap.js.coffee)</li>
622
- <li>Fixed jquery-rails gem version dependency</li>
623
- <li>Updated asset files</li>
624
- <li>Added new generators (install, layout and themed)</li>
625
- <li>Compability to Rails 3.2</li>
626
- <li>Transitioning to 2.0</li>
627
- <li>Released gem v.2.0rc0</li>
628
- <li>Added Haml and Slim support</li>
629
- <li>Added Responsive layout support</li>
630
- <li>Fixes and release 2.0.0</li>
631
- <li>Updated to v2.0.1, versioned v2.0.1.0</li>
632
- <li>Released gem v.2.0.3</li>
633
- <li>Released gem v.2.0.4</li>
634
- <li>Released gem v.2.0.5</li>
635
- <li>Added SimpleForm support</li>
636
- <li>Added FontAwesome support</li>
637
- <li>Released gem v.2.0.6</li>
638
- <li>Released gem v.2.0.7</li>
639
- <li>Released gem v.2.0.8</li>
640
- <li>Released gem v.2.0.9 (Bootstrap 2.0.4 and FontAwesome 2.0 support)</li>
641
- <li>Released gem v.2.1.0 (JRuby support)</li>
642
- <li>Released gem v.2.1.1 (minor fixes)</li>
643
- <li>Flash block message helper added</li>
644
- <li>Released gem v.2.1.2 (minor fixes and updated to Twitter Bootstrap 2.1.0)</li>
645
- <li>Released gem v.2.1.3 (minor fixes and updated to Twitter Bootstrap 2.1.1)</li>
646
- <li>Released gem v.2.1.4 (minor fixes)</li>
647
- <li>Released gem v.2.1.5 (minor fixes, install generator detects javascript template engine, updated to Twitter Bootstrap 2.2.1)</li>
648
- <li>Released gem v.2.1.6 (minor fixes)</li>
649
- <li>Added static stylesheets support</li>
650
- <li>Released gem v.2.1.8 and updated to Twitter Bootstrap 2.2.2</li>
651
- <li>Released gem v.2.1.9</li>
652
- <li>Released gem v.2.2.0 (Font Awesome 3)</li>
653
- <li>Released gem v.2.2.1 (minor fixes and updates)</li>
654
- <li>Released gem v.2.2.2 (Bootstrap 2.3.0)</li>
655
- <li>Released gem v.2.2.3 (Minor fixes)</li>
656
- <li>Released gem v.2.2.4 (Minor fixes)</li>
657
- <li>Released gem v.2.2.5 (Bootstrap 2.3.1)</li>
658
- <li>Released gem v.2.2.6</li>
659
- <li>Released gem v.2.2.7 (Fixes)</li>
660
- <li>Releases gem v.2.2.8</li>
661
- </ul>
662
-
617
+ Please see CHANGELOG.md for more details
663
618
 
664
619
  ## Contributors & Patches & Forks
665
- <ul>
666
- <li>Ben Lovell</li>
667
- <li>Daniel Morris</li>
668
- <li>Bradly Feeley</li>
669
- <li>Guilherme Moreira</li>
670
- <li>Alex Behar</li>
671
- <li>Brandon Keene</li>
672
- <li>Anthony Corcutt</li>
673
- <li>Colin Warren</li>
674
- <li>Giovanni Cappellotto</li>
675
- <li>Masakuni Kato</li>
676
- <li>Gudleik Rasch</li>
677
- <li>Thomas Volkmar Worm</li>
678
- <li>Thiago Almeida</li>
679
- <li>Sébastien Grosjean</li>
680
- <li>Nick DeSteffen</li>
681
- <li>Christian Joudrey</li>
682
- <li>Todd Baur</li>
683
- <li>Leonid Shevtsov</li>
684
- </ul>
620
+ Please see CONTRIBUTERS.md for contributors list
685
621
 
686
622
  ## About Me
687
- Lead/ Senior Developer - Programmer @useful (Usefulideas) Istanbul / Turkey
623
+ Senior Software Developer
624
+ Istanbul / Turkey
688
625
 
689
626
  ### Contact me
690
627
  Seyhun Akyürek - seyhunak [at] gmail com
691
628
 
692
- ### Follow me
693
- <a href="http://zerply.com/seyhunak">
694
- <img width="110" height="40" src="http://zerply.com/img/welcomesteps/zerply_logo.png" />
695
- </a>
696
-
697
- (Twitter, Facebook, Linkedin, Google+, Github)
698
-
699
- http://zerply.com/seyhunak
700
-
701
- ### Endorse me
702
- <a href="http://coderwall.com/seyhunak">
703
- <img src="http://api.coderwall.com/seyhunak/endorsecount.png" />
704
- </a>
705
-
706
- ### Klout me
707
- <img src="https://addons.opera.com/media/extensions/55/14355/1.0.1-rev1/icons/icon_64x64.png"></img>
708
-
709
- Please +K my influence in Ruby on Rails on @klout
710
-
711
- http://klout.com/#/seyhunak
712
-
713
-
714
- ### Want to donate?
715
- <img src="https://www.paypalobjects.com/en_US/i/logo/PayPal_mark_50x34.gif"></img>
716
-
717
- [Want to donate for my efforts? Show your love](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W8ZLWQBREFP4U
718
- "Donate")
719
-
720
-
721
629
  ## Thanks
722
- Twitter Bootstrap and all twitter-bootstrap-rails contributors
723
- http://twitter.github.com/bootstrap
724
-
630
+ Bootstrap and all twitter-bootstrap-rails contributors
631
+ http://twbs.github.io/bootstrap
725
632
 
726
633
  ## License
727
- Copyright (c) 2012 Seyhun Akyürek
634
+ Copyright (c) 2017 (since 2012) by Seyhun Akyürek
728
635
 
729
636
  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:
730
637
  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.