twitter-bootstrap-rails 2.0 → 2.0.1
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.
- data/README.md +27 -27
- data/Rakefile +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +1 -1
- data/lib/generators/bootstrap/install/templates/bootstrap.coffee +5 -15
- data/lib/generators/bootstrap/install/templates/bootstrap.less +4 -3
- data/lib/generators/bootstrap/layout/layout_generator.rb +14 -4
- data/lib/generators/bootstrap/layout/templates/layout.html.erb +112 -49
- data/lib/generators/bootstrap/layout/templates/layout.html.haml +90 -0
- data/lib/generators/bootstrap/layout/templates/layout.html.slim +77 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.erb +1 -1
- data/lib/generators/bootstrap/themed/templates/_form.html.haml +11 -0
- data/lib/generators/bootstrap/themed/templates/_form.html.slim +11 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.haml +3 -0
- data/lib/generators/bootstrap/themed/templates/edit.html.slim +3 -0
- data/lib/generators/bootstrap/themed/templates/index.html.erb +2 -2
- data/lib/generators/bootstrap/themed/templates/index.html.haml +25 -0
- data/lib/generators/bootstrap/themed/templates/index.html.slim +25 -0
- data/lib/generators/bootstrap/themed/templates/new.html.haml +2 -0
- data/lib/generators/bootstrap/themed/templates/new.html.slim +2 -0
- data/lib/generators/bootstrap/themed/templates/show.html.erb +5 -4
- data/lib/generators/bootstrap/themed/templates/show.html.haml +9 -0
- data/lib/generators/bootstrap/themed/templates/show.html.slim +9 -0
- data/lib/generators/bootstrap/themed/themed_generator.rb +13 -13
- data/lib/twitter/bootstrap/rails/version.rb +1 -1
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/twitter/bootstrap/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-alert.js +9 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-button.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-carousel.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-collapse.js +6 -4
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-dropdown.js +15 -6
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-modal.js +7 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-popover.js +3 -3
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-scrollspy.js +3 -2
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-tab.js +10 -5
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-transition.js +1 -1
- data/vendor/assets/javascripts/twitter/bootstrap/bootstrap-typeahead.js +39 -20
- data/vendor/toolkit/twitter/bootstrap/accordion.less +5 -4
- data/vendor/toolkit/twitter/bootstrap/alerts.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/bootstrap.less +10 -8
- data/vendor/toolkit/twitter/bootstrap/button-groups.less +48 -18
- data/vendor/toolkit/twitter/bootstrap/buttons.less +137 -88
- data/vendor/toolkit/twitter/bootstrap/carousel.less +12 -5
- data/vendor/toolkit/twitter/bootstrap/code.less +44 -0
- data/vendor/toolkit/twitter/bootstrap/dropdowns.less +23 -2
- data/vendor/toolkit/twitter/bootstrap/forms.less +83 -64
- data/vendor/toolkit/twitter/bootstrap/grid.less +8 -0
- data/vendor/toolkit/twitter/bootstrap/hero-unit.less +20 -0
- data/vendor/toolkit/twitter/bootstrap/labels.less +4 -4
- data/vendor/toolkit/twitter/bootstrap/layouts.less +17 -0
- data/vendor/toolkit/twitter/bootstrap/mixins.less +202 -38
- data/vendor/toolkit/twitter/bootstrap/modals.less +9 -2
- data/vendor/toolkit/twitter/bootstrap/navbar.less +70 -29
- data/vendor/toolkit/twitter/bootstrap/navs.less +70 -64
- data/vendor/toolkit/twitter/bootstrap/pager.less +7 -2
- data/vendor/toolkit/twitter/bootstrap/pagination.less +1 -0
- data/vendor/toolkit/twitter/bootstrap/popovers.less +25 -25
- data/vendor/toolkit/twitter/bootstrap/progress-bars.less +14 -18
- data/vendor/toolkit/twitter/bootstrap/reset.less +2 -3
- data/vendor/toolkit/twitter/bootstrap/responsive.less +219 -164
- data/vendor/toolkit/twitter/bootstrap/scaffolding.less +6 -89
- data/vendor/toolkit/twitter/bootstrap/sprites.less +137 -99
- data/vendor/toolkit/twitter/bootstrap/tables.less +1 -54
- data/vendor/toolkit/twitter/bootstrap/thumbnails.less +2 -0
- data/vendor/toolkit/twitter/bootstrap/type.less +12 -42
- data/vendor/toolkit/twitter/bootstrap/variables.less +23 -14
- metadata +34 -18
- data/vendor/toolkit/twitter/bootstrap/patterns.less +0 -30
- data/vendor/toolkit/twitter/bootstrap/print.less +0 -18
data/README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
# Twitter Bootstrap for Rails 3.
|
1
|
+
# Twitter Bootstrap for Rails 3.1 Asset Pipeline
|
2
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.
|
3
3
|
|
4
4
|
|
5
|
-
twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.
|
5
|
+
twitter-bootstrap-rails project integrates Bootstrap CSS toolkit for Rails 3.1 Asset Pipeline (Rails 3.2 supported)
|
6
6
|
|
7
7
|
|
8
8
|
## Installing Gem
|
9
9
|
|
10
10
|
Include Bootstrap in Gemfile;
|
11
11
|
|
12
|
-
gem 'twitter-bootstrap-rails'
|
12
|
+
gem 'twitter-bootstrap-rails', :group => :assets
|
13
13
|
|
14
14
|
or you can install from latest build;
|
15
15
|
|
@@ -34,13 +34,13 @@ Usage:
|
|
34
34
|
rails g bootstrap:install
|
35
35
|
|
36
36
|
|
37
|
-
Layout (generates Twitter Bootstrap compatible layout
|
37
|
+
Layout (generates Twitter Bootstrap compatible layout with flash messages) - (Haml and Slim supported)
|
38
38
|
|
39
39
|
|
40
40
|
Usage:
|
41
41
|
|
42
42
|
|
43
|
-
rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
|
43
|
+
rails g bootstrap:layout [LAYOUT_NAME] [*fixed or fluid]
|
44
44
|
|
45
45
|
|
46
46
|
Example:
|
@@ -49,19 +49,20 @@ Example:
|
|
49
49
|
rails g bootstrap:layout application fixed
|
50
50
|
|
51
51
|
|
52
|
-
Themed (generates Twitter Bootstrap compatible scaffold views.)
|
52
|
+
Themed (generates Twitter Bootstrap compatible scaffold views.) - (Haml and Slim supported)
|
53
53
|
|
54
54
|
|
55
55
|
Usage:
|
56
56
|
|
57
57
|
|
58
|
-
rails g bootstrap:themed [RESOURCE_NAME]
|
58
|
+
rails g bootstrap:themed [RESOURCE_NAME]
|
59
59
|
|
60
60
|
|
61
61
|
Example:
|
62
62
|
|
63
63
|
|
64
64
|
rails g scaffold post title:string description:text
|
65
|
+
rake db:migrate
|
65
66
|
rails g bootstrap:themed posts
|
66
67
|
|
67
68
|
|
@@ -82,12 +83,14 @@ You have to require Bootstrap LESS (bootstrap.less) in your application.css
|
|
82
83
|
|
83
84
|
|
84
85
|
Now, you can override LESS files provided by Twitter Bootstrap
|
86
|
+
Also, you can import additional files (.ie responsive)
|
85
87
|
|
86
|
-
|
88
|
+
@import "twitter/bootstrap";
|
87
89
|
|
88
|
-
|
89
|
-
|
90
|
-
|
90
|
+
// import responsive layout
|
91
|
+
@import "twitter/bootstrap/responsive";
|
92
|
+
|
93
|
+
// Your custom stylesheets goes here (override Less here)
|
91
94
|
|
92
95
|
|
93
96
|
## Using Javascripts
|
@@ -107,27 +110,17 @@ Using Twitter Bootstrap with the CoffeeScript is easy.
|
|
107
110
|
twitter-bootstrap-rails generates a "bootstrap.js.coffee" file for you
|
108
111
|
to /app/assets/javascripts/ folder.
|
109
112
|
|
110
|
-
|
113
|
+
jQuery ->
|
111
114
|
$(".alert-message").alert()
|
112
|
-
$ ->
|
113
115
|
$(".tabs").button()
|
114
|
-
$ ->
|
115
116
|
$(".carousel").carousel()
|
116
|
-
$ ->
|
117
117
|
$(".collapse").collapse()
|
118
|
-
$ ->
|
119
118
|
$(".dropdown-toggle").dropdown()
|
120
|
-
|
121
|
-
$("
|
122
|
-
|
123
|
-
$("
|
124
|
-
|
125
|
-
$("#navbar").scrollspy()
|
126
|
-
$ ->
|
127
|
-
$("#myTab").tab "show"
|
128
|
-
$ ->
|
129
|
-
$("#example").tooltip options
|
130
|
-
$ ->
|
119
|
+
$(".modal").modal()
|
120
|
+
$("a[rel]").popover()
|
121
|
+
$(".navbar").scrollspy()
|
122
|
+
$(".tab").tab "show"
|
123
|
+
$(".tooltip").tooltip()
|
131
124
|
$(".typeahead").typeahead()
|
132
125
|
|
133
126
|
|
@@ -159,6 +152,11 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
159
152
|
<li>Added new generators (install, layout and themed)</li>
|
160
153
|
<li>Compability to Rails 3.2</li>
|
161
154
|
<li>Transitioning to 2.0</li>
|
155
|
+
<li>Released gem v.2.0rc0</li>
|
156
|
+
<li>Added Haml and Slim support</li>
|
157
|
+
<li>Added Twitter Bootstrap compatible flash messages</li>
|
158
|
+
<li>Added Responsive layout support</li>
|
159
|
+
<li>Fixes and release 2.0.0</li>
|
162
160
|
</ul>
|
163
161
|
|
164
162
|
|
@@ -173,6 +171,8 @@ twitter-bootstrap-rails has seperate branch (w/o Less) that just serves latest s
|
|
173
171
|
<li>Colin Warren</li>
|
174
172
|
<li>Giovanni Cappellotto</li>
|
175
173
|
<li>Masakuni Kato</li>
|
174
|
+
<li>Gudleik Rasch</li>
|
175
|
+
<li>Thomas Volkmar Worm</li>
|
176
176
|
</ul>
|
177
177
|
|
178
178
|
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rails/generators'
|
|
2
2
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
|
-
class InstallGenerator < Rails::Generators::Base
|
5
|
+
class InstallGenerator < ::Rails::Generators::Base
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
7
|
desc "This generator installs Twitter Bootstrap to Asset Pipeline"
|
8
8
|
|
@@ -1,22 +1,12 @@
|
|
1
|
-
|
1
|
+
jQuery ->
|
2
2
|
$(".alert-message").alert()
|
3
|
-
$ ->
|
4
3
|
$(".tabs").button()
|
5
|
-
$ ->
|
6
4
|
$(".carousel").carousel()
|
7
|
-
$ ->
|
8
5
|
$(".collapse").collapse()
|
9
|
-
$ ->
|
10
6
|
$(".dropdown-toggle").dropdown()
|
11
|
-
$
|
12
|
-
$("
|
13
|
-
$ ->
|
14
|
-
$("a[rel]").popover
|
15
|
-
$ ->
|
7
|
+
$(".modal").modal()
|
8
|
+
$("a[rel]").popover()
|
16
9
|
$(".navbar").scrollspy()
|
17
|
-
$ ->
|
18
10
|
$(".tab").tab "show"
|
19
|
-
$
|
20
|
-
$(".
|
21
|
-
$ ->
|
22
|
-
$(".typeahead").typeahead()
|
11
|
+
$(".tooltip").tooltip()
|
12
|
+
$(".typeahead").typeahead()
|
@@ -2,21 +2,31 @@ require 'rails/generators'
|
|
2
2
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
|
-
class LayoutGenerator < Rails::Generators::Base
|
5
|
+
class LayoutGenerator < ::Rails::Generators::Base
|
6
6
|
source_root File.expand_path("../templates", __FILE__)
|
7
|
-
desc "This generator
|
7
|
+
desc "This generator generates layout file with navigation."
|
8
8
|
argument :layout_name, :type => :string, :default => "application"
|
9
9
|
argument :layout_type, :type => :string, :default => "fixed",
|
10
10
|
:banner => "*fixed or fluid"
|
11
11
|
|
12
12
|
attr_reader :app_name, :container_class
|
13
13
|
|
14
|
+
def add_helper
|
15
|
+
if File.exists?(Rails.root.join("app/helpers/application_helper.rb"))
|
16
|
+
say "Bootstrap helpers installs to application_helper..."
|
17
|
+
insert_into_file "app/helpers/application_helper.rb",
|
18
|
+
" def flash_class(level)\n case level\n when :notice then 'info'\n when :error then 'error'\n when :alert then 'warning'\n end\n end\n", :after => "module ApplicationHelper\n"
|
19
|
+
else
|
20
|
+
say "Already installed"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
14
24
|
def generate_layout
|
15
|
-
app = Rails.application
|
25
|
+
app = ::Rails.application
|
16
26
|
@app_name = app.class.to_s.split("::").first
|
17
27
|
@container_class = layout_type == "fluid" ? "container-fluid" : "container"
|
18
28
|
ext = app.config.generators.options[:rails][:template_engine] || :erb
|
19
|
-
template "layout.html
|
29
|
+
template "layout.html.#{ext}", "app/views/layouts/#{layout_name}.html.#{ext}"
|
20
30
|
end
|
21
31
|
end
|
22
32
|
end
|
@@ -1,57 +1,120 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title><%= app_name %></title>
|
6
|
+
<%%= csrf_meta_tags %>
|
7
|
+
|
8
|
+
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
|
9
|
+
<!--[if lt IE 9]>
|
10
|
+
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
11
|
+
<![endif]-->
|
12
|
+
|
13
|
+
<!-- Le styles -->
|
14
|
+
<%%= stylesheet_link_tag "application", :media => "all" %>
|
15
|
+
<style>
|
16
|
+
body {
|
17
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
18
|
+
}
|
19
|
+
</style>
|
20
|
+
|
21
|
+
<!-- Le fav and touch icons -->
|
22
|
+
<link href="images/favicon.ico" rel="shortcut icon">
|
23
|
+
<link href="images/apple-touch-icon.png" rel="apple-touch-icon">
|
24
|
+
<link href="images/apple-touch-icon-72x72.png" rel="apple-touch-icon" sizes="72x72">
|
25
|
+
<link href="images/apple-touch-icon-114x114.png" rel="apple-touch-icon" sizes="114x114">
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
|
29
|
+
<div class="navbar navbar-fixed-top">
|
30
|
+
<div class="navbar-inner">
|
31
|
+
<%- if layout_type == "fluid" -%>
|
32
|
+
<div class="container-fluid">
|
33
|
+
<%- else -%>
|
34
|
+
<div class="container">
|
17
35
|
<%- end -%>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
</
|
36
|
+
<a class="btn btn-navbar" data-target=".nav-collapse" data-toggle="collapse">
|
37
|
+
<span class="i-bar"></span>
|
38
|
+
<span class="i-bar"></span>
|
39
|
+
<span class="i-bar"></span>
|
40
|
+
</a>
|
41
|
+
<a class="brand" href="#"><%= app_name %></a>
|
42
|
+
<div class="<%= container_class %> nav-collapse">
|
43
|
+
<ul class="nav">
|
44
|
+
<%- (1..3).each do |i| -%>
|
45
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
46
|
+
<%- end -%>
|
47
|
+
</ul>
|
48
|
+
</div><!--/.nav-collapse -->
|
49
|
+
</div>
|
32
50
|
</div>
|
33
51
|
</div>
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
52
|
+
|
53
|
+
<div class="<%= container_class %>">
|
54
|
+
<%- if layout_type == "fluid" -%>
|
55
|
+
<div class="row-fluid">
|
56
|
+
<div class="span3">
|
57
|
+
<div class="well sidebar-nav">
|
58
|
+
<ul class="nav nav-list">
|
59
|
+
<li class="nav-header">Sidebar</li>
|
60
|
+
<%- (1..3).each do |i| -%>
|
61
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
62
|
+
<%- end -%>
|
63
|
+
</ul>
|
64
|
+
</div><!--/.well -->
|
65
|
+
</div><!--/span-->
|
66
|
+
<div class="span9">
|
67
|
+
<%% [:notice, :error, :alert].each do |level| %>
|
68
|
+
<%% unless flash[level].blank? %>
|
69
|
+
<div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
|
70
|
+
<a class="close" data-dismiss="alert" href="#">×</a>
|
71
|
+
<%%= content_tag :p, flash[level] %>
|
72
|
+
</div>
|
73
|
+
<%% end %>
|
74
|
+
<%% end %>
|
41
75
|
<%%= yield %>
|
42
76
|
</div>
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
<
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
77
|
+
</div><!--/row-->
|
78
|
+
<%- else -%>
|
79
|
+
<div class="content">
|
80
|
+
<div class="row">
|
81
|
+
<div class="span9">
|
82
|
+
<%% [:notice, :error, :alert].each do |level| %>
|
83
|
+
<%% unless flash[level].blank? %>
|
84
|
+
<div data-alert="alert" class="alert alert-<%%= flash_class(level) %> fade in">
|
85
|
+
<a class="close" data-dismiss="alert" href="#">×</a>
|
86
|
+
<%%= content_tag :p, flash[level] %>
|
87
|
+
</div>
|
88
|
+
<%% end %>
|
89
|
+
<%% end %>
|
90
|
+
<%%= yield %>
|
91
|
+
</div>
|
92
|
+
<div class="span1"> </div>
|
93
|
+
<div class="span3">
|
94
|
+
<div class="well sidebar-nav">
|
95
|
+
<h3>Sidebar</h3>
|
96
|
+
<ul class="nav nav-list">
|
97
|
+
<li class="nav-header">Sidebar</li>
|
98
|
+
<%- (1..3).each do |i| -%>
|
99
|
+
<li><%%= link_to "Link<%= i %>", "/path<%= i %>" %></li>
|
100
|
+
<%- end -%>
|
101
|
+
</ul>
|
102
|
+
</div>
|
103
|
+
</div>
|
104
|
+
</div>
|
51
105
|
</div>
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
</
|
106
|
+
<%- end -%>
|
107
|
+
|
108
|
+
<footer>
|
109
|
+
<p>© Company 2012</p>
|
110
|
+
</footer>
|
111
|
+
|
112
|
+
</div> <!-- /container -->
|
113
|
+
|
114
|
+
<!-- Le javascript
|
115
|
+
================================================== -->
|
116
|
+
<!-- Placed at the end of the document so the pages load faster -->
|
117
|
+
<%%= javascript_include_tag "application" %>
|
118
|
+
|
119
|
+
</body>
|
57
120
|
</html>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
!!! 5
|
2
|
+
%html{:lang => "en"}
|
3
|
+
%head
|
4
|
+
%meta{:charset => "utf-8"}/
|
5
|
+
%title= content_for?(:title) ? yield(:title) : "<%= app_name %>"
|
6
|
+
= csrf_meta_tags
|
7
|
+
/ Le HTML5 shim, for IE6-8 support of HTML elements
|
8
|
+
/[if lt IE 9]
|
9
|
+
= javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
|
10
|
+
/ Le styles
|
11
|
+
= stylesheet_link_tag "application"
|
12
|
+
:css
|
13
|
+
body {
|
14
|
+
padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */
|
15
|
+
}
|
16
|
+
/ Le fav and touch icons
|
17
|
+
%link{:href => "images/favicon.ico", :rel => "shortcut icon"}/
|
18
|
+
%link{:href => "images/apple-touch-icon.png", :rel => "apple-touch-icon"}/
|
19
|
+
%link{:href => "images/apple-touch-icon-72x72.png", :rel => "apple-touch-icon", :sizes => "72x72"}/
|
20
|
+
%link{:href => "images/apple-touch-icon-114x114.png", :rel => "apple-touch-icon", :sizes => "114x114"}/
|
21
|
+
|
22
|
+
|
23
|
+
%body
|
24
|
+
.navbar.navbar-fixed-top
|
25
|
+
.navbar-inner
|
26
|
+
<%- if layout_type == "fluid" -%>
|
27
|
+
.container-fluid
|
28
|
+
<%- else -%>
|
29
|
+
.container
|
30
|
+
<%- end -%>
|
31
|
+
%a.btn.btn-navbar{"data-target" => ".nav-collapse", "data-toggle" => "collapse"}
|
32
|
+
%span.i-bar
|
33
|
+
%span.i-bar
|
34
|
+
%span.i-bar
|
35
|
+
%a.brand{:href => "#"}<%= app_name %>
|
36
|
+
.<%=container_class%>.nav-collapse
|
37
|
+
%ul.nav
|
38
|
+
%li= link_to "Link 1", "/path1"
|
39
|
+
%li= link_to "Link 2", "/path2"
|
40
|
+
%li= link_to "Link 3", "/path3"
|
41
|
+
|
42
|
+
.<%= container_class %>
|
43
|
+
<%- if layout_type == "fluid" -%>
|
44
|
+
|
45
|
+
.row-fluid
|
46
|
+
.span3
|
47
|
+
.well.sidebar-nav
|
48
|
+
%ul.nav.nav-list
|
49
|
+
%li.nav-header Sidebar
|
50
|
+
%li= link_to "Link 1", "/path1"
|
51
|
+
%li= link_to "Link 2", "/path2"
|
52
|
+
%li= link_to "Link 3", "/path3"
|
53
|
+
.span9
|
54
|
+
<% [:notice, :error, :alert].each do |level| %>
|
55
|
+
<% unless flash[level].blank? %>
|
56
|
+
.alert.fade.in{:class => "alert-<%= flash_class(level) %>", "data-alert" => "alert"}
|
57
|
+
%a.close{"data-dismiss" => "alert", :href => "#"} ×
|
58
|
+
<%= content_tag :p, flash[level] %>
|
59
|
+
<% end %>
|
60
|
+
<% end %>
|
61
|
+
= yield
|
62
|
+
<% else %>
|
63
|
+
.content
|
64
|
+
.row
|
65
|
+
.span9
|
66
|
+
<% [:notice, :error, :alert].each do |level| %>
|
67
|
+
<% unless flash[level].blank? %>
|
68
|
+
.alert.fade.in{:class => "alert-<%= flash_class(level) %>", "data-alert" => "alert"}
|
69
|
+
%a.close{"data-dismiss" => "alert", :href => "#"} ×
|
70
|
+
<%= content_tag :p, flash[level] %>
|
71
|
+
<% end %>
|
72
|
+
<% end %>
|
73
|
+
= yield
|
74
|
+
.span1
|
75
|
+
.span3
|
76
|
+
.well.sidebar-nav
|
77
|
+
%h3 Sidebar
|
78
|
+
%ul.nav.nav-list
|
79
|
+
%li.nav-header Sidebar
|
80
|
+
%li= link_to "Link 1", "/path1"
|
81
|
+
%li= link_to "Link 2", "/path2"
|
82
|
+
%li= link_to "Link 3", "/path3"
|
83
|
+
<% end %>
|
84
|
+
%footer
|
85
|
+
%p © Company 2012
|
86
|
+
/
|
87
|
+
Le javascript
|
88
|
+
\==================================================
|
89
|
+
/ Placed at the end of the document so the pages load faster
|
90
|
+
= javascript_include_tag "application"
|