Permalink
Browse files

Upgrade to bootstrap 2.3.0

  • Loading branch information...
1 parent dd4bd79 commit be4a21d461a0558e570efc6de17f787c2c763bbb Quan Nguyen committed Feb 23, 2013
Showing with 1,220 additions and 610 deletions.
  1. +1 −1 Gemfile
  2. +63 −62 Gemfile.lock
  3. +39 −18 app/controllers/styles_controller.rb
  4. +7 −7 config/application.rb
  5. +1 −1 config/less/accordion.less
  6. +15 −1 config/less/alerts.less
  7. +5 −4 config/less/bootstrap.less
  8. +7 −7 config/less/breadcrumbs.less
  9. +35 −50 config/less/button-groups.less
  10. +48 −31 config/less/buttons.less
  11. +48 −21 config/less/carousel.less
  12. +2 −1 config/less/close.less
  13. +4 −1 config/less/code.less
  14. +0 −1 config/less/component-animations.less
  15. +48 −21 config/less/dropdowns.less
  16. +87 −32 config/less/forms.less
  17. +6 −5 config/less/hero-unit.less
  18. +16 −4 config/less/labels-badges.less
  19. +0 −16 config/less/labels.less
  20. +55 −0 config/less/media.less
  21. +50 −19 config/less/mixins.less
  22. +11 −13 config/less/modals.less
  23. +56 −28 config/less/navbar.less
  24. +48 −23 config/less/navs.less
  25. +12 −6 config/less/pager.less
  26. +87 −28 config/less/pagination.less
  27. +57 −41 config/less/popovers.less
  28. +1 −1 config/less/progress-bars.less
  29. +92 −10 config/less/reset.less
  30. +44 −18 config/less/responsive-767px-max.less
  31. +28 −5 config/less/responsive-navbar.less
  32. +16 −0 config/less/responsive-utilities.less
  33. +1 −1 config/less/responsive.less
  34. +7 −5 config/less/scaffolding.less
  35. +15 −5 config/less/sprites.less
  36. +89 −70 config/less/tables.less
  37. +4 −3 config/less/thumbnails.less
  38. +7 −7 config/less/tooltip.less
  39. +72 −31 config/less/type.less
  40. +33 −9 config/less/variables.less
  41. +3 −3 config/less/wells.less
