This repository was archived by the owner on Apr 19, 2026. It is now read-only.
forked from rocketacademy/basics-drawing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
76 lines (61 loc) · 1.5 KB
/
index.html
File metadata and controls
76 lines (61 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<!DOCTYPE html>
<html>
<head>
<title>SWE101 Draw! 🖍</title>
<meta charset="UTF-8">
<style>
* {
box-sizing: border-box;
}
#header {
text-align: center;
}
#container {
margin: 20px auto;
padding: 20px;
background-color: pink;
max-width: 300px;
}
input {
width: 70%;
margin-right: 4px;
}
button {
font-size: 7px;
width: 20%;
}
#output {
margin: 20px auto;
padding: 20px;
background-color: grey;
width: 100%;
}
</style>
</head>
<body>
<h1 id="header">SWE 101! 🚀</h1>
<div id="container">
<p id="mode-change-instructions">For mode changes, enter: "line", "square", "triangle", "reverse-triangle",
"outline-square", or
"center-square".</p>
<input id="my-input" />
<button id="my-button">submit</button>
<p>output:</p>
<div id="output">Welcome to 'Drawing with Emojis'! Current mode: default.
Please choose a mode by entering: "line", "square", "triangle", "reverse-triangle", "outline-square", or
"center-square". Enjoy!
</div>
</div>
<script src="script.js"></script>
<script>
var button = document.querySelector('#my-button');
button.addEventListener('click', function () {
var input = document.querySelector('#my-input');
var result = main(input.value);
var output = document.querySelector('#output');
output.innerHTML = result;
input.value = "";
});
</script>
</body>
</html>