74 lines
1.6 KiB
HTML
74 lines
1.6 KiB
HTML
<!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> |