bootstrap-generators 2.3.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +12 -2
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/README.md +19 -64
- data/Rakefile +24 -22
- data/bootstrap-generators.gemspec +3 -1
- data/lib/bootstrap-generators.rb +12 -1
- data/lib/bootstrap/generators/version.rb +1 -1
- data/lib/generators/bootstrap/install/install_generator.rb +9 -24
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less +498 -179
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss +620 -0
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css → starter.css} +6 -6
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.less → starter.less} +7 -7
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/{fluid.css.scss → starter.scss} +7 -8
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.erb +11 -9
- data/lib/generators/bootstrap/install/templates/form_builders/form_builder/_form.html.haml +9 -8
- data/lib/generators/bootstrap/install/templates/layouts/starter.html.erb +50 -0
- data/lib/generators/bootstrap/install/templates/layouts/{hero.html.haml → starter.html.haml} +0 -0
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/edit.html.erb +3 -3
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/index.html.erb +25 -25
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/new.html.erb +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/erb/scaffold/show.html.erb +5 -5
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/edit.html.haml +3 -3
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/index.html.haml +20 -19
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/new.html.haml +2 -2
- data/lib/generators/bootstrap/install/templates/lib/templates/haml/scaffold/show.html.haml +5 -5
- data/readme-template.md.erb +5 -48
- data/test/lib/generators/bootstrap/install_generator_test.rb +3 -33
- data/vendor/assets/fonts/glyphicons-halflings-regular.eot +0 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.svg +228 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/vendor/assets/fonts/glyphicons-halflings-regular.woff +0 -0
- data/vendor/assets/javascripts/bootstrap-ie.js +2 -0
- data/vendor/assets/javascripts/bootstrap-ie/html5shiv.js +8 -0
- data/vendor/assets/javascripts/bootstrap-ie/respond.min.js +6 -0
- data/vendor/assets/javascripts/bootstrap.js +12 -13
- data/vendor/assets/javascripts/bootstrap/affix.js +126 -0
- data/vendor/assets/javascripts/{bootstrap-alert.js → bootstrap/alert.js} +35 -36
- data/vendor/assets/javascripts/bootstrap/button.js +109 -0
- data/vendor/assets/javascripts/bootstrap/carousel.js +217 -0
- data/vendor/assets/javascripts/bootstrap/collapse.js +179 -0
- data/vendor/assets/javascripts/bootstrap/dropdown.js +154 -0
- data/vendor/assets/javascripts/bootstrap/modal.js +246 -0
- data/vendor/assets/javascripts/bootstrap/popover.js +117 -0
- data/vendor/assets/javascripts/bootstrap/scrollspy.js +158 -0
- data/vendor/assets/javascripts/bootstrap/tab.js +135 -0
- data/vendor/assets/javascripts/bootstrap/tooltip.js +386 -0
- data/vendor/assets/javascripts/bootstrap/transition.js +56 -0
- data/vendor/assets/stylesheets/bootstrap.css +4638 -4000
- data/vendor/twitter/bootstrap/less/alerts.less +46 -58
- data/vendor/twitter/bootstrap/less/badges.less +51 -0
- data/vendor/twitter/bootstrap/less/bootstrap.less +27 -31
- data/vendor/twitter/bootstrap/less/breadcrumbs.less +7 -8
- data/vendor/twitter/bootstrap/less/button-groups.less +173 -154
- data/vendor/twitter/bootstrap/less/buttons.less +97 -165
- data/vendor/twitter/bootstrap/less/carousel.less +115 -64
- data/vendor/twitter/bootstrap/less/close.less +20 -19
- data/vendor/twitter/bootstrap/less/code.less +17 -22
- data/vendor/twitter/bootstrap/less/component-animations.less +10 -3
- data/vendor/twitter/bootstrap/less/dropdowns.less +92 -147
- data/vendor/twitter/bootstrap/less/forms.less +224 -561
- data/vendor/twitter/bootstrap/less/glyphicons.less +232 -0
- data/vendor/twitter/bootstrap/less/grid.less +336 -11
- data/vendor/twitter/bootstrap/less/input-groups.less +127 -0
- data/vendor/twitter/bootstrap/less/jumbotron.less +40 -0
- data/vendor/twitter/bootstrap/less/labels.less +58 -0
- data/vendor/twitter/bootstrap/less/list-group.less +88 -0
- data/vendor/twitter/bootstrap/less/media.less +8 -7
- data/vendor/twitter/bootstrap/less/mixins.less +487 -466
- data/vendor/twitter/bootstrap/less/modals.less +98 -52
- data/vendor/twitter/bootstrap/less/navbar.less +507 -383
- data/vendor/twitter/bootstrap/less/navs.less +169 -349
- data/vendor/twitter/bootstrap/less/normalize.less +396 -0
- data/vendor/twitter/bootstrap/less/pager.less +45 -33
- data/vendor/twitter/bootstrap/less/pagination.less +65 -105
- data/vendor/twitter/bootstrap/less/panels.less +148 -0
- data/vendor/twitter/bootstrap/less/popovers.less +51 -51
- data/vendor/twitter/bootstrap/less/print.less +100 -0
- data/vendor/twitter/bootstrap/less/progress-bars.less +28 -55
- data/vendor/twitter/bootstrap/less/responsive-utilities.less +195 -34
- data/vendor/twitter/bootstrap/less/scaffolding.less +101 -24
- data/vendor/twitter/bootstrap/less/tables.less +170 -178
- data/vendor/twitter/bootstrap/less/theme.less +232 -0
- data/vendor/twitter/bootstrap/less/thumbnails.less +11 -33
- data/vendor/twitter/bootstrap/less/tooltip.less +45 -20
- data/vendor/twitter/bootstrap/less/type.less +100 -109
- data/vendor/twitter/bootstrap/less/utilities.less +19 -7
- data/vendor/twitter/bootstrap/less/variables.less +498 -179
- data/vendor/twitter/bootstrap/less/wells.less +7 -7
- data/vendor/twitter/bootstrap/sass/_alerts.scss +46 -58
- data/vendor/twitter/bootstrap/sass/_badges.scss +51 -0
- data/vendor/twitter/bootstrap/sass/_breadcrumbs.scss +8 -9
- data/vendor/twitter/bootstrap/sass/_button-groups.scss +173 -154
- data/vendor/twitter/bootstrap/sass/_buttons.scss +97 -165
- data/vendor/twitter/bootstrap/sass/_carousel.scss +116 -65
- data/vendor/twitter/bootstrap/sass/_close.scss +9 -8
- data/vendor/twitter/bootstrap/sass/_code.scss +16 -21
- data/vendor/twitter/bootstrap/sass/_component-animations.scss +10 -3
- data/vendor/twitter/bootstrap/sass/_dropdowns.scss +94 -148
- data/vendor/twitter/bootstrap/sass/_forms.scss +220 -559
- data/vendor/twitter/bootstrap/sass/_glyphicons.scss +232 -0
- data/vendor/twitter/bootstrap/sass/_grid.scss +336 -11
- data/vendor/twitter/bootstrap/sass/_input-groups.scss +127 -0
- data/vendor/twitter/bootstrap/sass/_jumbotron.scss +40 -0
- data/vendor/twitter/bootstrap/sass/_labels.scss +58 -0
- data/vendor/twitter/bootstrap/sass/_list-group.scss +88 -0
- data/vendor/twitter/bootstrap/sass/_media.scss +8 -7
- data/vendor/twitter/bootstrap/sass/_mixins.scss +465 -433
- data/vendor/twitter/bootstrap/sass/_modals.scss +102 -52
- data/vendor/twitter/bootstrap/sass/_navbar.scss +511 -383
- data/vendor/twitter/bootstrap/sass/_navs.scss +169 -349
- data/vendor/twitter/bootstrap/sass/_normalize.scss +396 -0
- data/vendor/twitter/bootstrap/sass/_pager.scss +45 -33
- data/vendor/twitter/bootstrap/sass/_pagination.scss +65 -105
- data/vendor/twitter/bootstrap/sass/_panels.scss +148 -0
- data/vendor/twitter/bootstrap/sass/_popovers.scss +51 -51
- data/vendor/twitter/bootstrap/sass/_print.scss +100 -0
- data/vendor/twitter/bootstrap/sass/_progress-bars.scss +28 -55
- data/vendor/twitter/bootstrap/sass/_responsive-utilities.scss +180 -45
- data/vendor/twitter/bootstrap/sass/_scaffolding.scss +101 -24
- data/vendor/twitter/bootstrap/sass/_tables.scss +169 -168
- data/vendor/twitter/bootstrap/sass/_theme.scss +232 -0
- data/vendor/twitter/bootstrap/sass/_thumbnails.scss +11 -33
- data/vendor/twitter/bootstrap/sass/_tooltip.scss +45 -20
- data/vendor/twitter/bootstrap/sass/_type.scss +101 -110
- data/vendor/twitter/bootstrap/sass/_utilities.scss +19 -22
- data/vendor/twitter/bootstrap/sass/_variables.scss +498 -179
- data/vendor/twitter/bootstrap/sass/_wells.scss +7 -7
- data/vendor/twitter/bootstrap/sass/bootstrap.scss +29 -33
- metadata +47 -56
- data/lib/bootstrap/generators/engine.rb +0 -14
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.css.scss +0 -301
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css +0 -18
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.less +0 -19
- data/lib/generators/bootstrap/install/templates/assets/stylesheets/hero.css.scss +0 -19
- data/lib/generators/bootstrap/install/templates/config/initializers/simple_form.rb +0 -176
- data/lib/generators/bootstrap/install/templates/config/locales/simple_form.en.yml +0 -24
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.erb +0 -13
- data/lib/generators/bootstrap/install/templates/form_builders/simple_form/_form.html.haml +0 -10
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.erb +0 -80
- data/lib/generators/bootstrap/install/templates/layouts/fluid.html.haml +0 -94
- data/lib/generators/bootstrap/install/templates/layouts/hero.html.erb +0 -53
- data/vendor/assets/images/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/glyphicons-halflings.png +0 -0
- data/vendor/assets/javascripts/bootstrap-affix.js +0 -117
- data/vendor/assets/javascripts/bootstrap-button.js +0 -105
- data/vendor/assets/javascripts/bootstrap-carousel.js +0 -207
- data/vendor/assets/javascripts/bootstrap-collapse.js +0 -167
- data/vendor/assets/javascripts/bootstrap-dropdown.js +0 -169
- data/vendor/assets/javascripts/bootstrap-modal.js +0 -247
- data/vendor/assets/javascripts/bootstrap-popover.js +0 -114
- data/vendor/assets/javascripts/bootstrap-scrollspy.js +0 -162
- data/vendor/assets/javascripts/bootstrap-tab.js +0 -144
- data/vendor/assets/javascripts/bootstrap-tooltip.js +0 -361
- data/vendor/assets/javascripts/bootstrap-transition.js +0 -60
- data/vendor/assets/javascripts/bootstrap-typeahead.js +0 -335
- data/vendor/assets/stylesheets/bootstrap-responsive.css +0 -1109
- data/vendor/twitter/bootstrap/less/accordion.less +0 -34
- data/vendor/twitter/bootstrap/less/hero-unit.less +0 -25
- data/vendor/twitter/bootstrap/less/labels-badges.less +0 -84
- data/vendor/twitter/bootstrap/less/layouts.less +0 -16
- data/vendor/twitter/bootstrap/less/reset.less +0 -216
- data/vendor/twitter/bootstrap/less/responsive-1200px-min.less +0 -28
- data/vendor/twitter/bootstrap/less/responsive-767px-max.less +0 -193
- data/vendor/twitter/bootstrap/less/responsive-768px-979px.less +0 -19
- data/vendor/twitter/bootstrap/less/responsive-navbar.less +0 -189
- data/vendor/twitter/bootstrap/less/responsive.less +0 -48
- data/vendor/twitter/bootstrap/less/sprites.less +0 -197
- data/vendor/twitter/bootstrap/sass/_accordion.scss +0 -34
- data/vendor/twitter/bootstrap/sass/_hero-unit.scss +0 -25
- data/vendor/twitter/bootstrap/sass/_labels-badges.scss +0 -83
- data/vendor/twitter/bootstrap/sass/_layouts.scss +0 -16
- data/vendor/twitter/bootstrap/sass/_reset.scss +0 -216
- data/vendor/twitter/bootstrap/sass/_responsive-1200px-min.scss +0 -28
- data/vendor/twitter/bootstrap/sass/_responsive-767px-max.scss +0 -193
- data/vendor/twitter/bootstrap/sass/_responsive-768px-979px.scss +0 -19
- data/vendor/twitter/bootstrap/sass/_responsive-navbar.scss +0 -189
- data/vendor/twitter/bootstrap/sass/_sprites.scss +0 -197
- data/vendor/twitter/bootstrap/sass/responsive.scss +0 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f9a29d2113c2d2b744aff5611e03e66861eec058
|
4
|
+
data.tar.gz: 7f6431aa2b5cb3e54ceed9860f0d4e9ad3dad93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1e6eb32227a21c36a7337eab295f1a4eece5cf450ff15df4b3eb1cef559f0540a0cc06290b4546b27e3474228c1bf5162893e4ad3481dc018786f0dfe9c3812
|
7
|
+
data.tar.gz: 2107a3eadb94faf8eee87794df79019673a5eae559a569da0cbe5123f6733276329d4128eed26a6c6e7823b7cf674fd9de37c0bc435fe1a35dc2f6b36670f15d
|
data/Gemfile
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
#
|
3
|
+
# Declare your gem's dependencies in bootstrap_generators.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
4
6
|
gemspec
|
7
|
+
|
8
|
+
# Declare any dependencies that are still in development here instead of in
|
9
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
10
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
11
|
+
# your gem to rubygems.org.
|
12
|
+
|
13
|
+
# To use debugger
|
14
|
+
# gem 'debugger'
|
data/{LICENSE.txt → MIT-LICENSE}
RENAMED
data/README.md
CHANGED
@@ -2,30 +2,22 @@
|
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/decioferreira/bootstrap-generators.png?branch=master)](https://travis-ci.org/decioferreira/bootstrap-generators)
|
4
4
|
|
5
|
-
Bootstrap-generators provides [Twitter Bootstrap](http://twitter.github.com/bootstrap/) generators for Rails 4 (supported Rails >= 3.1). Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
|
5
|
+
Bootstrap-generators provides [Twitter Bootstrap](http://twitter.github.com/bootstrap/) generators for Rails 4 (supported Rails >= 3.1). Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites. Checkout http://decioferreira.github.com/bootstrap-generators.
|
6
6
|
|
7
7
|
## Current Twitter Bootstrap version
|
8
8
|
|
9
|
-
The current version of Twitter Bootstrap is
|
9
|
+
The current version of Twitter Bootstrap is 3.0.0.
|
10
10
|
|
11
11
|
## Installing Gem
|
12
12
|
|
13
13
|
In your Gemfile, add this line:
|
14
14
|
|
15
|
-
gem 'bootstrap-generators', '~>
|
15
|
+
gem 'bootstrap-generators', '~> 3.0'
|
16
16
|
|
17
17
|
Or you can install from latest build:
|
18
18
|
|
19
19
|
gem 'bootstrap-generators', :git => 'git://github.com/decioferreira/bootstrap-generators.git'
|
20
20
|
|
21
|
-
By default Bootstrap Generators requires [SimpleForm 2.0](https://github.com/plataformatec/simple_form). Add the dependency on your Gemfile:
|
22
|
-
|
23
|
-
gem 'simple_form'
|
24
|
-
|
25
|
-
If you don't want to use SimpleForm, just pass the `--form_builder=form_builder` option:
|
26
|
-
|
27
|
-
rails generate bootstrap:install --form_builder=form_builder
|
28
|
-
|
29
21
|
Run bundle install:
|
30
22
|
|
31
23
|
bundle install
|
@@ -40,7 +32,7 @@ Once you've done that, any time you generate a controller or scaffold, you'll ge
|
|
40
32
|
|
41
33
|
### Give it a try
|
42
34
|
|
43
|
-
rails generate scaffold post title
|
35
|
+
rails generate scaffold post title body:text published:boolean
|
44
36
|
|
45
37
|
You can easily customize colors, grid system, fonts, and much more by editing `bootstrap-variables.[less|scss]` on your application assets folder.
|
46
38
|
|
@@ -51,10 +43,6 @@ To print the options and usage run the command `rails generate bootstrap:install
|
|
51
43
|
rails generate bootstrap:install [options]
|
52
44
|
|
53
45
|
Options:
|
54
|
-
[--layout=LAYOUT] # Bootstrap layout templates (hero or fluid)
|
55
|
-
# Default: hero
|
56
|
-
[--form-builder=FORM_BUILDER] # Select your form builder (simple_form or form_builder)
|
57
|
-
# Default: simple_form
|
58
46
|
-e, [--template-engine=TEMPLATE_ENGINE] # Indicates when to generate template engine
|
59
47
|
# Default: erb
|
60
48
|
-se, [--stylesheet-engine=STYLESHEET_ENGINE] # Indicates when to generate stylesheet engine
|
@@ -70,33 +58,6 @@ To print the options and usage run the command `rails generate bootstrap:install
|
|
70
58
|
|
71
59
|
### Options
|
72
60
|
|
73
|
-
#### Layouts
|
74
|
-
|
75
|
-
There are the two available layouts, based on Bootstrap's quick-start examples:
|
76
|
-
|
77
|
-
* [Basic marketing site](http://getbootstrap.com/2.3.2/examples/hero.html) (default)
|
78
|
-
* [Fluid layout](http://getbootstrap.com/2.3.2/examples/fluid.html)
|
79
|
-
|
80
|
-
To select one of these layouts just pass the option `--layout=LAYOUT` to the install generator.
|
81
|
-
|
82
|
-
#### Form builders
|
83
|
-
|
84
|
-
* SimpleForm
|
85
|
-
|
86
|
-
By default Bootstrap Generators requires SimpleForm 2.0. Add the dependency on your Gemfile:
|
87
|
-
|
88
|
-
gem 'simple_form'
|
89
|
-
|
90
|
-
And then run:
|
91
|
-
|
92
|
-
rails generate bootstrap:install --form_builder=simple_form
|
93
|
-
|
94
|
-
* Default Rails form builder
|
95
|
-
|
96
|
-
If you don't want to use SimpleForm, just pass the `--form_builder=form_builder` option:
|
97
|
-
|
98
|
-
rails generate bootstrap:install --form_builder=form_builder
|
99
|
-
|
100
61
|
#### Template engines
|
101
62
|
|
102
63
|
Supported template engines:
|
@@ -104,8 +65,6 @@ Supported template engines:
|
|
104
65
|
* ERB
|
105
66
|
* Haml
|
106
67
|
|
107
|
-
##### Haml
|
108
|
-
|
109
68
|
Add the dependency on your Gemfile:
|
110
69
|
|
111
70
|
gem 'haml-rails'
|
@@ -122,8 +81,6 @@ Supported stylesheet engines:
|
|
122
81
|
* SCSS
|
123
82
|
* LESS
|
124
83
|
|
125
|
-
##### SCSS
|
126
|
-
|
127
84
|
Make sure you have `sass-rails` dependency on your Gemfile:
|
128
85
|
|
129
86
|
gem 'sass-rails'
|
@@ -134,10 +91,11 @@ And then run:
|
|
134
91
|
|
135
92
|
Now you can customize the look and feel of Bootstrap.
|
136
93
|
|
137
|
-
|
94
|
+
* LESS
|
138
95
|
|
139
96
|
Add the dependency on your Gemfile:
|
140
97
|
|
98
|
+
gem 'therubyracer', platforms: :ruby
|
141
99
|
gem 'less-rails'
|
142
100
|
|
143
101
|
And then run:
|
@@ -152,7 +110,7 @@ Now you can customize the look and feel of Bootstrap.
|
|
152
110
|
|
153
111
|
### Customize and extend Bootstrap
|
154
112
|
|
155
|
-
|
113
|
+
If you select LESS or SCSS as your stylesheet engine, you will get an `app/assets/stylesheets/bootstrap-variables.[less|scss]` file with all of the default variables of Bootstrap. This way you can customize the look and feel of Bootstrap without having to download any extra file.
|
156
114
|
|
157
115
|
### Javascript
|
158
116
|
|
@@ -162,20 +120,18 @@ Select all jQuery plugins (`app/assets/javascripts/bootstrap.js`)
|
|
162
120
|
|
163
121
|
Or quickly add only the necessary javascript (Transitions: required for any animation; Popovers: requires Tooltips)
|
164
122
|
|
165
|
-
//= require bootstrap
|
166
|
-
//= require bootstrap
|
167
|
-
//= require bootstrap
|
168
|
-
//= require bootstrap
|
169
|
-
//= require bootstrap
|
170
|
-
//= require bootstrap
|
171
|
-
//= require bootstrap
|
172
|
-
//= require bootstrap
|
173
|
-
//= require bootstrap
|
174
|
-
//= require bootstrap
|
175
|
-
//= require bootstrap
|
176
|
-
//= require bootstrap
|
177
|
-
//= require bootstrap-carousel
|
178
|
-
|
123
|
+
//= require bootstrap/transition
|
124
|
+
//= require bootstrap/collapse
|
125
|
+
//= require bootstrap/carousel
|
126
|
+
//= require bootstrap/button
|
127
|
+
//= require bootstrap/tooltip
|
128
|
+
//= require bootstrap/popover
|
129
|
+
//= require bootstrap/alert
|
130
|
+
//= require bootstrap/affix
|
131
|
+
//= require bootstrap/modal
|
132
|
+
//= require bootstrap/tab
|
133
|
+
//= require bootstrap/scrollspy
|
134
|
+
//= require bootstrap/dropdown
|
179
135
|
|
180
136
|
## Customizing Templates
|
181
137
|
|
@@ -187,6 +143,5 @@ Since Bootstrap Generators installs its templates under lib/templates, you can g
|
|
187
143
|
|
188
144
|
* [Twitter Bootstrap](http://twitter.github.com/bootstrap)
|
189
145
|
* [Twitter Bootstrap - Sass Conversion](https://github.com/jlong/sass-twitter-bootstrap)
|
190
|
-
* [SimpleForm](https://github.com/plataformatec/simple_form)
|
191
146
|
|
192
147
|
[customize]: #customize
|
data/Rakefile
CHANGED
@@ -12,13 +12,9 @@ task :default => :test
|
|
12
12
|
namespace :bootstrap do
|
13
13
|
desc "Update to a new version of Twitter Bootstrap"
|
14
14
|
task :update do
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
twitter_latest_dist_zip_url = "https://github.com/twbs/bootstrap/archive/v#{bootstrap_version}.zip"
|
19
|
-
twitter_sass_lastest_dist_zip_url = "https://github.com/jlong/sass-bootstrap/archive/v#{bootstrap_version}.zip"
|
20
|
-
twitter_bootstrap_dir = "tmp/bootstrap-#{bootstrap_version}"
|
21
|
-
twitter_sass_bootstrap_dir = "tmp/sass-bootstrap-#{bootstrap_version}"
|
15
|
+
twitter_latest_dist_zip_url = 'https://github.com/twbs/bootstrap/archive/v3.0.0.zip'
|
16
|
+
twitter_bootstrap_dir = 'tmp/bootstrap-3.0.0'
|
17
|
+
twitter_sass_bootstrap_dir = 'tmp/sass-bootstrap-3.0.0-sass2'
|
22
18
|
|
23
19
|
# Make sure tmp/ dir exists
|
24
20
|
Dir.mkdir('tmp') unless File.exists?('tmp')
|
@@ -27,7 +23,7 @@ namespace :bootstrap do
|
|
27
23
|
puts "Twitter Bootstrap already downloaded."
|
28
24
|
else
|
29
25
|
# Download the latest version of Twitter Bootstrap
|
30
|
-
`wget -O tmp/bootstrap.zip
|
26
|
+
`wget -O tmp/bootstrap.zip https://github.com/twbs/bootstrap/archive/v3.0.0.zip`
|
31
27
|
|
32
28
|
# Extract Twitter Bootstrap
|
33
29
|
`unzip -d tmp tmp/bootstrap.zip`
|
@@ -37,14 +33,14 @@ namespace :bootstrap do
|
|
37
33
|
puts "Twitter Bootstrap Sass already downloaded."
|
38
34
|
else
|
39
35
|
# Download the latest version of Twitter Bootstrap Sass
|
40
|
-
`wget -O tmp/sass-bootstrap.zip
|
36
|
+
`wget -O tmp/sass-bootstrap.zip https://github.com/jlong/sass-bootstrap/archive/v3.0.0-sass2.zip`
|
41
37
|
|
42
38
|
# Extract Twitter Bootstrap
|
43
39
|
`unzip -d tmp tmp/sass-bootstrap.zip`
|
44
40
|
end
|
45
41
|
|
46
42
|
# Reset Twitter Bootstrap JS files
|
47
|
-
bootstrap_javascript_dir = 'vendor/assets/javascripts'
|
43
|
+
bootstrap_javascript_dir = 'vendor/assets/javascripts/bootstrap'
|
48
44
|
bootstrap_main_javascript = 'vendor/assets/javascripts/bootstrap.js'
|
49
45
|
|
50
46
|
FileUtils.rm Dir.glob("#{bootstrap_javascript_dir}/*.js")
|
@@ -57,25 +53,24 @@ namespace :bootstrap do
|
|
57
53
|
end
|
58
54
|
|
59
55
|
# Make sure that tooltip.js is before popover.js (Popover requires tooltip.js)
|
60
|
-
tooltip_position = require_files.index('
|
61
|
-
popover_position = require_files.index('
|
56
|
+
tooltip_position = require_files.index('tooltip')
|
57
|
+
popover_position = require_files.index('popover')
|
62
58
|
require_files.insert(popover_position, require_files.delete_at(tooltip_position))
|
63
59
|
|
64
60
|
File.open(bootstrap_main_javascript, 'w') do |file|
|
65
61
|
require_files.each do |require_file|
|
66
|
-
file.write("//= require
|
62
|
+
file.write("//= require bootstrap/#{require_file}\n")
|
67
63
|
end
|
68
64
|
end
|
69
65
|
|
70
|
-
# Reset Twitter Bootstrap
|
71
|
-
|
66
|
+
# Reset Twitter Bootstrap Fonts
|
67
|
+
bootstrap_fonts_dir = 'vendor/assets/fonts'
|
72
68
|
|
73
|
-
FileUtils.rm Dir.glob("#{
|
74
|
-
FileUtils.cp Dir.glob("#{twitter_bootstrap_dir}/
|
69
|
+
FileUtils.rm Dir.glob("#{bootstrap_fonts_dir}/*")
|
70
|
+
FileUtils.cp Dir.glob("#{twitter_bootstrap_dir}/fonts/*"), bootstrap_fonts_dir
|
75
71
|
|
76
72
|
# Reset Twitter Bootstrap CSS file
|
77
|
-
FileUtils.cp "#{twitter_bootstrap_dir}/
|
78
|
-
FileUtils.cp "#{twitter_bootstrap_dir}/docs/assets/css/bootstrap-responsive.css", "vendor/assets/stylesheets/bootstrap-responsive.css"
|
73
|
+
FileUtils.cp "#{twitter_bootstrap_dir}/dist/css/bootstrap.css", "vendor/assets/stylesheets/bootstrap.css"
|
79
74
|
|
80
75
|
# Reset Twitter Bootstrap LESS files
|
81
76
|
bootstrap_less_dir = 'vendor/twitter/bootstrap/less'
|
@@ -91,17 +86,24 @@ namespace :bootstrap do
|
|
91
86
|
|
92
87
|
# Copy bootstrap variables
|
93
88
|
FileUtils.cp "#{bootstrap_less_dir}/variables.less", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less"
|
94
|
-
FileUtils.cp "#{bootstrap_sass_dir}/_variables.scss", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.
|
89
|
+
FileUtils.cp "#{bootstrap_sass_dir}/_variables.scss", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss"
|
95
90
|
|
96
91
|
# Change icon-font-path
|
97
|
-
["vendor/assets/stylesheets/bootstrap.css", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.
|
98
|
-
file_content = File.read(filepath).gsub("../
|
92
|
+
["vendor/assets/stylesheets/bootstrap.css", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.less", "lib/generators/bootstrap/install/templates/assets/stylesheets/bootstrap-variables.scss"].each do |filepath|
|
93
|
+
file_content = File.read(filepath).gsub("../fonts/", "/assets/")
|
99
94
|
File.open(filepath, 'w') { |file| file.puts file_content }
|
100
95
|
end
|
101
96
|
|
97
|
+
# IE
|
98
|
+
FileUtils.cp "#{twitter_bootstrap_dir}/assets/js/html5shiv.js", "vendor/assets/javascripts/bootstrap-ie/html5shiv.js"
|
99
|
+
FileUtils.cp "#{twitter_bootstrap_dir}/assets/js/respond.min.js", "vendor/assets/javascripts/bootstrap-ie/respond.min.js"
|
100
|
+
|
102
101
|
# Generate README.md
|
103
102
|
require 'erb'
|
104
103
|
|
104
|
+
bootstrap_version = "3.0.0"
|
105
|
+
striped_bootstrap_generators_version = "3.0"
|
106
|
+
|
105
107
|
javascript_bootstrap_content_code = ""
|
106
108
|
File.open(bootstrap_main_javascript, 'r').each_line do |line|
|
107
109
|
javascript_bootstrap_content_code += " #{line}"
|
@@ -1,7 +1,9 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
# Maintain your gem's version:
|
3
4
|
require "bootstrap/generators/version"
|
4
5
|
|
6
|
+
# Describe your gem and declare its dependencies:
|
5
7
|
Gem::Specification.new do |s|
|
6
8
|
s.name = "bootstrap-generators"
|
7
9
|
s.version = Bootstrap::Generators::VERSION
|
data/lib/bootstrap-generators.rb
CHANGED
@@ -1,5 +1,16 @@
|
|
1
|
+
require 'rails'
|
2
|
+
|
1
3
|
module Bootstrap
|
2
4
|
module Generators
|
3
|
-
|
5
|
+
class Engine < ::Rails::Engine
|
6
|
+
config.app_generators.stylesheets false
|
7
|
+
|
8
|
+
initializer 'bootstrap-generators.setup' do |app|
|
9
|
+
app.config.less.paths << File.expand_path('../../vendor/twitter/bootstrap/less', __FILE__) if app.config.respond_to?(:less)
|
10
|
+
app.config.assets.paths << File.expand_path('../../vendor/twitter/bootstrap/sass', __FILE__) if app.config.respond_to?(:sass)
|
11
|
+
|
12
|
+
app.config.assets.precompile += %w(bootstrap-ie.js)
|
13
|
+
end
|
14
|
+
end
|
4
15
|
end
|
5
16
|
end
|
@@ -1,12 +1,10 @@
|
|
1
|
-
require 'rails'
|
1
|
+
require 'rails/generators'
|
2
2
|
|
3
3
|
module Bootstrap
|
4
4
|
module Generators
|
5
5
|
class InstallGenerator < ::Rails::Generators::Base
|
6
6
|
desc 'Copy BootstrapGenerators default files'
|
7
7
|
source_root File.expand_path('../templates', __FILE__)
|
8
|
-
class_option :layout, :desc => 'Bootstrap layout templates (hero or fluid)', :default => 'hero', :type => :string
|
9
|
-
class_option :form_builder, :desc => 'Select your form builder (simple_form or form_builder)', :default => 'simple_form', :type => :string
|
10
8
|
|
11
9
|
class_option :template_engine
|
12
10
|
class_option :stylesheet_engine
|
@@ -16,39 +14,26 @@ module Bootstrap
|
|
16
14
|
end
|
17
15
|
|
18
16
|
def copy_form_builder
|
19
|
-
|
20
|
-
copy_file "form_builders/form_builder/_form.html.#{options[:template_engine]}", "lib/templates/#{options[:template_engine]}/scaffold/_form.html.#{options[:template_engine]}"
|
21
|
-
else
|
22
|
-
copy_file "form_builders/#{options[:form_builder]}/_form.html.#{options[:template_engine]}", "lib/templates/#{options[:template_engine]}/scaffold/_form.html.#{options[:template_engine]}"
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def copy_simple_form_config
|
27
|
-
if options[:form_builder] == 'simple_form'
|
28
|
-
directory 'config'
|
29
|
-
end
|
17
|
+
copy_file "form_builders/form_builder/_form.html.#{options[:template_engine]}", "lib/templates/#{options[:template_engine]}/scaffold/_form.html.#{options[:template_engine]}"
|
30
18
|
end
|
31
19
|
|
32
20
|
def create_layout
|
33
|
-
template "layouts
|
21
|
+
template "layouts/starter.html.#{options[:template_engine]}", "app/views/layouts/application.html.#{options[:template_engine]}"
|
34
22
|
end
|
35
23
|
|
36
24
|
def create_stylesheets
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
else
|
43
|
-
stylesheet_extension = "css.#{options[:stylesheet_engine]}"
|
25
|
+
stylesheet_extension = options[:stylesheet_engine] || 'css'
|
26
|
+
|
27
|
+
copy_file "assets/stylesheets/starter.#{stylesheet_extension}", "app/assets/stylesheets/bootstrap-generators.#{stylesheet_extension}"
|
28
|
+
|
29
|
+
if [:less, :scss].include?(options[:stylesheet_engine].to_sym)
|
44
30
|
copy_file "assets/stylesheets/bootstrap-variables.#{stylesheet_extension}", "app/assets/stylesheets/bootstrap-variables.#{stylesheet_extension}"
|
45
31
|
end
|
46
|
-
|
47
|
-
copy_file "assets/stylesheets/#{options[:layout]}.#{stylesheet_extension}", "app/assets/stylesheets/bootstrap-generators.#{stylesheet_extension}"
|
48
32
|
end
|
49
33
|
|
50
34
|
def inject_backbone
|
51
35
|
application_js_path = "app/assets/javascripts/application.js"
|
36
|
+
|
52
37
|
if File.exists?(File.join(destination_root, application_js_path))
|
53
38
|
inject_into_file application_js_path, :before => "//= require_tree" do
|
54
39
|
"//= require bootstrap\n"
|
@@ -6,131 +6,177 @@
|
|
6
6
|
// Global values
|
7
7
|
// --------------------------------------------------
|
8
8
|
|
9
|
-
|
10
9
|
// Grays
|
11
10
|
// -------------------------
|
12
|
-
@black: #000;
|
13
|
-
@grayDarker: #222;
|
14
|
-
@grayDark: #333;
|
15
|
-
@gray: #555;
|
16
|
-
@grayLight: #999;
|
17
|
-
@grayLighter: #eee;
|
18
|
-
@white: #fff;
|
19
11
|
|
12
|
+
@gray-darker: lighten(#000, 13.5%); // #222
|
13
|
+
@gray-dark: lighten(#000, 20%); // #333
|
14
|
+
@gray: lighten(#000, 33.5%); // #555
|
15
|
+
@gray-light: lighten(#000, 60%); // #999
|
16
|
+
@gray-lighter: lighten(#000, 93.5%); // #eee
|
20
17
|
|
21
|
-
//
|
18
|
+
// Brand colors
|
22
19
|
// -------------------------
|
23
|
-
@blue: #049cdb;
|
24
|
-
@blueDark: #0064cd;
|
25
|
-
@green: #46a546;
|
26
|
-
@red: #9d261d;
|
27
|
-
@yellow: #ffc40d;
|
28
|
-
@orange: #f89406;
|
29
|
-
@pink: #c3325f;
|
30
|
-
@purple: #7a43b6;
|
31
20
|
|
21
|
+
@brand-primary: #428bca;
|
22
|
+
@brand-success: #5cb85c;
|
23
|
+
@brand-warning: #f0ad4e;
|
24
|
+
@brand-danger: #d9534f;
|
25
|
+
@brand-info: #5bc0de;
|
32
26
|
|
33
27
|
// Scaffolding
|
34
28
|
// -------------------------
|
35
|
-
@bodyBackground: @white;
|
36
|
-
@textColor: @grayDark;
|
37
29
|
|
30
|
+
@body-bg: #fff;
|
31
|
+
@text-color: @gray-dark;
|
38
32
|
|
39
33
|
// Links
|
40
34
|
// -------------------------
|
41
|
-
@linkColor: #08c;
|
42
|
-
@linkColorHover: darken(@linkColor, 15%);
|
43
35
|
|
36
|
+
@link-color: @brand-primary;
|
37
|
+
@link-hover-color: darken(@link-color, 15%);
|
44
38
|
|
45
39
|
// Typography
|
46
40
|
// -------------------------
|
47
|
-
@sansFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
48
|
-
@serifFontFamily: Georgia, "Times New Roman", Times, serif;
|
49
|
-
@monoFontFamily: Monaco, Menlo, Consolas, "Courier New", monospace;
|
50
41
|
|
51
|
-
@
|
52
|
-
@
|
53
|
-
@
|
54
|
-
@
|
42
|
+
@font-family-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
43
|
+
@font-family-serif: Georgia, "Times New Roman", Times, serif;
|
44
|
+
@font-family-monospace: Monaco, Menlo, Consolas, "Courier New", monospace;
|
45
|
+
@font-family-base: @font-family-sans-serif;
|
46
|
+
|
47
|
+
@font-size-base: 14px;
|
48
|
+
@font-size-large: ceil(@font-size-base * 1.25); // ~18px
|
49
|
+
@font-size-small: ceil(@font-size-base * 0.85); // ~12px
|
50
|
+
|
51
|
+
@line-height-base: 1.428571429; // 20/14
|
52
|
+
@line-height-computed: floor(@font-size-base * @line-height-base); // ~20px
|
53
|
+
|
54
|
+
@headings-font-family: @font-family-base;
|
55
|
+
@headings-font-weight: 500;
|
56
|
+
@headings-line-height: 1.1;
|
55
57
|
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
// Iconography
|
59
|
+
// -------------------------
|
60
|
+
|
61
|
+
@icon-font-path: "/assets/";
|
62
|
+
@icon-font-name: "glyphicons-halflings-regular";
|
59
63
|
|
60
64
|
|
61
|
-
//
|
65
|
+
// Components
|
62
66
|
// -------------------------
|
63
|
-
// Based on 14px font-size and
|
67
|
+
// Based on 14px font-size and 1.428 line-height (~20px to start)
|
68
|
+
|
69
|
+
@padding-base-vertical: 6px;
|
70
|
+
@padding-base-horizontal: 12px;
|
71
|
+
|
72
|
+
@padding-large-vertical: 10px;
|
73
|
+
@padding-large-horizontal: 16px;
|
64
74
|
|
65
|
-
@
|
66
|
-
@
|
67
|
-
@fontSizeMini: @baseFontSize * 0.75; // ~11px
|
75
|
+
@padding-small-vertical: 5px;
|
76
|
+
@padding-small-horizontal: 10px;
|
68
77
|
|
69
|
-
@
|
70
|
-
@
|
71
|
-
@paddingMini: 0 6px; // 22px
|
78
|
+
@line-height-large: 1.33;
|
79
|
+
@line-height-small: 1.5;
|
72
80
|
|
73
|
-
@
|
74
|
-
@
|
75
|
-
@
|
81
|
+
@border-radius-base: 4px;
|
82
|
+
@border-radius-large: 6px;
|
83
|
+
@border-radius-small: 3px;
|
76
84
|
|
85
|
+
@component-active-bg: @brand-primary;
|
86
|
+
|
87
|
+
@caret-width-base: 4px;
|
88
|
+
@caret-width-large: 5px;
|
77
89
|
|
78
90
|
// Tables
|
79
91
|
// -------------------------
|
80
|
-
|
81
|
-
@
|
82
|
-
@
|
83
|
-
|
92
|
+
|
93
|
+
@table-cell-padding: 8px;
|
94
|
+
@table-condensed-cell-padding: 5px;
|
95
|
+
|
96
|
+
@table-bg: transparent; // overall background-color
|
97
|
+
@table-bg-accent: #f9f9f9; // for striping
|
98
|
+
@table-bg-hover: #f5f5f5;
|
99
|
+
@table-bg-active: @table-bg-hover;
|
100
|
+
|
101
|
+
@table-border-color: #ddd; // table and cell border
|
102
|
+
|
84
103
|
|
85
104
|
// Buttons
|
86
105
|
// -------------------------
|
87
|
-
@btnBackground: @white;
|
88
|
-
@btnBackgroundHighlight: darken(@white, 10%);
|
89
|
-
@btnBorder: #ccc;
|
90
106
|
|
91
|
-
@
|
92
|
-
|
107
|
+
@btn-font-weight: normal;
|
108
|
+
|
109
|
+
@btn-default-color: #333;
|
110
|
+
@btn-default-bg: #fff;
|
111
|
+
@btn-default-border: #ccc;
|
112
|
+
|
113
|
+
@btn-primary-color: #fff;
|
114
|
+
@btn-primary-bg: @brand-primary;
|
115
|
+
@btn-primary-border: darken(@btn-primary-bg, 5%);
|
93
116
|
|
94
|
-
@
|
95
|
-
@
|
117
|
+
@btn-success-color: #fff;
|
118
|
+
@btn-success-bg: @brand-success;
|
119
|
+
@btn-success-border: darken(@btn-success-bg, 5%);
|
96
120
|
|
97
|
-
@
|
98
|
-
@
|
121
|
+
@btn-warning-color: #fff;
|
122
|
+
@btn-warning-bg: @brand-warning;
|
123
|
+
@btn-warning-border: darken(@btn-warning-bg, 5%);
|
99
124
|
|
100
|
-
@
|
101
|
-
@
|
125
|
+
@btn-danger-color: #fff;
|
126
|
+
@btn-danger-bg: @brand-danger;
|
127
|
+
@btn-danger-border: darken(@btn-danger-bg, 5%);
|
102
128
|
|
103
|
-
@
|
104
|
-
@
|
129
|
+
@btn-info-color: #fff;
|
130
|
+
@btn-info-bg: @brand-info;
|
131
|
+
@btn-info-border: darken(@btn-info-bg, 5%);
|
105
132
|
|
106
|
-
@
|
107
|
-
@btnInverseBackgroundHighlight: @grayDarker;
|
133
|
+
@btn-link-disabled-color: @gray-light;
|
108
134
|
|
109
135
|
|
110
136
|
// Forms
|
111
137
|
// -------------------------
|
112
|
-
|
113
|
-
@
|
114
|
-
@
|
115
|
-
|
116
|
-
@
|
117
|
-
@
|
138
|
+
|
139
|
+
@input-bg: #fff;
|
140
|
+
@input-bg-disabled: @gray-lighter;
|
141
|
+
|
142
|
+
@input-color: @gray;
|
143
|
+
@input-border: #ccc;
|
144
|
+
@input-border-radius: @border-radius-base;
|
145
|
+
@input-border-focus: #66afe9;
|
146
|
+
|
147
|
+
@input-color-placeholder: @gray-light;
|
148
|
+
|
149
|
+
@input-height-base: (@line-height-computed + (@padding-base-vertical * 2) + 2);
|
150
|
+
@input-height-large: (floor(@font-size-large * @line-height-large) + (@padding-large-vertical * 2) + 2);
|
151
|
+
@input-height-small: (floor(@font-size-small * @line-height-small) + (@padding-small-vertical * 2) + 2);
|
152
|
+
|
153
|
+
@legend-color: @gray-dark;
|
154
|
+
@legend-border-color: #e5e5e5;
|
155
|
+
|
156
|
+
@input-group-addon-bg: @gray-lighter;
|
157
|
+
@input-group-addon-border-color: @input-border;
|
118
158
|
|
119
159
|
|
120
160
|
// Dropdowns
|
121
161
|
// -------------------------
|
122
|
-
@dropdownBackground: @white;
|
123
|
-
@dropdownBorder: rgba(0,0,0,.2);
|
124
|
-
@dropdownDividerTop: #e5e5e5;
|
125
|
-
@dropdownDividerBottom: @white;
|
126
162
|
|
127
|
-
@
|
128
|
-
@
|
129
|
-
@
|
163
|
+
@dropdown-bg: #fff;
|
164
|
+
@dropdown-border: rgba(0,0,0,.15);
|
165
|
+
@dropdown-fallback-border: #ccc;
|
166
|
+
@dropdown-divider-bg: #e5e5e5;
|
167
|
+
|
168
|
+
@dropdown-link-active-color: #fff;
|
169
|
+
@dropdown-link-active-bg: @component-active-bg;
|
170
|
+
|
171
|
+
@dropdown-link-color: @gray-dark;
|
172
|
+
@dropdown-link-hover-color: #fff;
|
173
|
+
@dropdown-link-hover-bg: @dropdown-link-active-bg;
|
130
174
|
|
131
|
-
@
|
132
|
-
@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
|
175
|
+
@dropdown-link-disabled-color: @gray-light;
|
133
176
|
|
177
|
+
@dropdown-header-color: @gray-light;
|
178
|
+
|
179
|
+
@dropdown-caret-color: #000;
|
134
180
|
|
135
181
|
|
136
182
|
// COMPONENT VARIABLES
|
@@ -141,161 +187,434 @@
|
|
141
187
|
// -------------------------
|
142
188
|
// Used for a bird's eye view of components dependent on the z-axis
|
143
189
|
// Try to avoid customizing these :)
|
144
|
-
@zindexDropdown: 1000;
|
145
|
-
@zindexPopover: 1010;
|
146
|
-
@zindexTooltip: 1030;
|
147
|
-
@zindexFixedNavbar: 1030;
|
148
|
-
@zindexModalBackdrop: 1040;
|
149
|
-
@zindexModal: 1050;
|
150
190
|
|
191
|
+
@zindex-navbar: 1000;
|
192
|
+
@zindex-dropdown: 1000;
|
193
|
+
@zindex-popover: 1010;
|
194
|
+
@zindex-tooltip: 1030;
|
195
|
+
@zindex-navbar-fixed: 1030;
|
196
|
+
@zindex-modal-background: 1040;
|
197
|
+
@zindex-modal: 1050;
|
198
|
+
|
199
|
+
// Media queries breakpoints
|
200
|
+
// --------------------------------------------------
|
201
|
+
|
202
|
+
// Extra small screen / phone
|
203
|
+
@screen-xs: 480px;
|
204
|
+
@screen-phone: @screen-xs;
|
205
|
+
|
206
|
+
// Small screen / tablet
|
207
|
+
@screen-sm: 768px;
|
208
|
+
@screen-tablet: @screen-sm;
|
209
|
+
|
210
|
+
// Medium screen / desktop
|
211
|
+
@screen-md: 992px;
|
212
|
+
@screen-desktop: @screen-md;
|
213
|
+
|
214
|
+
// Large screen / wide desktop
|
215
|
+
@screen-lg: 1200px;
|
216
|
+
@screen-lg-desktop: @screen-lg;
|
151
217
|
|
152
|
-
//
|
218
|
+
// So media queries don't overlap when required, provide a maximum
|
219
|
+
@screen-xs-max: (@screen-sm - 1);
|
220
|
+
@screen-sm-max: (@screen-md - 1);
|
221
|
+
@screen-md-max: (@screen-lg - 1);
|
222
|
+
|
223
|
+
|
224
|
+
// Grid system
|
225
|
+
// --------------------------------------------------
|
226
|
+
|
227
|
+
// Number of columns in the grid system
|
228
|
+
@grid-columns: 12;
|
229
|
+
// Padding, to be divided by two and applied to the left and right of all columns
|
230
|
+
@grid-gutter-width: 30px;
|
231
|
+
// Point at which the navbar stops collapsing
|
232
|
+
@grid-float-breakpoint: @screen-tablet;
|
233
|
+
|
234
|
+
|
235
|
+
// Navbar
|
153
236
|
// -------------------------
|
154
|
-
|
155
|
-
|
237
|
+
|
238
|
+
// Basics of a navbar
|
239
|
+
@navbar-height: 50px;
|
240
|
+
@navbar-margin-bottom: @line-height-computed;
|
241
|
+
@navbar-default-color: #777;
|
242
|
+
@navbar-default-bg: #f8f8f8;
|
243
|
+
@navbar-default-border: darken(@navbar-default-bg, 6.5%);
|
244
|
+
@navbar-border-radius: @border-radius-base;
|
245
|
+
@navbar-padding-horizontal: floor(@grid-gutter-width / 2);
|
246
|
+
@navbar-padding-vertical: ((@navbar-height - @line-height-computed) / 2);
|
247
|
+
|
248
|
+
// Navbar links
|
249
|
+
@navbar-default-link-color: #777;
|
250
|
+
@navbar-default-link-hover-color: #333;
|
251
|
+
@navbar-default-link-hover-bg: transparent;
|
252
|
+
@navbar-default-link-active-color: #555;
|
253
|
+
@navbar-default-link-active-bg: darken(@navbar-default-bg, 6.5%);
|
254
|
+
@navbar-default-link-disabled-color: #ccc;
|
255
|
+
@navbar-default-link-disabled-bg: transparent;
|
256
|
+
|
257
|
+
// Navbar brand label
|
258
|
+
@navbar-default-brand-color: @navbar-default-link-color;
|
259
|
+
@navbar-default-brand-hover-color: darken(@navbar-default-link-color, 10%);
|
260
|
+
@navbar-default-brand-hover-bg: transparent;
|
261
|
+
|
262
|
+
// Navbar toggle
|
263
|
+
@navbar-default-toggle-hover-bg: #ddd;
|
264
|
+
@navbar-default-toggle-icon-bar-bg: #ccc;
|
265
|
+
@navbar-default-toggle-border-color: #ddd;
|
156
266
|
|
157
267
|
|
158
|
-
//
|
268
|
+
// Inverted navbar
|
269
|
+
//
|
270
|
+
// Reset inverted navbar basics
|
271
|
+
@navbar-inverse-color: @gray-light;
|
272
|
+
@navbar-inverse-bg: #222;
|
273
|
+
@navbar-inverse-border: darken(@navbar-inverse-bg, 10%);
|
274
|
+
|
275
|
+
// Inverted navbar links
|
276
|
+
@navbar-inverse-link-color: @gray-light;
|
277
|
+
@navbar-inverse-link-hover-color: #fff;
|
278
|
+
@navbar-inverse-link-hover-bg: transparent;
|
279
|
+
@navbar-inverse-link-active-color: @navbar-inverse-link-hover-color;
|
280
|
+
@navbar-inverse-link-active-bg: darken(@navbar-inverse-bg, 10%);
|
281
|
+
@navbar-inverse-link-disabled-color: #444;
|
282
|
+
@navbar-inverse-link-disabled-bg: transparent;
|
283
|
+
|
284
|
+
// Inverted navbar brand label
|
285
|
+
@navbar-inverse-brand-color: @navbar-inverse-link-color;
|
286
|
+
@navbar-inverse-brand-hover-color: #fff;
|
287
|
+
@navbar-inverse-brand-hover-bg: transparent;
|
288
|
+
|
289
|
+
// Inverted navbar search
|
290
|
+
// Normal navbar needs no special styles or vars
|
291
|
+
@navbar-inverse-search-bg: lighten(@navbar-inverse-bg, 25%);
|
292
|
+
@navbar-inverse-search-bg-focus: #fff;
|
293
|
+
@navbar-inverse-search-border: @navbar-inverse-bg;
|
294
|
+
@navbar-inverse-search-placeholder-color: #ccc;
|
295
|
+
|
296
|
+
// Inverted navbar toggle
|
297
|
+
@navbar-inverse-toggle-hover-bg: #333;
|
298
|
+
@navbar-inverse-toggle-icon-bar-bg: #fff;
|
299
|
+
@navbar-inverse-toggle-border-color: #333;
|
300
|
+
|
301
|
+
|
302
|
+
// Navs
|
159
303
|
// -------------------------
|
160
|
-
@placeholderText: @grayLight;
|
161
304
|
|
305
|
+
@nav-link-padding: 10px 15px;
|
306
|
+
@nav-link-hover-bg: @gray-lighter;
|
162
307
|
|
163
|
-
|
308
|
+
@nav-disabled-link-color: @gray-light;
|
309
|
+
@nav-disabled-link-hover-color: @gray-light;
|
310
|
+
|
311
|
+
@nav-open-link-hover-color: #fff;
|
312
|
+
@nav-open-caret-border-color: #fff;
|
313
|
+
|
314
|
+
// Tabs
|
315
|
+
@nav-tabs-border-color: #ddd;
|
316
|
+
|
317
|
+
@nav-tabs-link-hover-border-color: @gray-lighter;
|
318
|
+
|
319
|
+
@nav-tabs-active-link-hover-bg: @body-bg;
|
320
|
+
@nav-tabs-active-link-hover-color: @gray;
|
321
|
+
@nav-tabs-active-link-hover-border-color: #ddd;
|
322
|
+
|
323
|
+
@nav-tabs-justified-link-border-color: #ddd;
|
324
|
+
@nav-tabs-justified-active-link-border-color: @body-bg;
|
325
|
+
|
326
|
+
// Pills
|
327
|
+
@nav-pills-active-link-hover-bg: @component-active-bg;
|
328
|
+
@nav-pills-active-link-hover-color: #fff;
|
329
|
+
|
330
|
+
|
331
|
+
// Pagination
|
164
332
|
// -------------------------
|
165
|
-
@hrBorder: @grayLighter;
|
166
333
|
|
334
|
+
@pagination-bg: #fff;
|
335
|
+
@pagination-border: #ddd;
|
167
336
|
|
168
|
-
|
337
|
+
@pagination-hover-bg: @gray-lighter;
|
338
|
+
|
339
|
+
@pagination-active-bg: @brand-primary;
|
340
|
+
@pagination-active-color: #fff;
|
341
|
+
|
342
|
+
@pagination-disabled-color: @gray-light;
|
343
|
+
|
344
|
+
|
345
|
+
// Pager
|
169
346
|
// -------------------------
|
170
|
-
@horizontalComponentOffset: 180px;
|
171
347
|
|
348
|
+
@pager-border-radius: 15px;
|
349
|
+
@pager-disabled-color: @gray-light;
|
172
350
|
|
173
|
-
|
351
|
+
|
352
|
+
// Jumbotron
|
174
353
|
// -------------------------
|
175
|
-
@wellBackground: #f5f5f5;
|
176
354
|
|
355
|
+
@jumbotron-padding: 30px;
|
356
|
+
@jumbotron-color: inherit;
|
357
|
+
@jumbotron-bg: @gray-lighter;
|
177
358
|
|
178
|
-
|
359
|
+
@jumbotron-heading-color: inherit;
|
360
|
+
|
361
|
+
|
362
|
+
// Form states and alerts
|
179
363
|
// -------------------------
|
180
|
-
@navbarCollapseWidth: 979px;
|
181
|
-
@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
|
182
364
|
|
183
|
-
@
|
184
|
-
@
|
185
|
-
@
|
186
|
-
@navbarBorder: darken(@navbarBackground, 12%);
|
365
|
+
@state-warning-text: #c09853;
|
366
|
+
@state-warning-bg: #fcf8e3;
|
367
|
+
@state-warning-border: darken(spin(@state-warning-bg, -10), 3%);
|
187
368
|
|
188
|
-
@
|
189
|
-
@
|
190
|
-
@
|
191
|
-
@navbarLinkColorActive: @gray;
|
192
|
-
@navbarLinkBackgroundHover: transparent;
|
193
|
-
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
|
369
|
+
@state-danger-text: #b94a48;
|
370
|
+
@state-danger-bg: #f2dede;
|
371
|
+
@state-danger-border: darken(spin(@state-danger-bg, -10), 3%);
|
194
372
|
|
195
|
-
@
|
373
|
+
@state-success-text: #468847;
|
374
|
+
@state-success-bg: #dff0d8;
|
375
|
+
@state-success-border: darken(spin(@state-success-bg, -10), 5%);
|
196
376
|
|
197
|
-
|
198
|
-
@
|
199
|
-
@
|
200
|
-
@navbarInverseBorder: #252525;
|
377
|
+
@state-info-text: #3a87ad;
|
378
|
+
@state-info-bg: #d9edf7;
|
379
|
+
@state-info-border: darken(spin(@state-info-bg, -10), 7%);
|
201
380
|
|
202
|
-
@navbarInverseText: @grayLight;
|
203
|
-
@navbarInverseLinkColor: @grayLight;
|
204
|
-
@navbarInverseLinkColorHover: @white;
|
205
|
-
@navbarInverseLinkColorActive: @navbarInverseLinkColorHover;
|
206
|
-
@navbarInverseLinkBackgroundHover: transparent;
|
207
|
-
@navbarInverseLinkBackgroundActive: @navbarInverseBackground;
|
208
381
|
|
209
|
-
|
210
|
-
|
211
|
-
@
|
212
|
-
@
|
382
|
+
// Tooltips
|
383
|
+
// -------------------------
|
384
|
+
@tooltip-max-width: 200px;
|
385
|
+
@tooltip-color: #fff;
|
386
|
+
@tooltip-bg: #000;
|
213
387
|
|
214
|
-
@
|
388
|
+
@tooltip-arrow-width: 5px;
|
389
|
+
@tooltip-arrow-color: @tooltip-bg;
|
215
390
|
|
216
391
|
|
217
|
-
//
|
392
|
+
// Popovers
|
218
393
|
// -------------------------
|
219
|
-
@
|
220
|
-
@
|
221
|
-
@
|
394
|
+
@popover-bg: #fff;
|
395
|
+
@popover-max-width: 276px;
|
396
|
+
@popover-border-color: rgba(0,0,0,.2);
|
397
|
+
@popover-fallback-border-color: #ccc;
|
398
|
+
|
399
|
+
@popover-title-bg: darken(@popover-bg, 3%);
|
400
|
+
|
401
|
+
@popover-arrow-width: 10px;
|
402
|
+
@popover-arrow-color: #fff;
|
403
|
+
|
404
|
+
@popover-arrow-outer-width: (@popover-arrow-width + 1);
|
405
|
+
@popover-arrow-outer-color: rgba(0,0,0,.25);
|
406
|
+
@popover-arrow-outer-fallback-color: #999;
|
222
407
|
|
223
408
|
|
224
|
-
//
|
409
|
+
// Labels
|
225
410
|
// -------------------------
|
226
|
-
@heroUnitBackground: @grayLighter;
|
227
|
-
@heroUnitHeadingColor: inherit;
|
228
|
-
@heroUnitLeadColor: inherit;
|
229
411
|
|
412
|
+
@label-default-bg: @gray-light;
|
413
|
+
@label-primary-bg: @brand-primary;
|
414
|
+
@label-success-bg: @brand-success;
|
415
|
+
@label-info-bg: @brand-info;
|
416
|
+
@label-warning-bg: @brand-warning;
|
417
|
+
@label-danger-bg: @brand-danger;
|
230
418
|
|
231
|
-
|
419
|
+
@label-color: #fff;
|
420
|
+
@label-link-hover-color: #fff;
|
421
|
+
|
422
|
+
|
423
|
+
// Modals
|
232
424
|
// -------------------------
|
233
|
-
@
|
234
|
-
@warningBackground: #fcf8e3;
|
235
|
-
@warningBorder: darken(spin(@warningBackground, -10), 3%);
|
425
|
+
@modal-inner-padding: 20px;
|
236
426
|
|
237
|
-
@
|
238
|
-
@
|
239
|
-
@errorBorder: darken(spin(@errorBackground, -10), 3%);
|
427
|
+
@modal-title-padding: 15px;
|
428
|
+
@modal-title-line-height: @line-height-base;
|
240
429
|
|
241
|
-
@
|
242
|
-
@
|
243
|
-
@
|
430
|
+
@modal-content-bg: #fff;
|
431
|
+
@modal-content-border-color: rgba(0,0,0,.2);
|
432
|
+
@modal-content-fallback-border-color: #999;
|
244
433
|
|
245
|
-
@
|
246
|
-
@
|
247
|
-
@
|
434
|
+
@modal-backdrop-bg: #000;
|
435
|
+
@modal-header-border-color: #e5e5e5;
|
436
|
+
@modal-footer-border-color: @modal-header-border-color;
|
248
437
|
|
249
438
|
|
250
|
-
//
|
439
|
+
// Alerts
|
251
440
|
// -------------------------
|
252
|
-
@
|
253
|
-
@
|
254
|
-
@
|
255
|
-
@tooltipArrowColor: @tooltipBackground;
|
441
|
+
@alert-padding: 15px;
|
442
|
+
@alert-border-radius: @border-radius-base;
|
443
|
+
@alert-link-font-weight: bold;
|
256
444
|
|
257
|
-
@
|
258
|
-
@
|
259
|
-
@
|
260
|
-
@popoverTitleBackground: darken(@popoverBackground, 3%);
|
445
|
+
@alert-success-bg: @state-success-bg;
|
446
|
+
@alert-success-text: @state-success-text;
|
447
|
+
@alert-success-border: @state-success-border;
|
261
448
|
|
262
|
-
|
263
|
-
@
|
264
|
-
@
|
449
|
+
@alert-info-bg: @state-info-bg;
|
450
|
+
@alert-info-text: @state-info-text;
|
451
|
+
@alert-info-border: @state-info-border;
|
265
452
|
|
453
|
+
@alert-warning-bg: @state-warning-bg;
|
454
|
+
@alert-warning-text: @state-warning-text;
|
455
|
+
@alert-warning-border: @state-warning-border;
|
266
456
|
|
457
|
+
@alert-danger-bg: @state-danger-bg;
|
458
|
+
@alert-danger-text: @state-danger-text;
|
459
|
+
@alert-danger-border: @state-danger-border;
|
267
460
|
|
268
|
-
|
269
|
-
//
|
461
|
+
|
462
|
+
// Progress bars
|
463
|
+
// -------------------------
|
464
|
+
@progress-bg: #f5f5f5;
|
465
|
+
@progress-bar-color: #fff;
|
466
|
+
|
467
|
+
@progress-bar-bg: @brand-primary;
|
468
|
+
@progress-bar-success-bg: @brand-success;
|
469
|
+
@progress-bar-warning-bg: @brand-warning;
|
470
|
+
@progress-bar-danger-bg: @brand-danger;
|
471
|
+
@progress-bar-info-bg: @brand-info;
|
270
472
|
|
271
473
|
|
272
|
-
//
|
474
|
+
// List group
|
273
475
|
// -------------------------
|
274
|
-
@
|
275
|
-
@
|
276
|
-
@
|
277
|
-
@gridRowWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1));
|
476
|
+
@list-group-bg: #fff;
|
477
|
+
@list-group-border: #ddd;
|
478
|
+
@list-group-border-radius: @border-radius-base;
|
278
479
|
|
279
|
-
|
280
|
-
@
|
281
|
-
@
|
282
|
-
@
|
480
|
+
@list-group-hover-bg: #f5f5f5;
|
481
|
+
@list-group-active-color: #fff;
|
482
|
+
@list-group-active-bg: @component-active-bg;
|
483
|
+
@list-group-active-border: @list-group-active-bg;
|
283
484
|
|
284
|
-
|
285
|
-
@
|
286
|
-
@gridGutterWidth768: 20px;
|
287
|
-
@gridRowWidth768: (@gridColumns * @gridColumnWidth768) + (@gridGutterWidth768 * (@gridColumns - 1));
|
485
|
+
@list-group-link-color: #555;
|
486
|
+
@list-group-link-heading-color: #333;
|
288
487
|
|
289
488
|
|
290
|
-
//
|
489
|
+
// Panels
|
291
490
|
// -------------------------
|
292
|
-
@
|
293
|
-
@
|
491
|
+
@panel-bg: #fff;
|
492
|
+
@panel-inner-border: #ddd;
|
493
|
+
@panel-border-radius: @border-radius-base;
|
494
|
+
@panel-footer-bg: #f5f5f5;
|
495
|
+
|
496
|
+
@panel-default-text: @gray-dark;
|
497
|
+
@panel-default-border: #ddd;
|
498
|
+
@panel-default-heading-bg: #f5f5f5;
|
499
|
+
|
500
|
+
@panel-primary-text: #fff;
|
501
|
+
@panel-primary-border: @brand-primary;
|
502
|
+
@panel-primary-heading-bg: @brand-primary;
|
503
|
+
|
504
|
+
@panel-success-text: @state-success-text;
|
505
|
+
@panel-success-border: @state-success-border;
|
506
|
+
@panel-success-heading-bg: @state-success-bg;
|
507
|
+
|
508
|
+
@panel-warning-text: @state-warning-text;
|
509
|
+
@panel-warning-border: @state-warning-border;
|
510
|
+
@panel-warning-heading-bg: @state-warning-bg;
|
511
|
+
|
512
|
+
@panel-danger-text: @state-danger-text;
|
513
|
+
@panel-danger-border: @state-danger-border;
|
514
|
+
@panel-danger-heading-bg: @state-danger-bg;
|
515
|
+
|
516
|
+
@panel-info-text: @state-info-text;
|
517
|
+
@panel-info-border: @state-info-border;
|
518
|
+
@panel-info-heading-bg: @state-info-bg;
|
519
|
+
|
520
|
+
|
521
|
+
// Thumbnails
|
522
|
+
// -------------------------
|
523
|
+
@thumbnail-padding: 4px;
|
524
|
+
@thumbnail-bg: @body-bg;
|
525
|
+
@thumbnail-border: #ddd;
|
526
|
+
@thumbnail-border-radius: @border-radius-base;
|
527
|
+
|
528
|
+
@thumbnail-caption-color: @text-color;
|
529
|
+
@thumbnail-caption-padding: 9px;
|
530
|
+
|
531
|
+
|
532
|
+
// Wells
|
533
|
+
// -------------------------
|
534
|
+
@well-bg: #f5f5f5;
|
535
|
+
|
536
|
+
|
537
|
+
// Badges
|
538
|
+
// -------------------------
|
539
|
+
@badge-color: #fff;
|
540
|
+
@badge-link-hover-color: #fff;
|
541
|
+
@badge-bg: @gray-light;
|
542
|
+
|
543
|
+
@badge-active-color: @link-color;
|
544
|
+
@badge-active-bg: #fff;
|
545
|
+
|
546
|
+
@badge-font-weight: bold;
|
547
|
+
@badge-line-height: 1;
|
548
|
+
@badge-border-radius: 10px;
|
549
|
+
|
550
|
+
|
551
|
+
// Breadcrumbs
|
552
|
+
// -------------------------
|
553
|
+
@breadcrumb-bg: #f5f5f5;
|
554
|
+
@breadcrumb-color: #ccc;
|
555
|
+
@breadcrumb-active-color: @gray-light;
|
556
|
+
|
557
|
+
|
558
|
+
// Carousel
|
559
|
+
// ------------------------
|
560
|
+
|
561
|
+
@carousel-text-shadow: 0 1px 2px rgba(0,0,0,.6);
|
562
|
+
|
563
|
+
@carousel-control-color: #fff;
|
564
|
+
@carousel-control-width: 15%;
|
565
|
+
@carousel-control-opacity: .5;
|
566
|
+
@carousel-control-font-size: 20px;
|
567
|
+
|
568
|
+
@carousel-indicator-active-bg: #fff;
|
569
|
+
@carousel-indicator-border-color: #fff;
|
570
|
+
|
571
|
+
@carousel-caption-color: #fff;
|
572
|
+
|
573
|
+
|
574
|
+
// Close
|
575
|
+
// ------------------------
|
576
|
+
@close-color: #000;
|
577
|
+
@close-font-weight: bold;
|
578
|
+
@close-text-shadow: 0 1px 0 #fff;
|
579
|
+
|
580
|
+
|
581
|
+
// Code
|
582
|
+
// ------------------------
|
583
|
+
@code-color: #c7254e;
|
584
|
+
@code-bg: #f9f2f4;
|
585
|
+
|
586
|
+
@pre-bg: #f5f5f5;
|
587
|
+
@pre-color: @gray-dark;
|
588
|
+
@pre-border-color: #ccc;
|
589
|
+
@pre-scrollable-max-height: 340px;
|
590
|
+
|
591
|
+
// Type
|
592
|
+
// ------------------------
|
593
|
+
@text-muted: @gray-light;
|
594
|
+
@abbr-border-color: @gray-light;
|
595
|
+
@headings-small-color: @gray-light;
|
596
|
+
@blockquote-small-color: @gray-light;
|
597
|
+
@blockquote-border-color: @gray-lighter;
|
598
|
+
@page-header-border-color: @gray-lighter;
|
599
|
+
|
600
|
+
// Miscellaneous
|
601
|
+
// -------------------------
|
602
|
+
|
603
|
+
// Hr border color
|
604
|
+
@hr-border: @gray-lighter;
|
605
|
+
|
606
|
+
// Horizontal forms & lists
|
607
|
+
@component-offset-horizontal: 180px;
|
608
|
+
|
609
|
+
|
610
|
+
// Container sizes
|
611
|
+
// --------------------------------------------------
|
612
|
+
|
613
|
+
// Small screen / tablet
|
614
|
+
@container-tablet: ((720px + @grid-gutter-width));
|
294
615
|
|
295
|
-
//
|
296
|
-
@
|
297
|
-
@fluidGridGutterWidth1200: percentage(@gridGutterWidth1200/@gridRowWidth1200);
|
616
|
+
// Medium screen / desktop
|
617
|
+
@container-desktop: ((940px + @grid-gutter-width));
|
298
618
|
|
299
|
-
//
|
300
|
-
@
|
301
|
-
@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
|
619
|
+
// Large screen / wide desktop
|
620
|
+
@container-lg-desktop: ((1140px + @grid-gutter-width));
|