blurhash/TypeScript/demo/index.html
2018-06-04 18:12:42 +03:00

74 lines
1.6 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<title>Blurhash test file</title>
<style>
* {
box-sizing: border-box;
}
.wrapper {
display: flex;
align-items: flex-start;
}
.blurhashWrapper {
padding: 0 20px;
}
canvas {
display: block;
width: 632px;
height: 356px;
background: #ccc;
}
#blurhash {
margin-top: 20px;
font-size: 24px;
width: 632px;
}
label {
display: block;
padding: 10px 0;
}
label > span {
display: inline-block;
width: 100px;
}
</style>
</head>
<body>
<h1>BlurHash demo</h1>
<div class="wrapper">
<div>
<h2>Encode</h2>
<canvas id="original" width="100" height="100"></canvas>
<label>
<span>File:</span>
<input id="fileinput" type="file" accept="image/*" />
</label>
<label>
<span>Components</span>
<input type="number" id="x" value="4" min="1" max="9" />
×
<input type="number" id="y" value="3" min="1" max="9" />
</label>
</div>
<div class="blurhashWrapper">
<h2>Blurhash</h2>
<input id="blurhash" type="text" value="" />
</div>
<div>
<h2>Decode</h2>
<canvas id="canvas" width="32" height="32"></canvas>
</div>
</div>
<script src="./demo.js"></script>
</body>
</html>