-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
77 lines (77 loc) · 1.39 KB
/
index.html
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
77
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cheerp example 2: DOM manipulation</title>
<script src="dom.js"></script>
<style>
* {
font-family: sans-serif;
}
body {
background-color: #eee;
color: #222;
}
.conway-grid {
display: grid;
width: fit-content;
border: 1px solid #222;
margin: auto;
}
.conway-grid button {
aspect-ratio: 1;
border-radius: 0;
border: 0.5px solid #dadada;
}
.dead {
background-color: #ddd;
}
.dead:hover {
border: 0.5px solid #222;
}
.alive {
background-color: #222;
}
.resize-control {
margin-bottom: 20px;
margin-left: 30px;
display: grid;
grid-template-columns: 1fr 1fr;
width: 50%;
}
.resize-control label {
font-size: small;
}
.resize-control input {
width: 300px;
height: 30px;
font-size: large;
}
</style>
</head>
<body>
<header>
<div class="resize-control">
<label for="rows">Number of rows</label>
<label for="cols">Number of columns</label>
<input
type="number"
id="rows"
placeholder="rows"
min="10"
max="100"
/>
<input
type="number"
id="cols"
placeholder="columns"
min="10"
max="100"
/>
</div>
<button id="tick">One tick</button>
<button id="control">start</button>
</header>
<article></article>
</body>
</html>