drhenner/ror_ecommerce

View on GitHub
app/views/layouts/application.html.erb

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" lang="en"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9" lang="en"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<html>
<head>
  <title>
    <%= content_for?(:title) ? "#{site_name}: #{yield(:title)}" : site_name %>
  </title>
  <link rel="shortcut icon" href="/assets/favicon.ico" />

  <%= stylesheet_link_tag "normalize.css" %>
  <%= stylesheet_link_tag "application.css" %>
  <%= stylesheet_link_tag 'site/app.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 %>

  <%= yield :head %>

  <%= render 'shared/metadata' %>

</head>
<body >
<div id='body_wrapper'>

  <%= render partial: '/shared/welcome_header'%>

  <% if notice || alert %>
      <div class="flash_notice callout <%= !!alert ? 'alert' : 'warning' %>" data-closable>
        <div>
        <% if alert %>
          <%= alert %>
        <% elsif notice %>
          <%= notice %>
        <% end %>
        </div>
        <button class="close-button" aria-label="Close alert" type="button"  data-close>
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
  <% end %>

    <div id='content_wrapper' class='row <%= "myaccount" if myaccount_tab %> '>
      <% if myaccount_tab %>
        <h1 style='text-align:center;'><%= site_name %></h1>
        <hr class="first_double_hr">
        <hr class="second_double_hr">
        <%= render :partial => '/shared/myaccount_subheader' %>
      <% end %>
      <%= yield %>
    </div>
    <div id='prefooter_wrapper'>&nbsp;</div>
</div>
  <%= render 'shared/main_footer' %>
  <%= render 'shared/google_analytics' unless @disable_ga %>

  <%= javascript_include_tag 'application' %>
  <%= yield :bottom %>

  <script>
  jQuery(window).ready(
    function() {
      jQuery('.flash_notice').delay(6000).slideUp( 'slow');
      jQuery('.flash_error').delay(6000).slideUp( 'slow');
    }
  );
  </script>

</body>
  <%= yield :below_body %>
</html>