<!DOCTYPE html>
<html>
<head>
    <!-- The first thing in any HTML file should be the charset -->
    <meta charset="utf-8"/>

    <!-- Make the page mobile compatible -->
    <meta name="viewport" content="width=device-width, initial-scale=1"/>

    <!-- Allow installing the app to the homescreen -->
    <meta name="mobile-web-app-capable" content="yes"/>

    <!-- iOS home screen icons -->
    <link rel="apple-touch-icon" sizes="120x120" href="<%= '${staticResourceContextPath}' %>/jsbuilt/images/oli-icon.png"/>
    <link rel="apple-touch-icon" sizes="152x152" href="<%= '${staticResourceContextPath}' %>/jsbuilt/images/oli-icon.png"/>
    <link rel="apple-touch-icon" sizes="167x167" href="<%= '${staticResourceContextPath}' %>/jsbuilt/images/oli-icon.png"/>
    <link rel="apple-touch-icon" sizes="180x180" href="<%= '${staticResourceContextPath}' %>/jsbuilt/images/oli-icon.png"/>
    <link rel="icon" href="<%= '${staticResourceContextPath}' %>/jsbuilt/images/oli-icon.png"/>
    <link rel="stylesheet" href="<%= '${staticResourceContextPath}' %>/jsbuilt/vendor.bundle.css">
    <% for (var dep in htmlWebpackPlugin.options.externalCSS) { %>
    <link rel="stylesheet" type="text/css" href="<%= htmlWebpackPlugin.options.externalCSS[dep] %>"><% } %>
</head>
<body>
<!-- Display a message if JS has been disabled on the browser. -->
<noscript>If you're seeing this message, that means <strong>JavaScript has been disabled on your browser</strong>,
    please <strong>enable JS</strong> to make this app work.
</noscript>

<!-- The app hooks into this div -->
<div id="root" style="height: 100%">
    <div class="sk-cube-grid">
        <div class="sk-cube sk-cube1"></div>
        <div class="sk-cube sk-cube2"></div>
        <div class="sk-cube sk-cube3"></div>
        <div class="sk-cube sk-cube4"></div>
        <div class="sk-cube sk-cube5"></div>
        <div class="sk-cube sk-cube6"></div>
        <div class="sk-cube sk-cube7"></div>
        <div class="sk-cube sk-cube8"></div>
        <div class="sk-cube sk-cube9"></div>
    </div>
</div>


<script>
<%=
'   <#setting number_format="0.##">\n' +
'   const permissions = [];\n' +
'   <#list actionUser.permissions as item>\n' +
'   permissions.push(${item});\n' +
'   </#list>\n' +
'   <#assign permissions = actionUser.permissions>\n' +
'   global = { \n' +
'            contextPath: "${contextPath}", \n' +
'            namespaceUrl: "${namespaceUrl}", \n' +
'            staticResourceContextPath: "${staticResourceContextPath}", \n' +
'            username: "${actionUser.userName}", \n' +
'            fullName: "${actionUser.fullName}", \n' +
'            lastLogon: <#if actionUser.loginSince??> new Date("${(actionUser.loginSince?datetime)!}") <#else> \n' +
'            new Date() </#if>, \n' +
'            permissions: permissions, \n' +
'            appVersion: \'${appVersion}\', \n' +
'        }; \n'


%>
</script>

<script type="application/javascript">
    window.__webpack_public_path__ = window.global.staticResourceContextPath + "/jsbuilt/";
</script>
<script src="<%= '${staticResourceContextPath}' %>/jsbuilt/app.bundle.js"></script>
<script src="<%= '${staticResourceContextPath}' %>/jsbuilt/vendor.bundle.js"></script>
<#--<script src="<%= '${staticResourceContextPath}' %>/jsbuilt/vendors~pdfjsWorker.bundle.js"></script>-->
<% for (var dep in htmlWebpackPlugin.options.externalJS) { %>
<script type="text/javascript" src="<%= htmlWebpackPlugin.options.externalJS[dep] %>"></script>
<% } %>
</body>
</html>
