bootstrap-generators 3.3.1 → 3.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -3
- data/Rakefile +3 -3
- data/lib/bootstrap-generators.rb +1 -1
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +1 -1
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +8 -3
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +11 -9
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +4 -4
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +8 -8
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.slim +4 -4
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.haml +15 -15
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.slim +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/edit.html.slim +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/index.html.slim +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/new.html.slim +1 -1
- data/lib/generators/bootstrap/install/templates/lib/templates/slim/scaffold/show.html.slim +2 -2
- data/readme-template.md.erb +9 -1
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.svg +273 -214
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/fonts/bootstrap/glyphicons-halflings-regular.woff2 +0 -0
- data/vendor/assets/javascripts/bootstrap/affix.js +7 -7
- data/vendor/assets/javascripts/bootstrap/alert.js +3 -3
- data/vendor/assets/javascripts/bootstrap/button.js +3 -3
- data/vendor/assets/javascripts/bootstrap/carousel.js +11 -14
- data/vendor/assets/javascripts/bootstrap/collapse.js +9 -9
- data/vendor/assets/javascripts/bootstrap/dropdown.js +4 -4
- data/vendor/assets/javascripts/bootstrap/modal.js +42 -27
- data/vendor/assets/javascripts/bootstrap/popover.js +9 -20
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +18 -21
- data/vendor/assets/javascripts/bootstrap/tab.js +4 -4
- data/vendor/assets/javascripts/bootstrap/tooltip.js +26 -28
- data/vendor/assets/javascripts/bootstrap/transition.js +2 -2
- data/vendor/assets/stylesheets/bootstrap.css.erb +289 -37
- data/vendor/assets/stylesheets/bootstrap.css.map +1 -1
- data/vendor/twitter/bootstrap/less/alerts.less +5 -0
- data/vendor/twitter/bootstrap/less/badges.less +6 -1
- data/vendor/twitter/bootstrap/less/button-groups.less +2 -2
- data/vendor/twitter/bootstrap/less/buttons.less +1 -1
- data/vendor/twitter/bootstrap/less/carousel.less +8 -6
- data/vendor/twitter/bootstrap/less/close.less +1 -0
- data/vendor/twitter/bootstrap/less/component-animations.less +1 -2
- data/vendor/twitter/bootstrap/less/dropdowns.less +3 -2
- data/vendor/twitter/bootstrap/less/forms.less +51 -23
- data/vendor/twitter/bootstrap/less/glyphicons.less +71 -0
- data/vendor/twitter/bootstrap/less/jumbotron.less +1 -0
- data/vendor/twitter/bootstrap/less/media.less +14 -0
- data/vendor/twitter/bootstrap/less/mixins/vendor-prefixes.less +1 -1
- data/vendor/twitter/bootstrap/less/modals.less +3 -1
- data/vendor/twitter/bootstrap/less/navbar.less +1 -1
- data/vendor/twitter/bootstrap/less/navs.less +0 -2
- data/vendor/twitter/bootstrap/less/panels.less +5 -1
- data/vendor/twitter/bootstrap/less/popovers.less +1 -1
- data/vendor/twitter/bootstrap/less/responsive-embed.less +8 -8
- data/vendor/twitter/bootstrap/less/scaffolding.less +12 -0
- data/vendor/twitter/bootstrap/less/tables.less +3 -3
- data/vendor/twitter/bootstrap/less/theme.less +3 -2
- data/vendor/twitter/bootstrap/less/tooltip.less +1 -2
- data/vendor/twitter/bootstrap/less/type.less +1 -1
- data/vendor/twitter/bootstrap/less/utilities.less +0 -1
- data/vendor/twitter/bootstrap/less/variables.less +8 -3
- data/vendor/twitter/bootstrap/sass/_bootstrap-compass.scss +2 -0
- data/vendor/twitter/bootstrap/sass/_bootstrap-mincer.scss +2 -0
- data/vendor/twitter/bootstrap/sass/_bootstrap-sprockets.scss +2 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_alerts.scss +5 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_badges.scss +6 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_button-groups.scss +2 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_buttons.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_carousel.scss +8 -6
- data/vendor/twitter/bootstrap/sass/bootstrap/_close.scss +1 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_component-animations.scss +1 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_dropdowns.scss +3 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_forms.scss +51 -21
- data/vendor/twitter/bootstrap/sass/bootstrap/_glyphicons.scss +71 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_jumbotron.scss +1 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_media.scss +14 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_modals.scss +3 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_navbar.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_navs.scss +0 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_panels.scss +5 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_popovers.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_responsive-embed.scss +8 -8
- data/vendor/twitter/bootstrap/sass/bootstrap/_responsive-utilities.scss +4 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_scaffolding.scss +12 -0
- data/vendor/twitter/bootstrap/sass/bootstrap/_tables.scss +3 -3
- data/vendor/twitter/bootstrap/sass/bootstrap/_theme.scss +3 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_tooltip.scss +1 -2
- data/vendor/twitter/bootstrap/sass/bootstrap/_type.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_utilities.scss +0 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/_variables.scss +11 -9
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_hide-text.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_opacity.scss +1 -1
- data/vendor/twitter/bootstrap/sass/bootstrap/mixins/_vendor-prefixes.scss +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4a3d07d527b60b1c67eee3d6831460b2e5f0dbc
|
4
|
+
data.tar.gz: c13cd8174483cbb8e2191c50007f178f0fa42030
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fca2a0308dc86d7b0f2efa18f0a362f7e06a78e0b8f5c5a0cedbb177a5926bfdc147bbf5ae0fab55adaa89a8827b0ea3cc96cbd56a8fb9cde7e1aaa1ef0ba31d
|
7
|
+
data.tar.gz: d4d535413c855d5a8c5ed8acdbfc784e44b9503590eeef27b5fd399bdf47dff3e74ef768e95c953acdd6af339702a35c51f4f60bad5ebdb07ad991abe3895cd3
|
data/README.md
CHANGED
@@ -6,17 +6,17 @@ Bootstrap-generators provides [Twitter Bootstrap](http://getbootstrap.com/) gene
|
|
6
6
|
|
7
7
|
## Current Twitter Bootstrap version
|
8
8
|
|
9
|
-
The current supported version of Twitter Bootstrap is 3.3.
|
9
|
+
The current supported version of Twitter Bootstrap is 3.3.4.
|
10
10
|
|
11
11
|
## Installing Gem
|
12
12
|
|
13
13
|
In your Gemfile, add this line:
|
14
14
|
|
15
|
-
gem 'bootstrap-generators', '~> 3.3.
|
15
|
+
gem 'bootstrap-generators', '~> 3.3.4'
|
16
16
|
|
17
17
|
Or you can install from latest build:
|
18
18
|
|
19
|
-
gem 'bootstrap-generators', :
|
19
|
+
gem 'bootstrap-generators', git: 'git://github.com/decioferreira/bootstrap-generators.git'
|
20
20
|
|
21
21
|
Run bundle install:
|
22
22
|
|
@@ -162,6 +162,14 @@ In Rails 3.0 and above, generators don’t just look in the source root for temp
|
|
162
162
|
|
163
163
|
Since Bootstrap Generators installs its templates under lib/templates, you can go and customize them.
|
164
164
|
|
165
|
+
## Update Bootstrap Version
|
166
|
+
|
167
|
+
To update the version of Bootstrap on this Gem you can run the following command:
|
168
|
+
|
169
|
+
rake bootstrap:update
|
170
|
+
|
171
|
+
There might be some manual changes needed after running this command. But most of the process is automatic.
|
172
|
+
|
165
173
|
## Credits
|
166
174
|
|
167
175
|
* [Twitter Bootstrap](http://getbootstrap.com)
|
data/Rakefile
CHANGED
@@ -8,13 +8,13 @@ Rake::TestTask.new do |t|
|
|
8
8
|
t.verbose = false
|
9
9
|
end
|
10
10
|
|
11
|
-
task :
|
11
|
+
task default: :test
|
12
12
|
|
13
13
|
namespace :bootstrap do
|
14
14
|
desc "Update to a new version of Twitter Bootstrap"
|
15
15
|
task :update do
|
16
|
-
bootstrap_version = "3.3.
|
17
|
-
striped_bootstrap_generators_version = "3.3.
|
16
|
+
bootstrap_version = "3.3.4"
|
17
|
+
striped_bootstrap_generators_version = "3.3.4"
|
18
18
|
|
19
19
|
twitter_latest_dist_zip_url = "https://github.com/twbs/bootstrap/archive/v#{bootstrap_version}.zip"
|
20
20
|
twitter_sass_lastest_dist_zip_url = "https://github.com/twbs/bootstrap-sass/archive/v#{bootstrap_version}.zip"
|
data/lib/bootstrap-generators.rb
CHANGED
@@ -8,7 +8,7 @@ module Bootstrap
|
|
8
8
|
|
9
9
|
class_option :template_engine
|
10
10
|
class_option :stylesheet_engine
|
11
|
-
class_option :skip_turbolinks, :
|
11
|
+
class_option :skip_turbolinks, type: :boolean, default: false, desc: "Skip Turbolinks on assets"
|
12
12
|
|
13
13
|
def copy_lib
|
14
14
|
directory "lib/templates/#{options[:template_engine]}"
|
@@ -14,7 +14,7 @@
|
|
14
14
|
@gray-light: lighten(@gray-base, 46.7%); // #777
|
15
15
|
@gray-lighter: lighten(@gray-base, 93.5%); // #eee
|
16
16
|
|
17
|
-
@brand-primary: darken(#428bca, 6.5%);
|
17
|
+
@brand-primary: darken(#428bca, 6.5%); // #337ab7
|
18
18
|
@brand-success: #5cb85c;
|
19
19
|
@brand-info: #5bc0de;
|
20
20
|
@brand-warning: #f0ad4e;
|
@@ -99,7 +99,7 @@
|
|
99
99
|
@padding-xs-vertical: 1px;
|
100
100
|
@padding-xs-horizontal: 5px;
|
101
101
|
|
102
|
-
@line-height-large: 1.
|
102
|
+
@line-height-large: 1.3333333; // extra decimals for Win 8.1 Chrome
|
103
103
|
@line-height-small: 1.5;
|
104
104
|
|
105
105
|
@border-radius-base: 4px;
|
@@ -187,6 +187,7 @@
|
|
187
187
|
|
188
188
|
// TODO: Rename `@input-border-radius` to `@input-border-radius-base` in v4
|
189
189
|
//** Default `.form-control` border radius
|
190
|
+
// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
190
191
|
@input-border-radius: @border-radius-base;
|
191
192
|
//** Large `.form-control` border radius
|
192
193
|
@input-border-radius-large: @border-radius-large;
|
@@ -206,6 +207,9 @@
|
|
206
207
|
//** Small `.form-control` height
|
207
208
|
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
|
208
209
|
|
210
|
+
//** `.form-group` margin
|
211
|
+
@form-group-margin-bottom: 15px;
|
212
|
+
|
209
213
|
@legend-color: @gray-dark;
|
210
214
|
@legend-border-color: #e5e5e5;
|
211
215
|
|
@@ -265,7 +269,8 @@
|
|
265
269
|
@zindex-popover: 1060;
|
266
270
|
@zindex-tooltip: 1070;
|
267
271
|
@zindex-navbar-fixed: 1030;
|
268
|
-
@zindex-modal:
|
272
|
+
@zindex-modal-background: 1040;
|
273
|
+
@zindex-modal: 1050;
|
269
274
|
|
270
275
|
|
271
276
|
//== Media queries breakpoints
|
@@ -1,8 +1,4 @@
|
|
1
|
-
|
2
|
-
// When there no function is defined, `fn('')` is parsed as string that equals the right hand side
|
3
|
-
// NB: in Sass 3.3 there is a native function: function-exists(twbs-font-path)
|
4
|
-
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;
|
5
|
-
|
1
|
+
$bootstrap-sass-asset-helper: false !default;
|
6
2
|
//
|
7
3
|
// Variables
|
8
4
|
// --------------------------------------------------
|
@@ -19,7 +15,7 @@ $gray: lighten($gray-base, 33.5%) !default; // #555
|
|
19
15
|
$gray-light: lighten($gray-base, 46.7%) !default; // #777
|
20
16
|
$gray-lighter: lighten($gray-base, 93.5%) !default; // #eee
|
21
17
|
|
22
|
-
$brand-primary: darken(#428bca, 6.5%) !default;
|
18
|
+
$brand-primary: darken(#428bca, 6.5%) !default; // #337ab7
|
23
19
|
$brand-success: #5cb85c !default;
|
24
20
|
$brand-info: #5bc0de !default;
|
25
21
|
$brand-warning: #f0ad4e !default;
|
@@ -82,7 +78,8 @@ $headings-color: inherit !default;
|
|
82
78
|
|
83
79
|
//** Load fonts from this directory.
|
84
80
|
|
85
|
-
// [converter]
|
81
|
+
// [converter] If $bootstrap-sass-asset-helper if used, provide path relative to the assets load path.
|
82
|
+
// [converter] This is because some asset helpers, such as Sprockets, do not work with file-relative paths.
|
86
83
|
$icon-font-path: if($bootstrap-sass-asset-helper, "bootstrap/", "bootstrap/") !default;
|
87
84
|
|
88
85
|
//** File name for all font files.
|
@@ -107,7 +104,7 @@ $padding-small-horizontal: 10px !default;
|
|
107
104
|
$padding-xs-vertical: 1px !default;
|
108
105
|
$padding-xs-horizontal: 5px !default;
|
109
106
|
|
110
|
-
$line-height-large: 1.
|
107
|
+
$line-height-large: 1.3333333 !default; // extra decimals for Win 8.1 Chrome
|
111
108
|
$line-height-small: 1.5 !default;
|
112
109
|
|
113
110
|
$border-radius-base: 4px !default;
|
@@ -195,6 +192,7 @@ $input-border: #ccc !default;
|
|
195
192
|
|
196
193
|
// TODO: Rename `$input-border-radius` to `$input-border-radius-base` in v4
|
197
194
|
//** Default `.form-control` border radius
|
195
|
+
// This has no effect on `<select>`s in some browsers, due to the limited stylability of `<select>`s in CSS.
|
198
196
|
$input-border-radius: $border-radius-base !default;
|
199
197
|
//** Large `.form-control` border radius
|
200
198
|
$input-border-radius-large: $border-radius-large !default;
|
@@ -214,6 +212,9 @@ $input-height-large: (ceil($font-size-large * $line-height-large) +
|
|
214
212
|
//** Small `.form-control` height
|
215
213
|
$input-height-small: (floor($font-size-small * $line-height-small) + ($padding-small-vertical * 2) + 2) !default;
|
216
214
|
|
215
|
+
//** `.form-group` margin
|
216
|
+
$form-group-margin-bottom: 15px !default;
|
217
|
+
|
217
218
|
$legend-color: $gray-dark !default;
|
218
219
|
$legend-border-color: #e5e5e5 !default;
|
219
220
|
|
@@ -273,7 +274,8 @@ $zindex-dropdown: 1000 !default;
|
|
273
274
|
$zindex-popover: 1060 !default;
|
274
275
|
$zindex-tooltip: 1070 !default;
|
275
276
|
$zindex-navbar-fixed: 1030 !default;
|
276
|
-
$zindex-modal:
|
277
|
+
$zindex-modal-background: 1040 !default;
|
278
|
+
$zindex-modal: 1050 !default;
|
277
279
|
|
278
280
|
|
279
281
|
//== Media queries breakpoints
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%%= form_for(@<%= singular_table_name %>, :
|
1
|
+
<%%= form_for(@<%= singular_table_name %>, html: { class: "form-horizontal", role: "form" }) do |f| %>
|
2
2
|
<%% if @<%= singular_table_name %>.errors.any? %>
|
3
3
|
<div class="alert alert-danger alert-dismissable" role="alert">
|
4
4
|
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
@@ -14,15 +14,15 @@
|
|
14
14
|
|
15
15
|
<% attributes.each do |attribute| -%>
|
16
16
|
<div class="form-group">
|
17
|
-
<%%= f.label :<%= attribute.name %>, :
|
17
|
+
<%%= f.label :<%= attribute.name %>, class: "col-sm-2 control-label" %>
|
18
18
|
<div class="col-sm-10">
|
19
|
-
<%%= f.<%= attribute.field_type %> :<%= attribute.name %>, :
|
19
|
+
<%%= f.<%= attribute.field_type %> :<%= attribute.name %>, class: "form-control" %>
|
20
20
|
</div>
|
21
21
|
</div>
|
22
22
|
<% end -%>
|
23
23
|
<div class="form-group">
|
24
24
|
<div class="col-sm-offset-2 col-sm-10">
|
25
|
-
<%%= f.submit :
|
25
|
+
<%%= f.submit class: "btn btn-primary" %>
|
26
26
|
</div>
|
27
27
|
</div>
|
28
28
|
<%% end %>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
= form_for @<%= singular_table_name %>, :
|
1
|
+
= form_for @<%= singular_table_name %>, html: { class: "form-horizontal", role: "form" } do |f|
|
2
2
|
-if @<%= singular_table_name %>.errors.any?
|
3
|
-
.alert.alert-danger.alert-dismissable{:
|
4
|
-
%button.close{:
|
5
|
-
span{:
|
6
|
-
span.sr-only Close
|
3
|
+
.alert.alert-danger.alert-dismissable{role: "alert"}
|
4
|
+
%button.close{type: "button", data: {dismiss: "alert"} }
|
5
|
+
%span{aria: {hidden: "true"} } ×
|
6
|
+
%span.sr-only Close
|
7
7
|
%h4= "#{pluralize(@<%= singular_table_name %>.errors.count, "error")} prohibited this <%= singular_table_name %> from being saved:"
|
8
8
|
|
9
9
|
%ul
|
@@ -12,10 +12,10 @@
|
|
12
12
|
|
13
13
|
<% for attribute in attributes -%>
|
14
14
|
.form-group
|
15
|
-
= f.label :<%= attribute.name %>, :
|
15
|
+
= f.label :<%= attribute.name %>, class: 'col-sm-2 control-label'
|
16
16
|
.col-sm-10
|
17
|
-
= f.<%= attribute.field_type %> :<%= attribute.name %>, :
|
17
|
+
= f.<%= attribute.field_type %> :<%= attribute.name %>, class: 'form-control'
|
18
18
|
<% end -%>
|
19
19
|
.form-group
|
20
20
|
.col-sm-offset-2.col-sm-10
|
21
|
-
= f.submit :
|
21
|
+
= f.submit class: 'btn btn-primary'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
= form_for(@<%= singular_table_name %>, :
|
1
|
+
= form_for(@<%= singular_table_name %>, html: { class: "form-horizontal", role: "form" }) do |f|
|
2
2
|
- if @<%= singular_table_name %>.errors.any?
|
3
3
|
.alert.alert-danger.alert-dismissable role="alert"
|
4
4
|
button.close type="button" data-dismiss="alert"
|
@@ -12,10 +12,10 @@
|
|
12
12
|
li= msg
|
13
13
|
<%- attributes.each do |attribute| -%>
|
14
14
|
.form-group
|
15
|
-
= f.label :<%= attribute.name %>, :
|
15
|
+
= f.label :<%= attribute.name %>, class: "col-sm-2 control-label"
|
16
16
|
.col-sm-10
|
17
|
-
= f.<%= attribute.field_type %> :<%= attribute.name %>, :
|
17
|
+
= f.<%= attribute.field_type %> :<%= attribute.name %>, class: "form-control"
|
18
18
|
<%- end -%>
|
19
19
|
.form-group
|
20
20
|
.col-sm-offset-2.col-sm-10
|
21
|
-
= f.submit :
|
21
|
+
= f.submit class: "btn btn-primary"
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<span class="icon-bar"></span>
|
33
33
|
<span class="icon-bar"></span>
|
34
34
|
</button>
|
35
|
-
<%%= link_to "Project name", "#", :
|
35
|
+
<%%= link_to "Project name", "#", class: "navbar-brand" %>
|
36
36
|
</div>
|
37
37
|
<div id="navbar" class="collapse navbar-collapse">
|
38
38
|
<ul class="nav navbar-nav">
|
@@ -45,7 +45,7 @@
|
|
45
45
|
</nav>
|
46
46
|
<div class="container">
|
47
47
|
<%% flash.each do |name, msg| %>
|
48
|
-
<%%= content_tag :div, :
|
48
|
+
<%%= content_tag :div, class: "alert alert-#{ name == :error ? "danger" : "success" } alert-dismissable", role: "alert" do %>
|
49
49
|
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
50
50
|
<%%= msg %>
|
51
51
|
<%% end %>
|
@@ -1,11 +1,11 @@
|
|
1
1
|
!!!
|
2
2
|
%html
|
3
3
|
%head
|
4
|
-
%meta{:
|
5
|
-
%meta{:
|
6
|
-
%meta{:
|
7
|
-
%meta{:
|
8
|
-
%meta{:
|
4
|
+
%meta{charset: "utf-8"}
|
5
|
+
%meta{content: "IE=edge", "http-equiv" => "X-UA-Compatible"}
|
6
|
+
%meta{content: "width=device-width, initial-scale=1", name: "viewport"}
|
7
|
+
%meta{content: "", name: "description"}
|
8
|
+
%meta{content: "", name: "author"}
|
9
9
|
%title Starter Template for Bootstrap
|
10
10
|
|
11
11
|
/ HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries
|
@@ -21,28 +21,28 @@
|
|
21
21
|
<%- end -%>
|
22
22
|
= csrf_meta_tags
|
23
23
|
%body
|
24
|
-
%nav.navbar.navbar-inverse.navbar-fixed-top{:
|
24
|
+
%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
|
25
25
|
.container
|
26
26
|
.navbar-header
|
27
|
-
%button.navbar-toggle.collapsed{:
|
27
|
+
%button.navbar-toggle.collapsed{type: "button", data: {toggle: "collapse", target: "#navbar"}, aria: {expanded: "false", controls: "navbar"} }
|
28
28
|
%span.sr-only Toggle navigation
|
29
29
|
%span.icon-bar
|
30
30
|
%span.icon-bar
|
31
31
|
%span.icon-bar
|
32
|
-
= link_to "Project name", "#", :
|
32
|
+
= link_to "Project name", "#", class: "navbar-brand"
|
33
33
|
#navbar.collapse.navbar-collapse
|
34
34
|
%ul.nav.navbar-nav
|
35
35
|
%li.active
|
36
|
-
%a{:
|
36
|
+
%a{href: "#"} Home
|
37
37
|
%li
|
38
|
-
%a{:
|
38
|
+
%a{href: "#about"} About
|
39
39
|
%li
|
40
|
-
%a{:
|
40
|
+
%a{href: "#contact"} Contact
|
41
41
|
.container
|
42
42
|
- flash.each do |name, msg|
|
43
|
-
= content_tag :div, :
|
44
|
-
%button.close{:
|
45
|
-
span{:
|
46
|
-
span.sr-only Close
|
43
|
+
= content_tag :div, class: "alert alert-#{name == :error ? "danger" : "success" } alert-dismissable", role: "alert" do
|
44
|
+
%button.close{type: "button", data: {dismiss: "alert"} }
|
45
|
+
%span{aria: {hidden: "true"} } ×
|
46
|
+
%span.sr-only Close
|
47
47
|
= msg
|
48
48
|
= yield
|
@@ -29,7 +29,7 @@ html
|
|
29
29
|
span.icon-bar
|
30
30
|
span.icon-bar
|
31
31
|
span.icon-bar
|
32
|
-
= link_to "Project name", "#", :
|
32
|
+
= link_to "Project name", "#", class: "navbar-brand"
|
33
33
|
#navbar.collapse.navbar-collapse
|
34
34
|
ul.nav.navbar-nav
|
35
35
|
li.active
|
@@ -43,7 +43,7 @@ html
|
|
43
43
|
| Contact
|
44
44
|
.container
|
45
45
|
- flash.each do |name, msg|
|
46
|
-
= content_tag :div, :
|
46
|
+
= content_tag :div, class: "alert alert-#{ name == :error ? "danger" : "success" } alert-dismissable", role: "alert" do
|
47
47
|
button.close type="button" data-dismiss="alert"
|
48
48
|
span aria-hidden="true"
|
49
49
|
| ×
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<%%= link_to <%= index_helper %>_path, :
|
2
|
+
<%%= link_to <%= index_helper %>_path, class: 'btn btn-default' do %>
|
3
3
|
<span class="glyphicon glyphicon-list-alt"></span>
|
4
4
|
Back
|
5
5
|
<%% end %>
|
6
|
-
<%%= link_to @<%= singular_table_name %>, :
|
6
|
+
<%%= link_to @<%= singular_table_name %>, class: 'btn btn-primary' do %>
|
7
7
|
<span class="glyphicon glyphicon-info-sign"></span>
|
8
8
|
Show
|
9
9
|
<%% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<%%= link_to new_<%= singular_table_name %>_path, :
|
2
|
+
<%%= link_to new_<%= singular_table_name %>_path, class: 'btn btn-primary' do %>
|
3
3
|
<span class="glyphicon glyphicon-plus"></span>
|
4
4
|
New <%= human_name %>
|
5
5
|
<%% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<%%= link_to <%= index_helper %>_path, :
|
2
|
+
<%%= link_to <%= index_helper %>_path, class: 'btn btn-default' do %>
|
3
3
|
<span class="glyphicon glyphicon-list-alt"></span>
|
4
4
|
Back
|
5
5
|
<%% end %>
|
6
|
-
<%%= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :
|
6
|
+
<%%= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'btn btn-primary' do %>
|
7
7
|
<span class="glyphicon glyphicon-pencil"></span>
|
8
8
|
Edit
|
9
9
|
<%% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
.page-header
|
2
|
-
= link_to <%= index_helper %>_path, :
|
2
|
+
= link_to <%= index_helper %>_path, class: 'btn btn-default' do
|
3
3
|
%span.glyphicon.glyphicon-list-alt
|
4
4
|
Back
|
5
|
-
= link_to @<%= singular_table_name %>, :
|
5
|
+
= link_to @<%= singular_table_name %>, class: 'btn btn-primary' do
|
6
6
|
%span.glyphicon.glyphicon-info-sign
|
7
7
|
Show
|
8
8
|
%h1 Editing <%= singular_table_name %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.page-header
|
2
|
-
= link_to new_<%= singular_table_name %>_path, :
|
2
|
+
= link_to new_<%= singular_table_name %>_path, class: 'btn btn-primary' do
|
3
3
|
%span.glyphicon.glyphicon-plus
|
4
4
|
New <%= human_name %>
|
5
5
|
%h1 Listing <%= plural_table_name %>
|
@@ -23,4 +23,4 @@
|
|
23
23
|
<% end -%>
|
24
24
|
%td= link_to 'Show', <%= singular_table_name %>
|
25
25
|
%td= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>)
|
26
|
-
%td= link_to 'Destroy', <%= singular_table_name %>, :
|
26
|
+
%td= link_to 'Destroy', <%= singular_table_name %>, data: { confirm: 'Are you sure?' }, method: :delete
|
@@ -1,8 +1,8 @@
|
|
1
1
|
.page-header
|
2
|
-
= link_to <%= index_helper %>_path, :
|
2
|
+
= link_to <%= index_helper %>_path, class: 'btn btn-default' do
|
3
3
|
%span.glyphicon.glyphicon-list-alt
|
4
4
|
Back
|
5
|
-
= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), :
|
5
|
+
= link_to edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'btn btn-primary' do
|
6
6
|
%span.glyphicon.glyphicon-pencil
|
7
7
|
Edit
|
8
8
|
%h1 Show <%= singular_table_name %>
|