Skip to content
This repository has been archived by the owner on Jun 15, 2020. It is now read-only.

Commit

Permalink
Continued integration of good ideas from mrflip.
Browse files Browse the repository at this point in the history
  • Loading branch information
greendog99 committed Feb 13, 2011
1 parent d7401b8 commit 1eed978
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
2 changes: 1 addition & 1 deletion _application.rb
@@ -1,7 +1,7 @@
# Update things in config/application.rb

puts "Adding password_confirmation to filter_parameters ... ".magenta
gsub_file 'config/application.rb', /:password/, ':password, :password_confirmation'
gsub_file 'config/application.rb', /:password\]/, ':password, :password_confirmation]'

puts "Adding app/extras/ to autoload_paths ... ".magenta
gsub_file 'config/application.rb', /# config.autoload_paths/, 'config.autoload_paths'
Expand Down
5 changes: 4 additions & 1 deletion _boilerplate.rb
Expand Up @@ -4,4 +4,7 @@

copy_static_file 'config/compass.rb'

run "compass init rails -r html5-boilerplate -u html5-boilerplate -x sass -c config/compass.rb --force"
run "compass init rails --require html5-boilerplate -u html5-boilerplate --syntax sass -c config/compass.rb --force"

git :add => '.'
git :commit => "-am 'Initialized Compass.'"
24 changes: 12 additions & 12 deletions _grid.rb
Expand Up @@ -13,28 +13,28 @@
file 'app/stylesheets/partials/_grid.sass', <<-SASS.gsub(/^ {2}/, '')
/* From http://www.1kbgrid.com/
$columns: 12
$columns: 12
$col_width: 60px
$gutter: 20px
$margin = $gutter / 2
$width = $columns * ($col_width + $gutter)
$gutter: 20px
$margin = $gutter / 2
$width = $columns * ($col_width + $gutter)
=row
width: $width
margin: 0 auto
width: $width
margin: 0 auto
overflow: hidden
=inner_row
margin: 0 ($margin * -1)
width: auto
margin: 0 ($margin * -1)
width: auto
display: inline-block
=col($n: 1)
margin: 0 $margin
margin: 0 $margin
overflow: hidden
float: left
display: inline
width: ($n - 1) * ($col_width + $gutter) + $col_width
float: left
display: inline
width: ($n - 1) * ($col_width + $gutter) + $col_width
=prepend($n: 1)
margin-left: $n * ($col_width + $gutter) + $margin
Expand Down
17 changes: 10 additions & 7 deletions files/config/compass.rb
@@ -1,14 +1,17 @@
require 'html5-boilerplate'

project_type = :rails
project_path = Compass::AppIntegration::Rails.root
http_path = "/"
css_dir = "public/stylesheets"
sass_dir = "app/stylesheets"
environment = Compass::AppIntegration::Rails.env
project_type = :rails
project_path = Compass::AppIntegration::Rails.root
http_path = "/"
css_dir = "public/stylesheets"
sass_dir = "app/stylesheets"
javascripts_dir = "public/javascripts"
images_dir = "public/images"
environment = Compass::AppIntegration::Rails.env
preferred_syntax = :sass

if Compass::AppIntegration::Rails.env == :development
output_style = :nested
else
output_style = :compressed
end
end
2 changes: 1 addition & 1 deletion template.rb
Expand Up @@ -37,7 +37,7 @@ def copy_static_file(path)
apply "#{@partials}/_layouts.rb" # Must be after boilerplate since it modifies HAML files
copy_static_file 'app/helpers/application_helper.rb'
copy_static_file 'app/views/shared/_error_messages.html.haml'
copy_static_file 'config/initializers/sass_config.rb'
# copy_static_file 'config/initializers/sass_config.rb'
apply "#{@partials}/_appconfig.rb"
apply "#{@partials}/_rspec.rb"
apply "#{@partials}/_capistrano.rb"
Expand Down

0 comments on commit 1eed978

Please sign in to comment.