Permalink
Browse files

Finished layout and routes

  • Loading branch information...
C-cruz committed Mar 12, 2012
1 parent 24ccf81 commit e9b03ed8ab6617a45c6faadca0d7405c5d8fce11
Showing with 2,324 additions and 8 deletions.
  1. BIN .sass-cache/03ccba0773f4737c501f779f60d8f104f89feec9/_utilities.scssc
  2. BIN .sass-cache/0cb9c6c5599b70bd3e37af2710949e604a8d4c35/_support.scssc
  3. BIN .sass-cache/2e005492c927311e6a33334179c6d86eb50070c1/_blueprint.scssc
  4. BIN .sass-cache/465e636569d3d96b886bc9507eac29b9ac55c2d9/_clearfix.scssc
  5. BIN .sass-cache/465e636569d3d96b886bc9507eac29b9ac55c2d9/_float.scssc
  6. BIN .sass-cache/465e636569d3d96b886bc9507eac29b9ac55c2d9/_hacks.scssc
  7. BIN .sass-cache/4d54743284deccdb054327df3b3ba11e49c14b0b/_grid-background.scssc
  8. BIN .sass-cache/512c5aea265a5dba8f8b94b695ce3cee989eb9e1/_link-colors.scssc
  9. BIN .sass-cache/7f9c641936055918452b5ff20b88ec8fdddf2a30/_base.scssc
  10. BIN .sass-cache/c913424047db8a4dda17157dd2f77ae1dcb53c27/ie.scssc
  11. BIN .sass-cache/c913424047db8a4dda17157dd2f77ae1dcb53c27/print.scssc
  12. BIN .sass-cache/c913424047db8a4dda17157dd2f77ae1dcb53c27/screen.scssc
  13. BIN .sass-cache/d192fd343bf8b4330128cced712088b18c4879ac/_nowrap.scssc
  14. BIN .sass-cache/dc1504572c0c0b5e9910dfbee26c09b918ec219e/_background-size.scssc
  15. +640 −0 .sass-cache/dc1504572c0c0b5e9910dfbee26c09b918ec219e/_images.scssc
  16. BIN .sass-cache/dc1504572c0c0b5e9910dfbee26c09b918ec219e/_shared.scssc
  17. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_colors.scssc
  18. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_debug.scssc
  19. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_form.scssc
  20. +585 −0 .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_grid.scssc
  21. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_ie.scssc
  22. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_interaction.scssc
  23. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_print.scssc
  24. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_reset.scssc
  25. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_scaffolding.scssc
  26. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_typography.scssc
  27. BIN .sass-cache/e44dde4fc18ae7f478ba84b422663c7f154ae700/_utilities.scssc
  28. +114 −0 app/assets/custom.css
  29. BIN app/assets/images/grid.png
  30. BIN app/assets/images/logo.png
  31. +3 −0 app/assets/javascripts/users.js.coffee
  32. +16 −0 app/assets/stylesheets/ie.css.scss
  33. +10 −0 app/assets/stylesheets/partials/_base.css.scss
  34. +8 −0 app/assets/stylesheets/print.css.scss
  35. +49 −0 app/assets/stylesheets/screen.css.scss
  36. +3 −0 app/assets/stylesheets/users.css.scss
  37. +1 −1 app/controllers/pages_controller.rb
  38. +5 −0 app/controllers/users_controller.rb
  39. +2 −0 app/helpers/users_helper.rb
  40. +10 −0 app/views/layouts/_footer.html.erb
  41. +11 −0 app/views/layouts/_header.html.erb
  42. +7 −0 app/views/layouts/_stylesheets.html.erb
  43. +7 −0 app/views/pages/help.html.erb
  44. +1 −1 app/views/pages/home.html.erb
  45. +2 −0 app/views/users/new.html.erb
  46. +2 −0 config/compass.rb
  47. +5 −5 config/routes.rb
  48. BIN images/grid.png
  49. +16 −0 sass/ie.scss
  50. +10 −0 sass/partials/_base.scss
  51. +8 −0 sass/print.scss
  52. +49 −0 sass/screen.scss
  53. +1 −1 spec/controllers/pages_controller_spec.rb
  54. +18 −0 spec/controllers/users_controller_spec.rb
  55. +24 −0 spec/requests/layout_links_spec.rb
  56. +109 −0 stylesheets/ie.css
  57. +73 −0 stylesheets/print.css
  58. +535 −0 stylesheets/screen.css
