Skip to content

Commit

Permalink
960 and blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberto Perdomo committed Oct 15, 2010
1 parent 006e386 commit 0e22d17
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 6 deletions.
File renamed without changes.
43 changes: 43 additions & 0 deletions application_blueprint.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
!!! 5
%html
%head
%meta{ :charset => "utf-8" }/
-#
Always force latest IE rendering engine (even in intranet) & Chrome Frame
Remove this if you use the .htaccess
%meta{ :content => "IE=edge,chrome=1", "http-equiv" => "X-UA-Compatible" }/
%meta{ :content => "", :name => "description" }/
%meta{ :content => "", :name => "author" }/
%meta{ :content => "", :name => "keywords" }/
%meta{ :content => "", :name => "copyright" }/
-# Mobile viewport optimized: j.mp/bplateviewport
%meta{ :content => "width=device-width; initial-scale=1.0", :name => "viewport" }/

-# Place favicon.ico and apple-touch-icon.png in the root of your domain and delete these references
-# %link{ :href => "/favicon.ico", :rel => "shortcut icon" }/
-# %link{ :href => "/apple-touch-icon.png", :rel => "apple-touch-icon" }/

%title= "[Default title] #{yield(:title)}"
= raw stylesheet_link_merged('screen', :media => 'screen, projection')
= raw stylesheet_link_merged('print', :media => 'print')
/[if lt IE 8]
= raw stylesheet_link_merged('ie', :media => 'screen, projection')
-# For the less-enabled mobile browsers like Opera Mini
= raw stylesheet_link_merged('handheld', :media => 'handheld')
= csrf_meta_tag
%body{ :class => "#{controller.controller_name}" }
#container
#header HEADER
#sidebar SIDEBAR
#content
#flash
- flash.each do |key, value|
%div{ :title => key.to_s.humanize, :class => key }
%p= value
= yield
#footer
%p.copyright
Copyright © #{Date.today.year}
%script{ :type => "text/javascript", :src => "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" }
%script{ :type => "text/javascript", :src => "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js" }
= raw javascript_include_merged(:base)
5 changes: 4 additions & 1 deletion capistrano.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
gem "capistrano"
run "bundle install"
capify!
capify!

git :add => '.'
git :commit => '-m "Capistrano"'
5 changes: 4 additions & 1 deletion devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@

generate "devise:install"
generate "devise User"
generate "devise Admin"
generate "devise Admin"

git :add => '.'
git :commit => 'm "Devise"'
3 changes: 3 additions & 0 deletions inploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
repository = ''
hosts = %w()
DEPLOY

git :add => '.'
git :commit => '-m "Inploy"'
44 changes: 41 additions & 3 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
locale_str = ask("Enter a list of locales you want to use separated by commas (e.g. 'es, de, fr'). For a reference list visit http://github.com/svenfuchs/rails-i18n/tree/master/rails/locale/. Press enter to skip: ")
auth_option = ask("\r\n\r\nWhat authentication framework do you want to use?\r\n\r\n(1) Devise\r\n(2) Authlogic\r\n(3) Omniauth\r\nPress Enter to skip")
deploy_option = ask("\r\n\r\nWhat deploy method do you want to use?\r\n\r\n(1) Capistrano\r\n(2) Inploy\r\nPress Enter to skip")
css_framework_option = ask("\r\n\r\nWhat CSS framework do you want to use?\r\n\r\n(1) 960\r\n(2) Blueprint\r\nPress Enter for 960 (default)")
if ["1", "2", "3"].include?(auth_option)
auth = "devise" if auth_option=="1"
auth = "authlogic" if auth_option=="2"
Expand All @@ -21,6 +22,12 @@
deploy = nil
end

if ["1", "2"].include?(css_framework_option)
css_framework = "960" if css_framework_option=="1"
css_framework = "blueprint" if css_framework_option=="2"
else
css_framework = "960"
end


puts "\r\n\r\n*****************************************************************************************************"
Expand Down Expand Up @@ -102,7 +109,40 @@

# compass
run "gem install compass"
run "compass init -r ninesixty --using 960 --app rails --css-dir public/stylesheets"
if css_framework=="960"
run "compass init -r ninesixty --using 960 --app rails --css-dir public/stylesheets"
get "http://github.com/aentos/rails3-templates/raw/master/application_960.html.haml", "app/views/layouts/application.html.haml"
file "config/asset_packages.yml", <<-FILE
---
javascripts:
- base:
- rails
stylesheets:
- screen:
- grid
- text
- handheld:
- handheld
FILE
else
run "compass init --using blueprint --app rails --css-dir public/stylesheets"
get "http://github.com/aentos/rails3-templates/raw/master/application_blueprint.html.haml", "app/views/layouts/application.html.haml"
file "config/asset_packages.yml", <<-FILE
---
javascripts:
- base:
- rails
stylesheets:
- ie:
- ie
- screen:
- screen
- print:
- print
- handheld:
- handheld
FILE
end
create_file "app/stylesheets/_colors.scss"
run "rm public/stylesheets/*"
get "http://github.com/activestylus/formtastic-sass/raw/master/_formtastic_base.sass", "app/stylesheets/_formtastic_base.sass"
Expand All @@ -121,9 +161,7 @@
get "http://github.com/rails/jquery-ujs/raw/master/src/rails.js", "public/javascripts/rails.js"

get "http://github.com/aentos/rails3-templates/raw/master/gitignore" ,".gitignore"
get "http://github.com/aentos/rails3-templates/raw/master/application.html.haml", "app/views/layouts/application.html.haml"
get "http://github.com/aentos/rails3-templates/raw/master/build.rake", "lib/tasks/build.rake"
get "http://github.com/aentos/rails3-templates/raw/master/asset_packages.yml", "config/asset_packages.yml"

append_file 'Rakefile', <<-METRIC_FU
MetricFu::Configuration.run do |config|
Expand Down
5 changes: 4 additions & 1 deletion omniauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,7 @@
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/user.rb", "app/models/user.rb"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/authorization.rb", 'app/models/authorization.rb'
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/user_sessions_controller.rb", "app/controllers/application_controller.rb"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/application_controller.rb", "app/controllers/application_controller.rb"
get "http://github.com/aentos/rails3-templates/raw/master/omniauth/application_controller.rb", "app/controllers/application_controller.rb"

git :add => '.'
git :commit => '-m "Ominauth"'

0 comments on commit 0e22d17

Please sign in to comment.