mt-polygon-simplification/benchmarking/public/loadChart.html
2019-08-10 09:34:57 +02:00

72 lines
1.9 KiB
HTML

<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Document</title>
<link rel="stylesheet" href="./style.css" />
<style>
file-drop {
position: relative;
box-sizing: border-box;
display: block;
padding: 10px;
background-color: rgba(245, 234, 174, 0.2);
overflow: hidden;
touch-action: none;
}
file-drop::after {
content: '';
position: absolute;
display: block;
left: 2px;
top: 2px;
right: 2px;
bottom: 2px;
border: 2px dashed #fff;
border-radius: 10px;
opacity: 0;
transform: scale(0.95);
transition: all 200ms ease-in;
transition-property: transform, opacity;
pointer-events: none;
}
.drop-valid::after {
background-color: rgba(88, 116, 88, 0.2);
border-color: rgba(65, 129, 65, 0.5);
opacity: 1;
transform: scale(1);
transition-timing-function: ease-out;
}
.drop-invalid::after {
background-color: rgba(255, 27, 27, 0.2);
border-color: rgba(255, 170, 170, 0.5);
opacity: 1;
transform: scale(1);
transition-timing-function: ease-out;
}
#download {
width: 100%;
}
</style>
</head>
<body>
<header>
<h1>Load chart</h1>
<a href="./index.html">Back to benchmark</a>
</header>
<main>
<h2>File-drop</h2>
<file-drop id="file-drop" accept="application/json"
>Drop config here</file-drop
>
<h2>Chart</h2>
<button id="download" style="display: none">Download image</button>
<div><canvas id="myChart" width="600" height="400"></canvas></div>
</main>
<script src="./loadChart.js"></script>
</body>
</html>