-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
127 lines (127 loc) · 3.07 KB
/
index.html
File metadata and controls
127 lines (127 loc) · 3.07 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
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
120
121
122
123
124
125
126
127
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" type="image/png" href="favicon.png" />
<title>Npigs</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/4.3.6/papaparse.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/chance/1.0.12/chance.min.js"></script>
<script src="phaser.min.js"></script>
<style>
@keyframes flash {
from {background: #fca311;}
to {background: black;}
}
@font-face {
font-family: pixel;
src: url("assets/pixeled.ttf") format("truetype");
}
body {
margin: 0;
overflow: hidden;
background: #14213d;
font-size: 20px;
}
#loading {
position: absolute;
background: #14213d;
color: #fca311;
text-align: center;
font-family: pixel;
width: 100vw;
height: 100vh;
z-index: 5;
font-size: 60px;
}
canvas {
position: absolute;
top: 0;
left: 0;
}
#score {
position: absolute;
font-family: pixel;
top: 0;
left: 2em;
color: #fca311;
z-index: 2;
}
#menu, #lose {
position: absolute;
top: 0;
left: 0;
z-index: 10;
width: 100vw;
height: 100vh;
background: #14213de6;
color: #fca311;
font-family: pixel;
text-align: center;
overflow-y: scroll;
}
#lose {
z-index: 20;
background-color: black;
}
.button {
cursor: pointer;
}
.button:hover {
background: black;
}
#menu input {
font-family: pixel;
border: solid 4px #fca311;
background: none;
width: 256px;
height: 40px;
color: #fca311;
font-size: 20px;
padding: 4px;
}
#scores {
padding: 8px;
margin: auto;
height: 50%;
}
table {
border: solid 4px #fca311;
font-size: 20px;
width: 100%;
}
table td {
outline: solid 4px #fca311;
}
</style>
</head>
<body>
<div id="loading">
<span id="progress" style="color: black; font-size: 25px;"></span>
</div>
<div id="lose" style="display: none;">
<p>ALL YOUR PIGS FELL TO THEIR DOOM</p>
<a href="."><img class="button" src="assets/redo.png"></a>
<p id="finalscore"></p>
<p>...WHICH WAS SUBMITTED TO THE SCOREBOARD,<br>FOR BETTER OR WORSE</p>
<p>BE MORE CAREFUL NEXT TIME, OK?</p>
</div>
<div id="menu" style="display: none;">
<img src="assets/logo_big.png" alt="">
<br>
<img class="button" src="assets/play.png" alt="" onclick="togglePause();">
<img class="button" src="assets/scores.png" alt="" onclick="getScores(updateScores);">
<a target="_blank" href="https://ldjam.com/events/ludum-dare/40/npigs"><img class="button" src="assets/about.png" alt=""></a>
<br>
<input id="namebox" placeholder="NAME" minlength="2" maxlength="7">
<span id="best"></span>
<div id="scores">
<table>
</table>
</div>
</div>
<script src="game.js"></script>
</body>
</html>