84 lines
2.3 KiB
HTML
84 lines
2.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Draw something for meow-d</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
|
|
<style>
|
|
#draw-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 1em;
|
|
width: fit-content;
|
|
}
|
|
|
|
#draw-canvas {
|
|
display: block;
|
|
border: 1px solid black;
|
|
max-width: 100%;
|
|
max-height: 400px;
|
|
aspect-ratio: 1;
|
|
}
|
|
|
|
.buttons {
|
|
width: 100%;
|
|
display: flex;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.buttons button {
|
|
padding: 0.25em 0.5em;
|
|
font-size: 1em;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.draw-display {
|
|
display: grid;
|
|
gap: 1em;
|
|
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
grid-template-rows: repeat(auto-fit, minmax(150px, 1fr));
|
|
}
|
|
|
|
.draw-display>* {
|
|
border: 1px solid rgba(1, 1, 1, 0.2);
|
|
aspect-ratio: 1/1;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>draw something for me!!</h1>
|
|
<section id="draw-section">
|
|
<canvas id="draw-canvas" width="400" height="400"></canvas>
|
|
|
|
<div class="buttons">
|
|
<button id="clear-button" onclick="clearCanvas()">Clear</button>
|
|
<span class="spacer"></span>
|
|
<button id="save-button" onclick="saveImage()">Download</button>
|
|
<button id="submit-button" onclick="submitImage()">Submit!!</button>
|
|
</div>
|
|
|
|
<script src="draw.js"></script>
|
|
<form id="image-form" action="/draw" method="POST" enctype="multipart/form-data">
|
|
<input type="file" name="image" id="imageInput" style="display:none">
|
|
<button type="submit" style="display:none">:3 jumpscare!!!!!!!!!!!!!!! rarrrrrrrggggg (submit button)</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section>
|
|
<h2>submssions</h2>
|
|
<div class="draw-display">
|
|
{% for image in images %}
|
|
<img src="/draws/{{image[0]}}.png" alt="">
|
|
{% endfor %}
|
|
</div>
|
|
</section>
|
|
</body>
|
|
|
|
</html>
|