/app/views/layouts/application.html.erb
https://github.com/lamhaianh/ror_ecommerce · Ruby HTML · 111 lines · 90 code · 15 blank · 6 comment · 3 complexity · 80e830d8f990254d7074fb24feccf8c7 MD5 · raw file
- <!DOCTYPE html>
- <html>
- <head>
- <title>
- <%= site_name %>: <%= yield :title %>
- </title>
- <%#= stylesheet_link_tag :all %>
- <%= stylesheet_link_tag 'buttons.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'screen.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'link_icons.css', :media => 'screen, projection' %>
- <%= stylesheet_link_tag 'sprite.css' %>
- <%= stylesheet_link_tag 'print.css', :media => 'print'%>
- <%= stylesheet_link_tag 'main.css' %>
- <!--[if lt IE 8]
- <%= stylesheet_link_tag 'ie.css', :media => 'screen, projection'%>
- <![endif]-->
- <!--[if lt IE 7]
- <%= stylesheet_link_tag 'ie6.css', :media => 'screen, projection' %>
- <![endif]-->
- <%= csrf_meta_tag %>
- <%= javascript_include_tag 'jquery-1.5.2.min', 'rails', 'jquery-ui-1.8.12.custom.min','application' %>
- <%= yield :head %>
- </head>
- <body >
- <div class="bp">
- <%= raw "<p class='flash_notice'> #{notice}</p>" if notice %>
- <%= raw "<p class='flash_error'>#{alert}</p>" if alert %>
- </div>
- <div class=" bp">
- <div id="header_wrapper" class='bp'>
- <div class="container logged-in" id="header">
- <h1 id="logo">
- <%= link_to image_tag( "logos/#{Image::MAIN_LOGO}.png", :alt => 'hadean image.'), root_path %>
- <%#= link_to 'RoR Ecommerce', root_path %>
- </h1>
- <ul id="menu-main">
- <li id="menu-main-discover">
- <a href="/"><strong>Commerce</strong> <span>that scales</span></a>
- </li>
- <li class="" id="menu-main-cart">
- <%= link_to(shopping_cart_items_path, :id => 'cart_items_buttons') do %>
- <strong> Cart </strong> <span>view your stuff.</span>
- <% end %>
- </li>
- <li class="" id="menu-main-wish">
- <%= link_to(wish_items_path, :id => 'wish_items_button') do %>
- <strong> Wish List </strong> <span>what you want.</span>
- <% end %>
- </li>
- <li class="" id="menu-main-user">
- <div>
- <% unless most_likely_user %>
- <strong><%= link_to 'Login', login_path %></strong> or
- <span><%= link_to 'Sign up', signup_path %></span>
- <% else %>
- <strong>Hi <%= most_likely_user.first_name %></strong>
- <span>(<%= link_to 'not you?', logout_path %>)</span>
- <% end %>
- </div>
- </li>
- </ul>
- <%= form_for search_product, :html => {:class => 'search'} do %>
- <div class="field search">
- <span class="icon-search"></span>
- <%= text_field_tag 'q', nil , :class => 'input-search text', :id => 'term' %>
- <%= submit_tag 'Go', :class => 'button spade' %>
- </div>
- <% end %>
- </div>
- </div>
- <div id="sub_header_wrapper" class='bp'>
- <div id="sub_sub_header_wrapper" class='container'>
- <%= render 'shared/main_product_tabs' %>
- </div>
- </div>
- </div>
- <div id='content_wrapper' class='container'>
- <%= yield %>
- </div>
- </div>
- <%= render 'shared/main_footer' %>
- <%= yield :bottom %>
- <script>
- jQuery(window).ready(
- function() {
- jQuery('.flash_notice').delay(6000).slideUp( 'slow');
- jQuery('.flash_error').delay(6000).slideUp( 'slow');
- }
- );
- </script>
- <%# javascript_include_tag :defaults %>
- <%#= javascript_include_tag 'jquery-1.4.2.min', 'rails' %>
- <%#= javascript_include_tag :all, :cache => true %>
- </body>
- <%= yield :below_body %>
- </html>