diff --git a/Gemfile b/Gemfile index c9c619b..f79ef83 100644 --- a/Gemfile +++ b/Gemfile @@ -20,6 +20,10 @@ group :assets do # gem 'therubyracer', :platforms => :ruby gem 'uglifier', '>= 1.0.3' + + gem 'therubyracer', '~> 0.10.2' + gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS + gem "twitter-bootstrap-rails" end gem 'jquery-rails' diff --git a/Gemfile.lock b/Gemfile.lock index 8af1630..12dbd36 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -54,6 +54,7 @@ GEM coffee-script-source execjs coffee-script-source (1.6.2) + commonjs (0.2.6) daemons (1.1.9) debug_inspector (0.0.2) erubis (2.7.0) @@ -71,6 +72,12 @@ GEM railties (>= 3.0, < 5.0) thor (>= 0.14, < 2.0) json (1.7.7) + less (2.3.1) + commonjs (~> 0.2.6) + less-rails (2.3.2) + actionpack (>= 3.1) + less (~> 2.3.1) + libv8 (3.3.10.4) mail (2.4.4) i18n (>= 0.4.0) mime-types (~> 1.16) @@ -134,6 +141,8 @@ GEM sqlite3 (1.3.7) temple (0.5.5) terminal-table (1.4.5) + therubyracer (0.10.2) + libv8 (~> 3.3.10) thin (1.5.1) daemons (>= 1.0.9) eventmachine (>= 0.12.6) @@ -143,6 +152,10 @@ GEM treetop (1.4.12) polyglot polyglot (>= 0.3.1) + twitter-bootstrap-rails (2.2.6) + actionpack (>= 3.1) + execjs + railties (>= 3.1) tzinfo (0.3.37) uglifier (1.3.0) execjs (>= 0.3.0) @@ -157,11 +170,14 @@ DEPENDENCIES brakeman coffee-rails (~> 3.2.1) jquery-rails + less-rails meta_request rack-mini-profiler rails (= 3.2.11) rails-footnotes sass-rails (~> 3.2.3) sqlite3 + therubyracer (~> 0.10.2) thin + twitter-bootstrap-rails uglifier (>= 1.0.3) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 9097d83..5733810 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,4 +12,5 @@ // //= require jquery //= require jquery_ujs +//= require twitter/bootstrap //= require_tree . diff --git a/app/assets/javascripts/bootstrap.js.coffee b/app/assets/javascripts/bootstrap.js.coffee new file mode 100644 index 0000000..c9404a8 --- /dev/null +++ b/app/assets/javascripts/bootstrap.js.coffee @@ -0,0 +1,4 @@ +jQuery -> + $("a[rel=popover]").popover() + $(".tooltip").tooltip() + $("a[rel=tooltip]").tooltip() \ No newline at end of file diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less new file mode 100644 index 0000000..53da7a4 --- /dev/null +++ b/app/assets/stylesheets/bootstrap_and_overrides.css.less @@ -0,0 +1,31 @@ +@import "twitter/bootstrap/bootstrap"; +@import "twitter/bootstrap/responsive"; + +// Set the correct sprite paths +@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png"); +@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png"); + +// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines) +// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not +// have the proper paths. So for now we use the absolute path. +@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot?v=3.0.2"); +@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot?#iefix&v=3.0.2"); +@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff?v=3.0.2"); +@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2"); + +// Font Awesome +@import "fontawesome"; + +// Glyphicons +//@import "twitter/bootstrap/sprites.less"; + +// Your custom LESS stylesheets goes here +// +// Since bootstrap was imported above you have access to its mixins which +// you may use and inherit here +// +// If you'd like to override bootstrap's own variables, you can do so here as well +// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation +// +// Example: +// @linkColor: #ff0000; diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 860c430..2534fa0 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,14 +1,89 @@ - -
-