<%namespace name='static' file='static_content.html'/>
<%! from django.utils import html %>
<!DOCTYPE html>
<html>
<head>
  <%block name="title"><title>edX</title></%block>
  <script type="text/javascript">
  /* immediately break out of an iframe if coming
     from the marketing website */
  (function(window) {
    if (window.location !== window.top.location) {
      window.top.location = window.location;
    }
  })(this);
  </script>

  <link rel="icon" type="image/x-icon" href="${static.url('images/favicon.ico')}" />

  <%static:css group='application'/>

  <%static:js group='main_vendor'/>
  <%block name="headextra"/>

  <!--[if lt IE 9]>
  <script src="${static.url('js/html5shiv.js')}"></script>
  <![endif]-->

  <!--[if lte IE 9]>
  <%static:css group='ie-fixes'/>
  <![endif]-->
  <meta name="path_prefix" content="${MITX_ROOT_URL}">
  <meta name="google-site-verification" content="_mipQ4AtZQDNmbtOkwehQDOgCxUUV2fb_C0b6wbiRHY" />

  % if not course:
  <%include file="google_analytics.html" />
  % endif

</head>

<body class="<%block name='bodyclass'/>">

% if not suppress_toplevel_navigation:
  <%include file="navigation.html" />
% endif

  <section class="content-wrapper">
    ${self.body()}
    <%block name="bodyextra"/>
  </section>

% if not suppress_toplevel_navigation:
  <%include file="footer.html" />
% endif

  <%static:js group='application'/>
  <%static:js group='module-js'/>

  <%block name="js_extra"/>
</body>
</html>

<%def name="login_query()">${
  "?course_id={0}&enrollment_action={1}".format(
    html.escape(course_id),
    html.escape(enrollment_action)
  ) if course_id and enrollment_action else ""
}</%def>