Binary file not shown.

Large diffs are not rendered by default.

Oops, something went wrong.

Large diffs are not rendered by default.

Oops, something went wrong.
Binary file not shown.
View
@@ -0,0 +1,114 @@
+.container {
+ width: 710px;
+}
+
+body {
+ background: #cff;
+}
+
+header {
+ padding-top: 20px;
+}
+
+header img {
+ padding: 1em;
+ background: #fff;
+}
+
+section {
+ margin-top:1em;
+ font-size: 120%;
+ padding: 20px;
+ background: #fff;
+}
+
+section h1 {
+ font-size: 200%;
+}
+
+/* Links */
+
+a {
+ color: #09c;
+ text-decoration: none;
+}
+
+a:hover {
+ color: #069;
+ text-decoration: underline;
+}
+
+a:visited {
+ color: #069;
+}
+
+/* Navigation */
+
+nav {
+ float: right;
+}
+
+nav {
+ background-color: white;
+ padding: 0 0.7em;
+ white-space: nowrap;
+}
+
+nav ul {
+ margin: 0;
+ padding: 0;
+}
+
+nav ul li {
+ list-style-type: none;
+ display: inline-block;
+ padding: 0.2em 0;
+}
+
+nav ul li a {
+ padding: 0 5px;
+ font-weight: bold;
+}
+
+nav ul li a:visited {
+ color: #09c;
+}
+
+nav ul li a:hover {
+ text-decoration: underline;
+}
+
+/* Sign up button */
+
+a.signup_button {
+ margin-left: auto;
+ margin-right: auto;
+ display: block;
+ text-align: center;
+ width: 190px;
+ color: #fff;
+ background: #006400;
+ font-size: 150%;
+ font-weight: bold;
+ padding: 20px;
+}
+
+/* Round corners */
+
+.round {
+ -moz-border-radius: 10px;
+ -webkit-border-radius: 10px;
+ border-radius: 10px;
+}
+
+footer {
+ text-align: center;
+ margin-top: 10px;
+ width: 710px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+footer nav {
+ float: none;
+}
View
Binary file not shown.
View
Binary file not shown.
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,16 @@
+@import "blueprint";
+
+// To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
+// @include blueprint-ie
+
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-ie(true);
+ // Note: Blueprint centers text to fix IE6 container centering.
+ // This means all your texts will be centered under all version of IE by default.
+ // If your container does not have the .container class, don't forget to restore
+ // the correct behavior to your main container (but not the body tag!)
+ // Example:
+ // .my-container
+ // text-align: left
+}
@@ -0,0 +1,10 @@
+// Here is where you can define your constants for your application and to configure the blueprint framework.
+// Feel free to delete these if you want keep the defaults:
+
+$blueprint-grid-columns: 24;
+$blueprint-container-size: 950px;
+$blueprint-grid-margin: 10px;
+
+// Use this to calculate the width based on the total width.
+// Or you can set $blueprint-grid-width to a fixed value and unset $blueprint-container-size -- it will be calculated for you.
+$blueprint-grid-width: ($blueprint-container-size + $blueprint-grid-margin) / $blueprint-grid-columns - $blueprint-grid-margin;
@@ -0,0 +1,8 @@
+@import "blueprint";
+
+// To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
+// @include blueprint-print
+
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-print(true); }
@@ -0,0 +1,49 @@
+// This import applies a global reset to any page that imports this stylesheet.
+@import "blueprint/reset";
+
+// To configure blueprint, edit the partials/base.sass file.
+@import "partials/base";
+
+// Import all the default blueprint modules so that we can access their mixins.
+@import "blueprint";
+
+// Import the non-default scaffolding module.
+@import "blueprint/scaffolding";
+
+// To generate css equivalent to the blueprint css but with your
+// configuration applied, uncomment:
+// @include blueprint
+
+// If you are doing a lot of stylesheet concatenation, it is suggested
+// that you scope your blueprint styles, so that you can better control
+// what pages use blueprint when stylesheets are concatenated together.
+body.bp {
+ @include blueprint-typography(true);
+ @include blueprint-utilities;
+ @include blueprint-debug;
+ @include blueprint-interaction;
+ // 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
+}
+
+form.bp {
+ @include blueprint-form;
+ // You'll probably want to remove the scaffolding once you start styling your site.
+ @include blueprint-scaffolding; }
+
+// Page layout can be done using mixins applied to your semantic classes and IDs:
+body.two-col {
+ #container {
+ @include container; }
+ #header, #footer {
+ @include column($blueprint-grid-columns); }
+ #sidebar {
+ // One third of the grid columns, rounding down. With 24 cols, this is 8.
+ $sidebar-columns: floor($blueprint-grid-columns / 3);
+ @include column($sidebar-columns); }
+ #content {
+ // Two thirds of the grid columns, rounding up.
+ // With 24 cols, this is 16.
+ $content-columns: ceil(2 * $blueprint-grid-columns / 3);
+ // true means it's the last column in the row
+ @include column($content-columns, true); } }
@@ -0,0 +1,3 @@
+// Place all the styles related to the Users controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -12,6 +12,6 @@ def about
end
def help
- @title = "help"
+ @title = "Help"
end
end
@@ -0,0 +1,5 @@
+class UsersController < ApplicationController
+ def new
+ @title = "Sign up"
+ end
+end
@@ -0,0 +1,2 @@
+module UsersHelper
+end
@@ -0,0 +1,10 @@
+<footer>
+ <nav class="round">
+ <ul>
+ <li><%= link_to "About", about_path %></li>
+ <li><%= link_to "Contact", contact_path %></li>
+ <li><a href="http://news.railstutorial.org/">News</a></li>
+ <li><a href="http://www.railstutorial.org/">Rails Tutorial</a></li>
+ </ul>
+ </nav>
+</footer>
@@ -0,0 +1,11 @@
+<header>
+ <% logo = image_tag("logo.png", :alt => "Sample App", :class => "round") %>
+ <%= link_to logo, root_path %>
+ <nav class="round">
+ <ul>
+ <li><%= link_to "Home", root_path %></li>
+ <li><%= link_to "Help", help_path %></li>
+ <li><%= link_to "Sign in", '#' %></li>
+ </ul>
+ </nav>
+</header>
@@ -0,0 +1,7 @@
+<!--[if lt IE 9]>
+<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+<![endif]-->
+<%= stylesheet_link_tag 'stylesheets/screen', :media => 'screen' %>
+<%= stylesheet_link_tag 'stylesheets/print', :media => 'print' %>
+<!--[if lt IE 8]><%= stylesheet_link_tag 'stylesheets/ie' %><![endif]-->
+<%= stylesheet_link_tag 'custom', :media => 'screen' %>
@@ -0,0 +1,7 @@
+<h1>Help</h1>
+<p>
+ Get help on Ruby on Rails Tutorial at the
+ <a href="http://railstutorial.org/help">Rails Tutorial help page</a>
+ To get help on this sample app, see the
+ <a href="http://railstutorial.org/book">Rails Tutorial book</a>.
+</p>
@@ -5,4 +5,4 @@
sample application.
</p>
-<%= link_to "Sign up now!", '#', :class => "signup_button round" %>
+<%= link_to "Sign up now!", 'signup_path', :class => "signup_button round" %>
@@ -0,0 +1,2 @@
+<h1>Users#new</h1>
+<p>Find me in app/views/users/new.html.erb</p>
View
@@ -0,0 +1,2 @@
+# Require any additional compass plugins here.
+project_type = :rails
View
@@ -1,14 +1,14 @@
SampleApp::Application.routes.draw do
+ get "users/new"
+
+ match '/signup', :to => 'users#new'
+
match '/contact', :to => 'pages#contact'
match '/about', :to => 'pages#about'
match '/help', :to => 'pages#help'
- get "pages/home"
+ root :to => 'pages#home'
- get "pages/contact"
-
- get "pages/about"
- get "pages/help"
# The priority is based upon order of creation:
# first created -> highest priority.
View
Binary file not shown.
View
@@ -0,0 +1,16 @@
+@import "blueprint";
+
+// To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
+// @include blueprint-ie
+
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-ie(true);
+ // Note: Blueprint centers text to fix IE6 container centering.
+ // This means all your texts will be centered under all version of IE by default.
+ // If your container does not have the .container class, don't forget to restore
+ // the correct behavior to your main container (but not the body tag!)
+ // Example:
+ // .my-container
+ // text-align: left
+}
View
@@ -0,0 +1,10 @@
+// Here is where you can define your constants for your application and to configure the blueprint framework.
+// Feel free to delete these if you want keep the defaults:
+
+$blueprint-grid-columns: 24;
+$blueprint-container-size: 950px;
+$blueprint-grid-margin: 10px;
+
+// Use this to calculate the width based on the total width.
+// Or you can set $blueprint-grid-width to a fixed value and unset $blueprint-container-size -- it will be calculated for you.
+$blueprint-grid-width: ($blueprint-container-size + $blueprint-grid-margin) / $blueprint-grid-columns - $blueprint-grid-margin;
View
@@ -0,0 +1,8 @@
+@import "blueprint";
+
+// To generate css equivalent to the blueprint css but with your configuration applied, uncomment:
+// @include blueprint-print
+
+//Recommended Blueprint configuration with scoping and semantic layout:
+body.bp {
+ @include blueprint-print(true); }
View
@@ -0,0 +1,49 @@
+// This import applies a global reset to any page that imports this stylesheet.
+@import "blueprint/reset";
+
+// To configure blueprint, edit the partials/base.sass file.
+@import "partials/base";
+
+// Import all the default blueprint modules so that we can access their mixins.
+@import "blueprint";
+
+// Import the non-default scaffolding module.
+@import "blueprint/scaffolding";
+
+// To generate css equivalent to the blueprint css but with your
+// configuration applied, uncomment:
+// @include blueprint
+
+// If you are doing a lot of stylesheet concatenation, it is suggested
+// that you scope your blueprint styles, so that you can better control
+// what pages use blueprint when stylesheets are concatenated together.
+body.bp {
+ @include blueprint-typography(true);
+ @include blueprint-utilities;
+ @include blueprint-debug;
+ @include blueprint-interaction;
+ // 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
+}
+
+form.bp {
+ @include blueprint-form;
+ // You'll probably want to remove the scaffolding once you start styling your site.
+ @include blueprint-scaffolding; }
+
+// Page layout can be done using mixins applied to your semantic classes and IDs:
+body.two-col {
+ #container {
+ @include container; }
+ #header, #footer {
+ @include column($blueprint-grid-columns); }
+ #sidebar {
+ // One third of the grid columns, rounding down. With 24 cols, this is 8.
+ $sidebar-columns: floor($blueprint-grid-columns / 3);
+ @include column($sidebar-columns); }
+ #content {
+ // Two thirds of the grid columns, rounding up.
+ // With 24 cols, this is 16.
+ $content-columns: ceil(2 * $blueprint-grid-columns / 3);
+ // true means it's the last column in the row
+ @include column($content-columns, true); } }
@@ -46,7 +46,7 @@
it "should have the right title" do
get 'help'
response.should have_selector("title",
- :content => "help")
+ :content => "Help")
end
end
Oops, something went wrong.

0 comments on commit e9b03ed

Please sign in to comment.