-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
58 lines (52 loc) · 2.38 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
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>Mancala</title>
<meta name="description" content="A game for two.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/output.css">
</head>
<body>
<div class="w-screen h-screen flex flex-col justify-center text-gray-800">
<h1 class="text-center text-6xl">Mancala</h1>
<h2 class="text-center text-4xl">A game for two.</h2>
<form id="start-game-form" action="game.html"
class="mx-auto my-20 p-8 w-1/2 border border-gray-500 flex flex-col items-center">
<p class="text-center mb-6">Please enter the player names.</p>
<div class="grid grid-cols-2">
<label for="p1" class="flex justify-center items-center">
Player 1 name
</label>
<input type="text" id="p1" name="p1" placeholder="Player 1" class="border border-gray-700 p-2"/>
<label for="p2" class="flex justify-center items-center">
Player 2 name
</label>
<input type="text" id="p2" name="p2" placeholder="Player 2" class="border border-gray-700 p-2"/>
</div>
<div class="mt-12">
<input type="submit" class="p-4 font-bold rounded border" value="Start game"/>
</div>
</form>
<footer class="absolute bottom-0 px-1 w-full flex justify-between bg-black bg-opacity-75 text-white">
<div>Mancala by Alex Pernot</div>
<div>
<a href="https://github.com/AlexPernot/mancala" target="_blank">Github</a> | Gems by <a
href="https://taarna23.itch.io/110-gem-icons" target="_blank">taarna23</a> | Background by <a
href="https://unsplash.com/photos/T-LfvX-7IVg" target="_blank">Damian Patkowski</a> | Board by <a
href="https://www.deviantart.com/koncaliev/art/seamless-wood-texture-271923129">koncaliev</a> | <a
href="https://www.dafont.com/fr/quicksand.font">Quicksand font</a>
</div>
</footer>
</div>
<script>
const onSubmit = e => {
if (window.localStorage) {
window.localStorage.setItem("p1", e.target.elements.p1.value)
window.localStorage.setItem("p2", e.target.elements.p2.value)
}
}
document.getElementById("start-game-form").addEventListener("submit", onSubmit);
</script>
</body>
</html>