Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding a header to give some consistency

  • Loading branch information...
commit 6d26f12ceb9b88e75884fa585ce3ff608c83dbba 1 parent e498ae2
@ryanb authored
View
18 app/views/layouts/_user_info.html.erb
@@ -1,18 +0,0 @@
-<p id="user_info">
- <% if logged_in? %>
- <% if current_user.guest? %>
- <span class="guest_notice">You are currently logged in as a guest.</span><br />
- Please <%= link_to "setup your account", edit_user_path(:current) %> to save your <%= link_to_if(current_user.current_stamp && !current_page?(current_user.current_stamp), "stamps", current_user.current_stamp) %>.
- <% else %>
- Welcome <%=h current_user.username %>!
- <% if current_user.current_stamp && !current_page?(current_user.current_stamp) %>
- <%= link_to "Your Stamps", current_user.current_stamp %> |
- <% end %>
- <%= link_to "Update Profile", edit_user_path(:current) %> |
- <%= link_to "Log out", logout_path %>.
- <% end %>
- <% else %>
- Already have an account? Then
- <%= link_to "log in", login_path %>.
- <% end %>
-</p>
View
29 app/views/layouts/application.html.erb
@@ -8,9 +8,34 @@
<%= yield(:head) %>
</head>
<body>
+ <div id="header">
+ <div class="inner">
+ <div id="navigation">
+ <%- if logged_in? -%>
+ <%- if current_user.guest? -%>
+ <div class="message">
+ <strong>You are currently logged in as a guest.</strong></span><br />
+ Please <%= link_to "setup your account", edit_user_path(:current) %> to save your <%= link_to_if(current_user.current_stamp && !current_page?(current_user.current_stamp), "stamps", current_user.current_stamp) %>.
+ </div>
+ <%- else -%>
+ <div class="message">Welcome <%=h current_user.username %>!</div>
+ <div class="links">
+ <%= link_to "Your Stamps", current_user.current_stamp %> |
+ <%= link_to "Update Profile", edit_user_path(:current) %> |
+ <%= link_to "Log out", logout_path %>
+ </div>
+ <%- end -%>
+ <%- else -%>
+ <div class="message">
+ Already have an account? Then
+ <%= link_to "log in", login_path %>.
+ </div>
+ <%- end -%>
+ </div>
+ <%= image_tag "dailystamp_small.png", :size => "221x45", :alt => "Daily Stamp" %>
+ </div>
+ </div>
<div id="container">
- <%= render 'layouts/user_info' %>
-
<%- flash.each do |name, msg| -%>
<%= content_tag :div, msg, :id => "flash_#{name}" %>
<%- end -%>
View
BIN  public/images/dailystamp_small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
35 public/stylesheets/application.css
@@ -2,6 +2,8 @@ body {
background-color: #FFF;
font-family: Verdana, Helvetica, Arial;
font-size: 14px;
+ margin: 0;
+ padding: 0;
}
a img {
@@ -23,15 +25,38 @@ a:hover {
overflow: hidden;
}
-#container {
+#header {
+ background-color: #E5E5E5;
+ padding-top: 12px;
+ padding-bottom: 6px;
+ border-bottom: solid 4px #AAA;
+ margin-bottom: 25px;
+}
+
+#header .inner {
width: 800px;
margin: 0 auto;
+ position: relative;
}
-#user_info {
- text-align: center;
- margin: 10px 0;
- margin-bottom: 20px;
+#navigation {
+ position: absolute;
+ text-align: right;
+ right: 0;
+ bottom: 5px;
+}
+
+#navigation .links {
+ padding-top: 5px;
+}
+
+#navigation .links {
+ color: #777;
+}
+
+#container {
+ width: 800px;
+ margin: 0 auto;
}
#flash_notice, #flash_error {
View
6 public/stylesheets/generic.css
@@ -1,9 +1,3 @@
-body {
- background-image: url(/images/dailystamp_corner.gif);
- background-position: top right;
- background-repeat: no-repeat;
-}
-
#container {
width: 600px;
max-width: 600px;
View
24 public/stylesheets/home.css
@@ -1,11 +1,25 @@
-#logo {
+#header img {
+ display: none;
+}
+
+#navigation {
+ text-align: center;
+ position: static;
display: block;
- margin: 40px 0;
- margin-bottom: 50px;
}
-#user_info {
- margin-right: 80px;
+#navigation .message {
+ display: inline;
+ padding-right: 5px;
+}
+
+#navigation .links {
+ display: inline;
+}
+
+#logo {
+ margin: 40px 0;
+ margin-bottom: 50px;
}
h2 {
Please sign in to comment.
Something went wrong with that request. Please try again.