-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
119 lines (105 loc) · 4.52 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Game of Life</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="/src/style.css" />
</head>
<body>
<div id="app">
<div id="game-speed-control-wrapper">
<label for="game-speed-slider" class="sub-heading">Speed</label>
<input type="range" min="1" max="60" step="5" id="game-speed-slider" />
</div>
<div class="audio-wrapper">
<div class="audio-credits">
Music by
<a
href="https://pixabay.com/users/music_unlimited-27600023/?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=124008"
>
Music_Unlimited
</a>
from
<a
href="https://pixabay.com/music//?utm_source=link-attribution&utm_medium=referral&utm_campaign=music&utm_content=124008"
>
Pixabay
</a>
</div>
<audio id="bg-audio" src="/GameOfLife/stranger-things.mp3" loop></audio>
<button id="bg-music-btn">
<svg
stroke="currentColor"
fill="currentColor"
stroke-width="0"
viewBox="0 0 24 24"
ariaHidden="true"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
class="bg-audio-indicator playing"
>
<path
d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM18.584 5.106a.75.75 0 011.06 0c3.808 3.807 3.808 9.98 0 13.788a.75.75 0 11-1.06-1.06 8.25 8.25 0 000-11.668.75.75 0 010-1.06z"
></path>
<path
d="M15.932 7.757a.75.75 0 011.061 0 6 6 0 010 8.486.75.75 0 01-1.06-1.061 4.5 4.5 0 000-6.364.75.75 0 010-1.06z"
></path>
</svg>
<svg
stroke="currentColor"
fill="currentColor"
stroke-width="0"
viewBox="0 0 24 24"
ariaHidden="true"
height="1em"
width="1em"
xmlns="http://www.w3.org/2000/svg"
class="bg-audio-indicator mutted"
>
<path
d="M13.5 4.06c0-1.336-1.616-2.005-2.56-1.06l-4.5 4.5H4.508c-1.141 0-2.318.664-2.66 1.905A9.76 9.76 0 001.5 12c0 .898.121 1.768.35 2.595.341 1.24 1.518 1.905 2.659 1.905h1.93l4.5 4.5c.945.945 2.561.276 2.561-1.06V4.06zM17.78 9.22a.75.75 0 10-1.06 1.06L18.44 12l-1.72 1.72a.75.75 0 001.06 1.06l1.72-1.72 1.72 1.72a.75.75 0 101.06-1.06L20.56 12l1.72-1.72a.75.75 0 00-1.06-1.06l-1.72 1.72-1.72-1.72z"
></path>
</svg>
</button>
</div>
<div class="modal" id="config-modal">
<p class="title">Configs</p>
<div class="input-wrapper">
<label for="grid-size-slider" class="sub-heading">Cell Size</label>
<input type="range" min="1" max="50" step="1" id="grid-size-slider" />
</div>
<div class="input-wrapper" id="show-grid-input-wrapper">
<label for="show-grid" class="sub-heading cp">Show Grid</label>
<input type="checkbox" checked="true" name="showGrid" id="show-grid" class="cp" />
</div>
<div class="input-wrapper">
<label for="seed-select" class="sub-heading">Seed</label>
<select id="seed-select">
<option value="random" selected>Random</option>
<option value="pulsar">Pulsar</option>
<option value="blinker">Blinker</option>
<option value="spaceship">Spaceship</option>
<option value="beacon">Beacon</option>
<option value="custom">Custom</option>
</select>
</div>
<div class="input-wrapper">
<button id="start-btn">START</button>
</div>
</div>
<button class="bottom-btn" id="reset-btn">RESSET</button>
<button class="bottom-btn" id="custom-start-btn">START</button>
<canvas id="canvas"></canvas>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>