spiegel-keyman/web/bulk_rendering/index.html
2022-10-24 08:43:59 +07:00

68 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!-- Set the viewport width to match phone and tablet device widths -->
<meta name="viewport" content="width=device-width,user-scalable=no" />
<!-- Allow KeymanWeb to be saved to the iPhone home screen -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- Enable IE9 Standards mode -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>KeymanWeb - On-Screen Keyboard Renders</title>
<!-- Your page CSS -->
<style type='text/css'>
body {font-family: Tahoma,helvetica; margin-left: 0px}
h3 {font-size: 1em;font-weight:normal;color: darkred; margin-bottom: 4px}
h1 { font-size: 12px; font-weight: bold; color: darkred; }
h2 { font-size: 10px; background: blue; color: white; margin: 0; }
p { font-size: 10px; margin: 0; }
</style>
<!-- Insert unminified KeymanWeb source scripts -->
<!--<script src="https://s.keyman.com/kmw/engine/14.0.227/keymanweb.js" type="application/javascript"></script>-->
<script src="../build/web/debug/keymanweb.js" type="application/javascript"></script>
<script src="../release/renderer/bulk_render.js" type="application/javascript"></script>
<!-- Initialization: set paths to keyboards, resources and fonts as required -->
<script>
var kmw=window.keyman;
kmw.init({
attachType:'auto'
}).then(function() {
kmw.addKeyboards();
});
function runRenderer() {
var renderer_poll = function() {
if(kmw.getKeyboards().length == 0) {
// Waiting for KeymanWeb to load keyboards
window.setTimeout(function() {
renderer_poll();
}, 1000);
} else {
kmw_renderer.run(document.getElementById('allLayers').checked, document.getElementById('filter').value);
}
}
renderer_poll();
}
</script>
</head>
<body>
<h1>KeymanWeb - Bulk On-Screen Keyboard Rendering</h1>
<input type='checkbox' id='allLayers' checked> <label for='allLayers'>All Layers</label>
<input type='text' id='filter' class='kmw-disabled' placeholder='Filter by ID'>
<input type='button' value='Start Render' onclick='runRenderer()'>
<div id='deviceNotes'></div>
<div id='renderList'></div>
</body>
</html>