Skip to content

Commit

Permalink
- #60
Browse files Browse the repository at this point in the history
- Removed twitter-bootstrap-rails and added bootstrap-sass port
- Updated Gemfile
- Added necessary include files. Removed `require`s and added `@import`s
- Moved custom wheel specific styles to new file `base`.
- Added bootstrap custom instead of the whole file for easily removing unwanted stuff per project
- bootstrap_flash doesn’t work anymore now that gem is changed. Fixed this by adding custom erb. Added this file to views/shared
- changed bootstrap_flash calls to partial calls
- Added font-awesome SASS gem
- Updated Gemfile.lock after resolving conflicts
- Deprecation warning. Removed by renaming .css.scss to .scss

- Move sass require in gemfile
- Split css in respective files

- Use 1.9 hash
- convert flash key to string, to avoid string/symbol discrepencies

- Cleanup empty class
  • Loading branch information
rahulmax authored and vipulnsward committed Mar 7, 2015
1 parent 4dc3cb3 commit c278fa1
Show file tree
Hide file tree
Showing 19 changed files with 234 additions and 186 deletions.
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ gem 'rails', '4.2.0'

gem 'arel'
gem 'jquery-rails'

gem 'sprockets-rails', '3.0.0.beta1'
gem 'sass-rails', github: 'rails/sass-rails'
gem 'sass-rails', '>= 3.2'
gem 'uglifier', '>= 1.0.3'

# database
Expand Down Expand Up @@ -38,7 +39,10 @@ gem 'handy'
gem 'honeybadger'

# use bootstrap3
gem 'twitter-bootstrap-rails'
gem 'bootstrap-sass', '~> 3.3.3'

# use font-awesome
gem 'font-awesome-sass', '~> 4.3.0'

# forms made easy for rails
gem 'simple_form'
Expand Down
85 changes: 41 additions & 44 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@ GIT
ransack (~> 1.3)
sass-rails

GIT
remote: git://github.com/rails/sass-rails.git
revision: f305f0299daa7c08d86f51d5e8ee0474375bbb87
specs:
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -65,13 +54,19 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
ansi (1.4.3)
ansi (1.5.0)
arbre (1.0.3)
activesupport (>= 3.0.0)
arel (6.0.0)
autoprefixer-rails (5.1.7)
execjs
json
bcrypt (3.1.10)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.3)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
bourbon (4.2.1)
sass (~> 3.4)
thor
Expand All @@ -96,7 +91,7 @@ GEM
delayed_job_active_record (4.0.3)
activerecord (>= 3.0, < 5.0)
delayed_job (>= 3.0, < 4.1)
delayed_job_web (1.2.9)
delayed_job_web (1.2.10)
activerecord (> 3.0.0)
delayed_job (> 2.0.3)
sinatra (>= 1.4.4)
Expand All @@ -113,16 +108,18 @@ GEM
email_validator (1.5.0)
activemodel
erubis (2.7.0)
eventmachine (1.0.4)
eventmachine (1.0.7)
execjs (2.4.0)
font-awesome-sass (4.3.1)
sass (~> 3.2)
formtastic (3.1.3)
actionpack (>= 3.2.13)
formtastic_i18n (0.1.1)
globalid (0.3.3)
activesupport (>= 4.1.0)
haml (4.1.0.beta.1)
haml (4.0.6)
tilt
haml-rails (0.6.0)
haml-rails (0.8.2)
actionpack (>= 4.0.1)
activesupport (>= 4.0.1)
haml (>= 3.1, < 5.0)
Expand All @@ -135,14 +132,12 @@ GEM
activesupport (>= 3.2, < 5)
hashr (0.0.22)
hike (1.2.3)
honeybadger (1.16.7)
json
hpricot (0.8.6)
html2haml (1.0.1)
honeybadger (2.0.6)
html2haml (2.0.0)
erubis (~> 2.7.0)
haml (>= 4.0.0.rc.1)
hpricot (~> 0.8.6)
ruby_parser (~> 3.1.1)
haml (~> 4.0.0)
nokogiri (~> 1.6.0)
ruby_parser (~> 3.5)
i18n (0.7.0)
inherited_resources (1.6.0)
actionpack (>= 3.2, < 5)
Expand All @@ -162,7 +157,7 @@ GEM
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
kgio (2.9.2)
kgio (2.9.3)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
Expand All @@ -172,7 +167,7 @@ GEM
mime-types (2.4.3)
mini_portile (0.6.2)
minitest (5.5.1)
minitest-reporters (1.0.8)
minitest-reporters (1.0.11)
ansi
builder
minitest (>= 5.0)
Expand All @@ -181,7 +176,7 @@ GEM
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
orm_adapter (0.5.0)
pg (0.17.1)
pg (0.18.1)
polyamorous (1.1.0)
activerecord (>= 3.0)
quiet_assets (1.1.0)
Expand Down Expand Up @@ -213,7 +208,7 @@ GEM
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.3)
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.3)
railties (4.2.0)
actionpack (= 4.2.0)
Expand All @@ -231,23 +226,29 @@ GEM
responders (2.1.0)
railties (>= 4.2.0, < 5)
ruby-progressbar (1.7.1)
ruby_parser (3.1.3)
ruby_parser (3.6.4)
sexp_processor (~> 4.1)
sass (3.4.13)
sexp_processor (4.4.4)
sass-rails (5.0.1)
railties (>= 4.0.0, < 5.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (~> 1.1)
sexp_processor (4.4.5)
simple_form (3.1.0)
actionpack (~> 4.0)
activemodel (~> 4.0)
simplecov (0.9.1)
simplecov (0.9.2)
docile (~> 1.1.0)
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
simplecov-html (~> 0.9.0)
simplecov-html (0.9.0)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
spring (1.2.0)
spring (1.3.3)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
Expand All @@ -266,14 +267,9 @@ GEM
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
twitter-bootstrap-rails (3.2.0)
actionpack (~> 4.1)
execjs (~> 2.2)
rails (~> 4.1)
railties (~> 4.1)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.6.0)
uglifier (2.7.1)
execjs (>= 0.3.0)
json (>= 1.8.0)
unicorn (4.8.3)
Expand All @@ -282,10 +278,10 @@ GEM
raindrops (~> 0.7)
warden (1.2.3)
rack (>= 1.0)
web-console (2.0.0)
activemodel (~> 4.0)
web-console (2.1.1)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (~> 4.0)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)

