diff --git a/Gemfile b/Gemfile index a67becb..143dc62 100644 --- a/Gemfile +++ b/Gemfile @@ -19,18 +19,12 @@ gem 'pg', '~> 0.17.1' gem 'will_paginate', '~> 3.0.3' gem 'jbuilder', '~> 2.0.3' -# Gems used only for assets and not required -# in production environments by default. -group :assets do - gem 'sass-rails', '~> 3.0' - gem 'coffee-rails', '~> 3.2.1' - gem 'bootstrap-sass', '~> 3.1.1' +# Assets +gem 'sass-rails', '~> 3.0' +gem 'coffee-rails', '~> 3.2.1' +gem 'bootstrap-sass', '~> 3.1.1' - # See https://github.com/sstephenson/execjs#readme for more supported runtimes - # gem 'therubyracer' - - gem 'uglifier', '>= 1.0.3' -end +gem 'uglifier', '>= 1.0.3' group :development, :test do gem 'rspec-rails', '~> 2.14.0' diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 46f1298..1c745e2 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,8 +12,7 @@ // //= require jquery //= require jquery_ujs -//= require twitter/bootstrap/bootstrap-button -//= require twitter/bootstrap/bootstrap-modal +//= require bootstrap //= require utils //= require bootstrap-datepicker //= require bootstrap-timepicker diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css deleted file mode 100644 index 6b66844..0000000 --- a/app/assets/stylesheets/application.css +++ /dev/null @@ -1,15 +0,0 @@ -/* - * This is a manifest file that'll be compiled into application.css, which will include all the files - * listed below. - * - * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets, - * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path. - * - * You're free to add application-wide styles to this file and they'll appear at the top of the - * compiled file, but it's generally better to create a new file per style scope. - * - *= require_self - *= require datepicker - *= require bootstrap-timepicker - *= require bootstrap_and_overrides -*/ diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss new file mode 100644 index 0000000..22f1d45 --- /dev/null +++ b/app/assets/stylesheets/application.scss @@ -0,0 +1,4 @@ +@import "bootstrap"; +@import "datepicker"; +@import "bootstrap-timepicker"; +@import "frontend"; diff --git a/app/assets/stylesheets/bootstrap_and_overrides.css.less b/app/assets/stylesheets/bootstrap_and_overrides.css.less deleted file mode 100644 index 1d0efba..0000000 --- a/app/assets/stylesheets/bootstrap_and_overrides.css.less +++ /dev/null @@ -1,47 +0,0 @@ -@import "twitter/bootstrap/bootstrap"; -body { - padding-top: 60px; - padding-left: 20px; -} - -@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 boostrap_and_overrides.css will not -// have the proper paths. So for now we use the absolute path. -@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot'; -@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff'; -@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf'; -@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg'; - -// Font Awesome -@import "fontawesome"; - -// 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/less.html for their names and documentation -// -// Example: -// @linkColor: #ff0000; - -[data-toggle="buttons-radio"] > .btn > input[type="radio"], -[data-toggle="buttons"] > .btn > input[type="checkbox"] { - display: none; -} - -.inline-block { - display: inline-block; -} - -.control-group.error .btn-group > .btn { - color: #b94a48; - border-color: #b94a48; -} diff --git a/app/assets/stylesheets/frontend.scss b/app/assets/stylesheets/frontend.scss new file mode 100644 index 0000000..ff8c444 --- /dev/null +++ b/app/assets/stylesheets/frontend.scss @@ -0,0 +1,7 @@ +body { + padding-top: 5px; +} + +.x-boundlist-item { + white-space: nowrap; +} \ No newline at end of file diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index ee989dd..17796e3 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,5 +1,3 @@ -<%= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" %> -

Forgot your password?



diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index e2e50f8..bb66fbf 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -1,5 +1,3 @@ -<%= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" %> -

Edit <%= resource_name.to_s.humanize %>

<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 1b7d6b5..7ef96cf 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -1,4 +1,3 @@ -= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" = form_for(resource, :as => resource_name, :url => registration_path(resource_name)) do |f| = devise_error_messages! .controls diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 141a25c..cdf7a6e 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,5 +1,3 @@ -<%= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" %> -

Velocipede

Made with ♥ in Baltimore
diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 0666f2e..ddb6171 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -1,29 +1,22 @@ !!! 5 -%html{:lang => "en"} +%html{lang: 'en'} %head - %meta{:charset => "utf-8"}/ - %meta{ name: "viewport", content: "width=device-width", "initial-scale" => "1.0"} - %title= content_for?(:title) ? yield(:title) : "Velocipede" + %meta{charset: 'utf-8'}/ + %meta{name: 'viewport', content: 'width=device-width', "initial-scale": '1.0'} + %title= content_for?(:title) ? yield(:title) : 'Velocipede' = csrf_meta_tags - = stylesheet_link_tag "bootstrap_and_overrides", "datepicker", "bootstrap-timepicker", :media => "all" + = stylesheet_link_tag 'application', media: 'all' /[if lt IE 9] - = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js" - :css - body { - padding-top: 5px; - } - .x-boundlist-item { - white-space: nowrap; - } + = javascript_include_tag 'http://html5shim.googlecode.com/svn/trunk/html5.js' %body .container .content - if flash[:notice] - %p{:class => 'notice'}= flash[:notice] + %p{class: 'notice'}= flash[:notice] - if flash[:alert] - %p{:class => 'alert'}= flash[:alert] + %p{class: 'alert'}= flash[:alert] .row .span12 = yield @@ -31,5 +24,5 @@ %footer %p © BikeShed #{Time.now.year} - = javascript_include_tag "application" + = javascript_include_tag 'application' = javascript_include_tag params[:controller] diff --git a/app/views/site/index.html.haml b/app/views/site/index.html.haml index 04b6e1a..50e7697 100644 --- a/app/views/site/index.html.haml +++ b/app/views/site/index.html.haml @@ -1,4 +1,3 @@ -= stylesheet_link_tag "bootstrap_and_overrides", :media => "all" %h2 Dashboard %p diff --git a/config/application.rb b/config/application.rb index 7d74bda..f55e9a4 100644 --- a/config/application.rb +++ b/config/application.rb @@ -62,5 +62,8 @@ module Velocipede # Version of your assets, change this if you want to expire all your assets config.assets.version = '1.0' + + # Enabled for bootstrap-sass gem + config.assets.initialize_on_precompile end end