-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
54 lines (52 loc) · 1.69 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
<!doctype html>
<html>
<head>
<title>Conway's Game of Life</title>
<script src="jquery-2.1.3.js"></script>
<script src="gol.js"></script>
<style type="text/css">
body { margin: 0; padding: 0; background-color: #333;
font-family: "Source Code Pro", "Monaco", "Lucida Pro", monospace;
font-size: 16px; }
header { color: white; background-color: #333; border-bottom: 1px solid #444;
padding: 8px; text-align: center; }
div#keyboard-shortcuts-help {
text-align: center;
z-index: 1;
color: #bbb;
background-color: #444;
position: absolute;
margin: auto;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 260px;
height: 165px;
padding: 8px;
border: 1px solid #888;
display: none;
}
</style>
</head>
<body>
<header>
<div id="controls">
Game of Life
<button id="startstop">Start</button>
<button id="clear">Clear</button>
<button id="random">Random</button>
<input type="checkbox" id="fade-with-age" name="fade-with-age" checked />
<label for="fade-with-age">Fade with age</label>
</div>
</header>
<!-- Canvas docs: https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_usage -->
<canvas id="world">Try this in a modern browser that supports canvas!</canvas>
<div id="keyboard-shortcuts-help">
<p><strong>s</strong>: Start/stop simulation</p>
<p><strong>c</strong>: Clear</p>
<p><strong>r</strong>: Randomize</p>
<p><strong>?</strong>: Show/hide this help</p>
</div>
</body>
</html>