Skip to content

Commit

Permalink
Added some partials (including a footer)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhartl committed Aug 15, 2010
1 parent 21c988f commit 2562b2a
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 17 deletions.
9 changes: 9 additions & 0 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<footer>
<nav class="round">
<ul>
<li><%= link_to "About", '#' %></li>
<li><%= link_to "Contact", '#' %></li>
<li><%= link_to "News", 'http://news.railstutorial.org/' %></li>
<li><%= link_to "Rails Tutorial", 'http://railstutorial.org/' %></li>
</ul>
</footer>
10 changes: 10 additions & 0 deletions app/views/layouts/_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<header>
<%= image_tag("logo.png", :alt => "Sample App", :class => "round") %>
<nav class="round">
<ul>
<li><%= link_to "Home", '#' %></li>
<li><%= link_to "Help", '#' %></li>
<li><%= link_to "Sign in", '#' %></li>
</ul>
</nav>
</header>
7 changes: 7 additions & 0 deletions app/views/layouts/_stylesheets.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
<!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
<%= stylesheet_link_tag 'custom', :media => 'screen' %>
20 changes: 3 additions & 17 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,15 @@
<head>
<title><%= title %></title>
<%= csrf_meta_tag %>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<%= stylesheet_link_tag 'blueprint/screen', :media => 'screen' %>
<%= stylesheet_link_tag 'blueprint/print', :media => 'print' %>
<!--[if lt IE 8]><%= stylesheet_link_tag 'blueprint/ie' %><![endif]-->
<%= stylesheet_link_tag 'custom', :media => 'screen' %>
<%= render 'layouts/stylesheets' %>
</head>
<body>
<div class="container">
<header>
<%= image_tag("logo.png", :alt => "Sample App", :class => "round") %>
<nav class="round">
<ul>
<li><%= link_to "Home", '#' %></li>
<li><%= link_to "Help", '#' %></li>
<li><%= link_to "Sign in", '#' %></li>
</ul>
</nav>
</header>
<%= render 'layouts/header' %>
<section class="round">
<%= yield %>
</section>
<%= render 'layouts/footer' %>
</div>
</body>
</html>
13 changes: 13 additions & 0 deletions public/stylesheets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,16 @@ a.signup_button {
border-radius: 10px;
}

/* Footer */

footer {
text-align: center;
margin-top: 10px;
width: 710px;
margin-left: auto;
margin-right: auto;
}

footer nav {
float: none;
}

0 comments on commit 2562b2a

Please sign in to comment.