Permalink
Browse files

Installed Compass CSS meta framework and changed application.html to …

…haml from erb.
  • Loading branch information...
1 parent f4252b2 commit 5c144d3d8b253c90686e8e0c355b2241351c64d6 @jdwyah committed May 20, 2009
@@ -1,3 +1,13 @@
-# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
+ def body_attributes
+ {:class => body_class, :id => body_id}
+ end
+
+ def body_class
+ @controller.controller_name.dasherize
+ end
+
+ def body_id
+ "#{@controller.controller_name.dasherize}-#{@controller.action_name.dasherize}"
+ end
end
View
@@ -0,0 +1,3 @@
+@import blueprint.sass
+
++blueprint-ie
@@ -0,0 +1,3 @@
+@import blueprint.sass
+
++blueprint-print
@@ -0,0 +1,8 @@
+@import blueprint.sass
+@import blueprint/modules/scaffolding.sass
+@import compass/reset.sass
+
++blueprint
+// Remove the scaffolding when you're ready to start doing visual design.
+// Or leave it in if you're happy with how blueprint looks out-of-the-box
++blueprint-scaffolding
@@ -1,32 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <title><%= controller.controller_name %>: <%= controller.action_name %></title>
- <%= stylesheet_link_tag 'scaffold' %>
- <%= javascript_include_tag :defaults %>
-</head>
-<body>
-
- <h1>MyHippocampus</h1>
-<%= pluralize User.logged_in.count, "user" %> currently logged in<br /> <!-- This based on last_request_at, if they were active < 10 minutes they are logged in -->
-<br />
-<br />
-
-
-<% if !current_user %>
- <%= link_to "Register", new_account_path %> |
- <%= link_to "Log In", new_user_session_path %> |
-<% else %>
- <%= link_to "My Account", account_path %> |
- <%= link_to "Logout", user_session_path, :method => :delete, :confirm => "Are you sure you want to logout?" %>
-<% end %>
-
-<p style="color: green"><%= flash[:notice] %></p>
-
-<%= yield %>
-
-</body>
-</html>
@@ -0,0 +1,31 @@
+!!! XML
+!!!
+%html{:xmlns => "http://www.w3.org/1999/xhtml", "xml:lang" => "en", :lang => "en"}
+ %head
+ %meta{'http-equiv' => "content-type", :content => "text/html;charset=UTF-8"}
+ %title= @browser_title || 'Default Browser Title'
+ = stylesheet_link_tag 'compiled/screen.css', :media => 'screen, projection'
+ = stylesheet_link_tag 'compiled/print.css', :media => 'print'
+ /[if IE]
+ = stylesheet_link_tag 'compiled/ie.css', :media => 'screen, projection'
+ = stylesheet_link_tag 'scaffold'
+ %body{body_attributes}
+
+ #container
+ %h1 Welcome to MyHippocampus
+
+ == #{pluralize User.logged_in.count, "user"} currently logged in
+ %br
+
+ -if !current_user
+ = link_to "Register", new_account_path
+ |
+ = link_to "Log In", new_user_session_path
+ |
+ -else
+ = link_to "My Account", account_path |
+ = link_to "Logout", user_session_path, :method => :delete, :confirm => "Are you sure you want to logout?"
+
+ %p{:style=>"color: green"}= flash[:notice]
+
+ = yield
View
@@ -0,0 +1,11 @@
+# Require any additional compass plugins here.
+project_type = :rails
+project_path = RAILS_ROOT if defined?(RAILS_ROOT)
+css_dir = "public/stylesheets"
+sass_dir = "app/stylesheets"
+images_dir = "public/images"
+javascripts_dir = "public/javascripts"
+output_style = :compact
+# To enable relative image paths using the images_url() function:
+# http_images_path = :relative
+http_images_path = "/images"
View
@@ -23,6 +23,7 @@
config.gem "authlogic", :version => "2.0.5"
config.gem "authlogic-oid", :lib => "authlogic_openid", :version => '1.0.3'
config.gem "bcrypt-ruby", :lib => 'bcrypt', :version => "2.0.5"
+ config.gem 'chriseppstein-compass', :lib => 'compass'
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named
@@ -0,0 +1,5 @@
+require 'compass'
+# If you have any compass plugins, require them here.
+Compass.configuration.parse(File.join(RAILS_ROOT, "config", "compass.config"))
+Compass.configuration.environment = RAILS_ENV.to_sym
+Compass.configure_sass_plugin!
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c144d3

Please sign in to comment.