mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2025-06-27 05:23:13 +00:00
eBook
This commit is contained in:
51
Esiur.eBook/wwwroot/index.html
Normal file
51
Esiur.eBook/wwwroot/index.html
Normal file
@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<title>Esiur.eBook</title>
|
||||
<base href="/" />
|
||||
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="css/app.css" rel="stylesheet" />
|
||||
<link href="Esiur.eBook.styles.css" rel="stylesheet" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">Loading...</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
</body>
|
||||
|
||||
|
||||
<script src='_content/Blazor.Extensions.Canvas/blazor.extensions.canvas.js'></script>
|
||||
<script>
|
||||
function renderJS(timeStamp) {
|
||||
theInstance.invokeMethodAsync('RenderInBlazor', timeStamp);
|
||||
window.requestAnimationFrame(renderJS);
|
||||
}
|
||||
|
||||
function resizeCanvasToFitWindow() {
|
||||
var holder = document.getElementById('canvasHolder');
|
||||
var canvas = holder.querySelector('canvas');
|
||||
if (canvas) {
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = window.innerHeight;
|
||||
theInstance.invokeMethodAsync('ResizeInBlazor', canvas.width, canvas.height);
|
||||
}
|
||||
}
|
||||
|
||||
window.initRenderJS = (instance) => {
|
||||
window.theInstance = instance;
|
||||
//window.addEventListener("resize", resizeCanvasToFitWindow);
|
||||
//resizeCanvasToFitWindow();
|
||||
window.requestAnimationFrame(renderJS);
|
||||
};
|
||||
</script>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user