mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Initial commit
This commit is contained in:
72
tools/shape_generator/index.html
Normal file
72
tools/shape_generator/index.html
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
shapez.io shape generator
|
||||
</title>
|
||||
|
||||
<script async src="index.js"></script>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
font-family: "Source Sans Pro", "Roboto", sans-serif;
|
||||
background: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#result {
|
||||
border: 1px solid #ccc;
|
||||
margin-top: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
#code {
|
||||
width: 600px;
|
||||
font-family: monospace;
|
||||
padding: 10px;
|
||||
border: 1px solid #ccc;
|
||||
background: #fff;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
#code:focus {
|
||||
outline: none;
|
||||
border-color: #39f;
|
||||
}
|
||||
|
||||
#error {
|
||||
height: 40px;
|
||||
color: #f77;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#error:not(.hasError) {
|
||||
color: rgb(71, 179, 71);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<input
|
||||
id="code"
|
||||
placeholder="shape code"
|
||||
onkeypress="debounce(generate)"
|
||||
onkeydown="debounce(generate)"
|
||||
onkeyup="debounce(generate)"
|
||||
onchange="debounce(generate)"
|
||||
/>
|
||||
<div id="error">Error</div>
|
||||
<br />
|
||||
<canvas id="result" width="512" height="512"></canvas>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user