View
@@ -1,6 +1,6 @@
source 'https://rubygems.org'
-gem 'rails', '3.2.0'
+gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
View
@@ -1,107 +1,108 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (3.2.0)
- actionpack (= 3.2.0)
- mail (~> 2.4.0)
- actionpack (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
+ actionmailer (3.2.11)
+ actionpack (= 3.2.11)
+ mail (~> 2.4.4)
+ actionpack (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
erubis (~> 2.7.0)
- journey (~> 1.0.0)
+ journey (~> 1.0.4)
rack (~> 1.4.0)
- rack-cache (~> 1.1)
+ rack-cache (~> 1.2)
rack-test (~> 0.6.1)
- sprockets (~> 2.1.2)
- activemodel (3.2.0)
- activesupport (= 3.2.0)
+ sprockets (~> 2.2.1)
+ activemodel (3.2.11)
+ activesupport (= 3.2.11)
builder (~> 3.0.0)
- activerecord (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
- arel (~> 3.0.0)
+ activerecord (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
+ arel (~> 3.0.2)
tzinfo (~> 0.3.29)
- activeresource (3.2.0)
- activemodel (= 3.2.0)
- activesupport (= 3.2.0)
- activesupport (3.2.0)
+ activeresource (3.2.11)
+ activemodel (= 3.2.11)
+ activesupport (= 3.2.11)
+ activesupport (3.2.11)
i18n (~> 0.6)
multi_json (~> 1.0)
- arel (3.0.0)
- builder (3.0.0)
+ arel (3.0.2)
+ builder (3.0.4)
coffee-rails (3.2.2)
coffee-script (>= 2.2.0)
railties (~> 3.2.0)
coffee-script (2.2.0)
coffee-script-source
execjs
- coffee-script-source (1.2.0)
+ coffee-script-source (1.4.0)
erubis (2.7.0)
- execjs (1.3.0)
+ execjs (1.4.0)
multi_json (~> 1.0)
hike (1.2.1)
- i18n (0.6.0)
- journey (1.0.1)
- jquery-rails (2.0.0)
- railties (< 5.0, >= 3.2.0.beta)
- thor (~> 0.14)
- json (1.6.5)
- mail (2.4.1)
+ i18n (0.6.1)
+ journey (1.0.4)
+ jquery-rails (2.2.1)
+ railties (>= 3.0, < 5.0)
+ thor (>= 0.14, < 2.0)
+ json (1.7.7)
+ mail (2.4.4)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
- mime-types (1.17.2)
- multi_json (1.0.4)
- pg (0.13.1)
+ mime-types (1.21)
+ multi_json (1.6.1)
+ pg (0.14.1)
polyglot (0.3.3)
prizm (0.0.2)
rmagick
- rack (1.4.1)
- rack-cache (1.1)
+ rack (1.4.5)
+ rack-cache (1.2)
rack (>= 0.4)
- rack-ssl (1.3.2)
+ rack-ssl (1.3.3)
rack
- rack-test (0.6.1)
+ rack-test (0.6.2)
rack (>= 1.0)
- rails (3.2.0)
- actionmailer (= 3.2.0)
- actionpack (= 3.2.0)
- activerecord (= 3.2.0)
- activeresource (= 3.2.0)
- activesupport (= 3.2.0)
+ rails (3.2.11)
+ actionmailer (= 3.2.11)
+ actionpack (= 3.2.11)
+ activerecord (= 3.2.11)
+ activeresource (= 3.2.11)
+ activesupport (= 3.2.11)
bundler (~> 1.0)
- railties (= 3.2.0)
- railties (3.2.0)
- actionpack (= 3.2.0)
- activesupport (= 3.2.0)
+ railties (= 3.2.11)
+ railties (3.2.11)
+ actionpack (= 3.2.11)
+ activesupport (= 3.2.11)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
- thor (~> 0.14.6)
- rake (0.9.2.2)
- rdoc (3.12)
+ thor (>= 0.14.6, < 2.0)
+ rake (10.0.3)
+ rdoc (3.12.1)
json (~> 1.4)
- rmagick (2.13.1)
- sass (3.1.15)
- sass-rails (3.2.4)
+ rmagick (2.13.2)
+ sass (3.2.6)
+ sass-rails (3.2.6)
railties (~> 3.2.0)
sass (>= 3.1.10)
tilt (~> 1.3)
- sprockets (2.1.2)
+ sprockets (2.2.2)
hike (~> 1.2)
+ multi_json (~> 1.0)
rack (~> 1.0)
- tilt (!= 1.3.0, ~> 1.1)
- sqlite3 (1.3.5)
- thor (0.14.6)
+ tilt (~> 1.1, != 1.3.0)
+ sqlite3 (1.3.7)
+ thor (0.17.0)
tilt (1.3.3)
- treetop (1.4.10)
+ treetop (1.4.12)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.31)
- uglifier (1.2.3)
+ tzinfo (0.3.35)
+ uglifier (1.3.0)
execjs (>= 0.3.0)
- multi_json (>= 1.0.2)
+ multi_json (~> 1.0, >= 1.0.2)
PLATFORMS
ruby
@@ -111,7 +112,7 @@ DEPENDENCIES
jquery-rails
pg
prizm
- rails (= 3.2.0)
+ rails (= 3.2.11)
rmagick
sass-rails (~> 3.2.3)
sqlite3
@@ -13,19 +13,19 @@ def set
@colors = []
end
end
-
+
#@url = params[:image_url] || "http://sphotos.xx.fbcdn.net/hphotos-snc6/184020_10150260094181987_694716986_7953469_6517626_n.jpg"
#extr = Prizm::Extractor.new(@url)
#@colors = extr.get_colors(7, false).sort { |a, b| b.to_hsla[2] <=> a.to_hsla[2] }.map { |p| extr.to_hex(p) }
#extr = nil
set_style
end
-
+
def customize
@colors = params[:colors]
set_style
end
-
+
private
def set_style
@less = %{
@@ -83,7 +83,23 @@ def set_style
@headingsColor: inherit; // empty to use BS default, @textColor
-// Tables
+// Component sizing
+// -------------------------
+// Based on 14px font-size and 20px line-height
+
+@fontSizeLarge: @baseFontSize * 1.25; // ~18px
+@fontSizeSmall: @baseFontSize * 0.85; // ~12px
+@fontSizeMini: @baseFontSize * 0.75; // ~11px
+
+@paddingLarge: 11px 19px; // 44px
+@paddingSmall: 2px 10px; // 26px
+@paddingMini: 0 6px; // 22px
+
+@baseBorderRadius: 4px;
+@borderRadiusLarge: 6px;
+@borderRadiusSmall: 3px;
+
+/// Tables
// -------------------------
@tableBackground: transparent; // overall background-color
@tableBackgroundAccent: #f9f9f9; // for striping
@@ -95,7 +111,7 @@ def set_style
// -------------------------
@btnBackground: @white;
@btnBackgroundHighlight: darken(@white, 10%);
-@btnBorder: #bbb;
+@btnBorder: #ccc;
@btnPrimaryBackground: @linkColor;
@btnPrimaryBackgroundHighlight: spin(@btnPrimaryBackground, 20%);
@@ -120,9 +136,11 @@ def set_style
// -------------------------
@inputBackground: #fff;
@inputBorder: #ccc;
-@inputBorderRadius: 3px;
+@inputBorderRadius: @baseBorderRadius;
@inputDisabledBackground: @grayLighter;
@formActionsBackground: #f5f5f5;
+@inputHeight: @baseLineHeight + 10px; // base line-height + 8px vertical padding + 2px top/bottom border
+
// Dropdowns
// -------------------------
@@ -132,18 +150,18 @@ def set_style
@dropdownDividerBottom: @white;
@dropdownLinkColor: @grayDark;
-
@dropdownLinkColorHover: @white;
-@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
+@dropdownLinkColorActive: @white;
-@dropdownLinkColorActive: @dropdownLinkColor;
@dropdownLinkBackgroundActive: @linkColor;
+@dropdownLinkBackgroundHover: @dropdownLinkBackgroundActive;
// COMPONENT VARIABLES
// --------------------------------------------------
+
// Z-index master list
// -------------------------
// Used for a bird's eye view of components dependent on the z-axis
@@ -172,6 +190,11 @@ def set_style
@hrBorder: @grayLighter;
+// Horizontal forms & lists
+// -------------------------
+@horizontalComponentOffset: 180px;
+
+
// Wells
// -------------------------
@wellBackground: #f5f5f5;
@@ -180,16 +203,17 @@ def set_style
// Navbar
// -------------------------
@navbarCollapseWidth: 979px;
+@navbarCollapseDesktopWidth: @navbarCollapseWidth + 1;
@navbarHeight: 40px;
+@navbarBackgroundHighlight: @white;
@navbarBackground: darken(@navbarBackgroundHighlight, 5%);
-@navbarBackgroundHighlight: @grayDark;
@navbarBorder: darken(@navbarBackground, 12%);
-@navbarText: @gray;
-@navbarLinkColor: @gray;
-@navbarLinkColorHover: @grayLighter;
-@navbarLinkColorActive: @grayLighter;
+@navbarText: #777;
+@navbarLinkColor: #777;
+@navbarLinkColorHover: @grayDark;
+@navbarLinkColorActive: @gray;
@navbarLinkBackgroundHover: transparent;
@navbarLinkBackgroundActive: darken(@navbarBackground, 5%);
@@ -212,9 +236,6 @@ def set_style
@navbarInverseSearchBorder: @navbarInverseBackground;
@navbarInverseSearchPlaceholderColor: #ccc;
-@navbarInverseBrandColor: @navbarInverseLinkColor;
-
-
// Pagination
// -------------------------
@paginationBackground: #fff;
@@ -300,7 +321,7 @@ def set_style
// 768px-979px
@fluidGridColumnWidth768: percentage(@gridColumnWidth768/@gridRowWidth768);
@fluidGridGutterWidth768: percentage(@gridGutterWidth768/@gridRowWidth768);
-
+
#{Lavish::Application::BOOTSTRAP}
}
end
View
@@ -55,24 +55,24 @@ class Application < Rails::Application
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
-
+
config.middleware.use "UseWWW" if Rails.env.production?
-
+
bootstrap = ''
- names = ['reset', 'mixins', 'scaffolding', 'grid', 'layouts', 'type', 'code', 'forms', 'tables',
+ names = ['mixins', 'reset', 'scaffolding', 'grid', 'layouts', 'type', 'code', 'forms', 'tables',
'sprites', 'dropdowns', 'wells', 'component-animations', 'close', 'buttons', 'button-groups', 'alerts',
'navs', 'navbar', 'breadcrumbs', 'pagination', 'pager', 'modals', 'tooltip', 'popovers',
'thumbnails', 'labels-badges', 'progress-bars', 'accordion', 'carousel', 'hero-unit', 'utilities']
names.each do |name|
bootstrap += File.read("#{Rails.root.to_s}/config/less/#{name}.less")
end
-
+
BOOTSTRAP = bootstrap
ELEMENTS = [
- 'background, link color hover',
- 'nav background hover, nav tabs borders',
- 'navbar link color, placeholder text',
+ 'background, link color hover',
+ 'nav background hover, nav tabs borders',
+ 'navbar link color, placeholder text',
'link color within dropdown',
'link color, primary button background',
'text color, btn text color, navbar background',
@@ -12,7 +12,7 @@
.accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
- .border-radius(4px);
+ .border-radius(@baseBorderRadius);
}
.accordion-heading {
border-bottom: 0;
Oops, something went wrong.

0 comments on commit be4a21d

Please sign in to comment.