<%!
import splunk
from splunk.appserver.mrsparkle.lib import config, util
%>\
<%!
isLite = util.isLite()

if isLite:
  theme = '-lite'
else:
  theme = ''

rootEndpoint = config.getConfig()['MRSPARKLE_ROOT_PATH'] or ''
rootEndpoint = rootEndpoint.strip("/")

%>\
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie  lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 lt-ie9"> <![endif]-->
<!--[if IE 9]>    <html class="no-js ie9"> <![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js"> <!--<![endif]-->
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <title>${_('Unsupported browser.')}</title>
    <meta name="description" content="listen to your data" />
    <meta name="author" content="Splunk Inc." />
    <meta name="viewport" content="width=1024, initial-scale=1.0" />
    <link rel="shortcut icon" href="${util.getFaviconURL()}" />
    <link rel="apple-touch-icon-precomposed" sizes="57x57" href="${make_url('/static/img/bookmark/apple-icon-57x57-precomposed.png')}" />
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="${make_url('/static/img/bookmark/apple-icon-72x72-precomposed.png')}" />
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="${make_url('/static/img/bookmark/apple-icon-114x114-precomposed.png')}" />
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="${make_url('/static/img/bookmark/apple-icon-144x144-precomposed.png')}" />
    <meta name="msapplication-TileColor" content="#65A637">
    <meta name="msapplication-TileImage" content="${make_url('/static/img/bookmark/ms-tileicon-144x144.png')}">
    % if isLite:
      <link rel="stylesheet" type="text/css" href="${make_url('/static/build/css/bootstrap-lite.css')}" />
      <link rel="stylesheet" type="text/css" href="${make_url('/static/css/build/pages/account-bootstrap-lite.min.css')}" />
    % else:
      <link rel="stylesheet" type="text/css" href="${make_url('/static/build/css/bootstrap-enterprise.css')}" />
      <link rel="stylesheet" type="text/css" href="${make_url('/static/css/build/pages/account-bootstrap.min.css')}" />
    % endif
    <script src="${make_url('/static/js/i18n.js')}"></script>
</head>
% if isLite:
<body class="locale-${i18n.current_lang()[0]|h} lite">
% else:
<body class="locale-${i18n.current_lang()[0]|h} ${cherrypy.config['product_type']|h}">
% endif
    <div id="browser-not-supported"></div>
    <script>
        //browser support message
          var url = '';
          var notSupportedEl = document.getElementById('browser-not-supported');
          notSupportedEl.innerHTML = ([
              '<p>',
              gettext('This browser is not supported by Splunk.'),
              '<br />',
              gettext('Please refer to the list of %s.').replace('%s', '<a href="#">' + gettext('Supported Browsers') + '</a>'),
              '</p>'
          ]).join('');
          var docLinkEl = notSupportedEl.getElementsByTagName('a')[0];
          % if rootEndpoint:
              url = "/" + "${rootEndpoint}";
          % endif
          docLinkEl.href = url + '/' + encodeURIComponent("${config.getConfig()['LOCALE']}") + '/help?location=learnmore.systemrequirements';
    </script>
    <noscript>
         <p>Splunk relies on JavaScript to function properly.<br>Please enable JavaScript and then refresh the page to login.</p>
    </noscript>
</body>
</html>