PLATFORMS
Expand All @@ -294,13 +290,15 @@ PLATFORMS
DEPENDENCIES
activeadmin!
arel
bootstrap-sass (~> 3.3.3)
browser
carrierwave
delayed_job_active_record
delayed_job_web (>= 1.2.0)
devise (= 3.4.1)
devise-async
email_validator
font-awesome-sass (~> 4.3.0)
haml-rails
handy
honeybadger
Expand All @@ -312,14 +310,13 @@ DEPENDENCIES
quiet_assets
rails (= 4.2.0)
rails_12factor
sass-rails!
sass-rails (>= 3.2)
simple_form
simplecov
spring
sprockets-rails (= 3.0.0.beta1)
sprockets-strict-mode
thin
twitter-bootstrap-rails
uglifier (>= 1.0.3)
unicorn
web-console (~> 2.0)
2 changes: 1 addition & 1 deletion app/assets/javascripts/application_common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//= require jquery
//= require jquery_ujs
//= require twitter/bootstrap
//= require bootstrap-sprockets
//
//= require_tree ./common
5 changes: 0 additions & 5 deletions app/assets/stylesheets/application_common.css.scss

This file was deleted.

11 changes: 11 additions & 0 deletions app/assets/stylesheets/application_common.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "bootstrap-sprockets";
@import "bootstrap/custom";

@import "common/base";
@import "common/alerts";

@import "font-awesome-sprockets";
@import "font-awesome";

@import "bootstrap/devise_forms";
@import "environment/ribbon";
50 changes: 50 additions & 0 deletions app/assets/stylesheets/bootstrap/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Core variables and mixins
@import "bootstrap/variables";
@import "bootstrap/mixins";

// Reset and dependencies
@import "bootstrap/normalize";
@import "bootstrap/print";
@import "bootstrap/glyphicons";

// Core CSS
@import "bootstrap/scaffolding";
@import "bootstrap/type";
@import "bootstrap/code";
@import "bootstrap/grid";
@import "bootstrap/tables";
@import "bootstrap/forms";
@import "bootstrap/buttons";

// Components
@import "bootstrap/component-animations";
@import "bootstrap/dropdowns";
@import "bootstrap/button-groups";
@import "bootstrap/input-groups";
@import "bootstrap/navs";
@import "bootstrap/navbar";
@import "bootstrap/breadcrumbs";
@import "bootstrap/pagination";
@import "bootstrap/pager";
@import "bootstrap/labels";
@import "bootstrap/badges";
@import "bootstrap/jumbotron";
@import "bootstrap/thumbnails";
@import "bootstrap/alerts";
@import "bootstrap/progress-bars";
@import "bootstrap/media";
@import "bootstrap/list-group";
@import "bootstrap/panels";
@import "bootstrap/responsive-embed";
@import "bootstrap/wells";
@import "bootstrap/close";

// Components w/ JavaScript
@import "bootstrap/modals";
@import "bootstrap/tooltip";
@import "bootstrap/popovers";
@import "bootstrap/carousel";

// Utility classes
@import "bootstrap/utilities";
@import "bootstrap/responsive-utilities";
59 changes: 59 additions & 0 deletions app/assets/stylesheets/bootstrap/devise_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
.bootstrap-center-form {
padding: 19px 29px 29px;
margin: 0 auto 20px;
background-color: #fff;
border: 1px solid #e5e5e5;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
box-shadow: 0 1px 2px rgba(0,0,0,.05);

.form-controls {
margin-top: 1em;
margin-bottom: 1em;
}

.form-buttons {
margin-top: 1em;
margin-bottom: 1em;
}

h2 {
margin-top: 10px;
margin-bottom: 30px;
}
}

.bootstrap-center-form-small {
@extend .bootstrap-center-form;
max-width: 300px;
}

.bootstrap-center-form-medium {
@extend .bootstrap-center-form;
max-width: 500px;
}

.sessions, .passwords, .registrations {
background: #e4eaef;

.navbar {
margin-bottom: 0;
}

.page {
padding-top: 40px;
}

.user_remember_me {
position: relative;
left: 20px;
}
.devise-links {
border-top: 1px solid #e4eaef;
padding: 10px 30px;
margin: 0px -30px -20px;
}
}
Loading

0 comments on commit c278fa1

Please sign in to comment.