xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>Dashy Generated Dashboard 1</title>
<!-- Import the stylesheet. Will need to be "/www/index.css" when inside a template -->
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<script src="https://unpkg.com/@hpcc-js/loader@0.0.61"></script>
<script>
var hpccLoader = window["@hpcc-js/loader"];
var require = hpccLoader.npm();
</script>
</head>
<body>
<div id="placeholder">
</div>
<script>
require(["index"], dashPOC => {
app = dashPOC.init();
doResize();
});
window.addEventListener('resize', doResize);
function doResize() {
let myWidth;
let myHeight;
if (typeof (window.innerWidth) == 'number') {
myWidth = window.innerWidth;
myHeight = window.innerHeight;
} else {
if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
} else {
if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}
}
}
if (app) {
app
.resize({ width: myWidth - 16, height: myHeight - 16 })
.lazyRender();
}
};
</script>
</body>
</html>
https://unpkg.com/@hpcc-js/loader@0.0.61