fuel-ui/static/index.html

83 lines
2.8 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="theme-color" content="#394c59">
<meta name="description" content="">
<meta name="author" content="">
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />
<link rel="shortcut icon" href="static/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="static/styles/layout.css">
<script type="text/javascript">
(function() {
'use strict';
var mainContainer, loadingErrors = [];
function showError(error) {
if (error) loadingErrors.push(error);
if (mainContainer && loadingErrors.length) mainContainer.textContent = loadingErrors.join('; ');
}
function loadScript(src, errorMessage) {
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = src;
script.onerror = showError.bind(null, errorMessage);
document.head.appendChild(script);
}
document.addEventListener('DOMContentLoaded', function() {
mainContainer = document.getElementById('main-container');
mainContainer.style.display = 'block';
showError();
});
// checks code taken from https://github.com/Modernizr/Modernizr
var hasCookies = (function() {
try {
document.cookie = 'cookietest=1';
var ret = document.cookie.indexOf('cookietest=') != -1;
document.cookie = 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';
return ret;
} catch (e) {
return false;
}
}());
var hasStorage = (function() {
try {
localStorage.setItem('storagetest', 'storagetest');
localStorage.removeItem('storagetest');
return true;
} catch (e) {
return false;
}
}());
if (hasCookies && hasStorage) {
loadScript(
'static/build/bundle.js?__CACHE_BUST__',
'Failed to load compressed Fuel UI bundle. ' +
'If you are using development environment, ' +
'please run "gulp build" to compile Fuel UI.'
);
} else {
showError('Fuel UI requires Cookies and LocalStorage to work');
}
}());
</script>
</head>
<body>
<div id="main-container">
<div class="loading"></div>
</div>
<div id="modal-container"></div>
<noscript>Fuel UI requires JavaScript to work</noscript>
</body>
</html>