Skip to content

Commit

Permalink
Added green banner at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Davies committed Nov 12, 2011
1 parent 063ee38 commit e680a94
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 28 deletions.
Binary file added app/assets/images/store/bigbanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/store/sidebanner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions app/assets/stylesheets/store/screen.css.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ body {
background: #fff url(<%= asset_path 'store/narrow_bg.png' %>) repeat-x;
}

#banner, #container, footer .inner {width: 960px; margin: 0 auto;}
#banner, .container, footer .inner {width: 960px; margin: 0 auto;}

#topbar {
background: rgb(52,125,30) url(<%= asset_path 'store/sidebanner.png' %>) repeat-x;
height: 404px;
}

header, footer {background-color: #000;}
header nav *, footer div#secondary * {display: inline-block;}
header {
position: relative;
z-index: 100;
height: 58px;
height: 79px;
margin: 0 auto;
}

Expand Down Expand Up @@ -60,6 +65,7 @@ header nav a, header nav a:visited,header nav a:hover {

header nav a.cart {color: #B30000;}


footer {
background: #fff url(<%= asset_path 'store/footer_bkgd.jpg' %>) repeat-x bottom left;
margin: 80px 0 0; clear: both;
Expand Down
56 changes: 31 additions & 25 deletions app/overrides/replace_body.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,38 @@
:replace => %q{[data-hook='body']},
:closing_selector => %q{},
:text => %q{<body id="<%= (@body_id == 'signup' ? 'checkout' : @body_id) || controller.controller_name %>">
<div id="container">
<header>
<%= link_to image_tag("store/logo.png", :width => "300", :height => "58", :alt => "Rails Dog Radio", :id => "logo"), root_url %>
<form action="#" >
</form>
<%= form_tag products_url, :method => :get do %>
<input type="search" id="s1" class="empty" name="keywords" placeholder="Search Railsdog Radio">
<% end %>
<nav>
<%= link_to "products", products_path %>
<% if current_user %>
<%= link_to t('my_account'), account_path, :class => "cart" %>
<%= link_to t('logout'), destroy_user_session_path, :class => "cart" %>
<% else %>
<%= link_to t('log_in'), login_path, :class => "cart" %>
<div id="topbar">
<div class="container">
<header>
<%= link_to image_tag("store/logo.png", :width => "300", :height => "58", :alt => "Rails Dog Radio", :id => "logo"), root_url %>
<form action="#" >
</form>
<%= form_tag products_url, :method => :get do %>
<input type="search" id="s1" class="empty" name="keywords" placeholder="Search Railsdog Radio">
<% end %>
<%= link_to_cart %>
</nav>
</header>
<% if content_for?(:banner) %>
<div id="banner" role="banner">
<%= yield :banner %>
</div>
<% end %>
<nav>
<%= link_to "products", products_path %>
<% if current_user %>
<%= link_to t('my_account'), account_path, :class => "cart" %>
<%= link_to t('logout'), destroy_user_session_path, :class => "cart" %>
<% else %>
<%= link_to t('log_in'), login_path, :class => "cart" %>
<% end %>
<%= link_to_cart %>
</nav>
</header>
<% if content_for?(:banner) %>
<div id="banner" role="banner">
<%= yield :banner %>
</div>
<% end %>
</div>
</div>
<div class="container">
<div id="main" role="main">
<% if flash.notice %>
<div class="flash notice"><%= flash.notice %></div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/shared/_product_banner.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<%= content_for :banner do %>
<div role="banner" id="banner">
<h1>Products</h1>
<%= image_tag "store/satellite-radios-bg.jpg", :alt => "Satellite-radios-bg" %>
<%= image_tag "store/bigbanner.png", :alt => "Tuatun Banner" %>
</div>
<% end %>

0 comments on commit e680a94

Please sign in to comment.