-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
156 lines (138 loc) · 3.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
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html>
<head>
<title>Q-Ships</title>
<style >
@font-face {
font-family: 'MyWebFont';
src: local('fonts/ARCADECLASSIC.ttf'),
url('fonts/ARCADECLASSIC.ttf') format('ttf');/* Modern
Browsers */
}
body, html {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
}
#container {
display: flex;
justify-content: center;
}
#starfield {
width:100%;
height:100%;
z-index: -1;
position: absolute;
left: 0px;
top: 0px;
}
#background-container,
#game-container {
z-index: 10;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
#gameCanvas {
display: inherit;
margin-left: auto;
margin-right: auto;
}
#welcome {
z-index: 15;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
#score {
font-size: 20px;
font-family: 'MyWebFont', ArcadeClassic, Arial;
color: #48D1CC;
position:absolute;
top: 0;
right: 0;
padding-right: 20px;
z-index: 15;
}
#player-name-div {
margin-top: 15px;
display: flex;
align-items: center;
}
#player-name {
margin-left: 50px;
width: 50%;
color: black;
letter-spacing: 1px;
text-indent: 5%;
height: 34px;
border-radius: 5px 0 0 5px;
font-family: Arial;
font-size: 18px;
border: 5px solid #312832;
border-right: 0px solid #312832;
}
#player-input-button{
width: 25%;
height: 45.5px;
background: #27abb5;
font-weight: bold;
letter-spacing: 1px;
cursor: pointer;
border-radius: 0 5px 5px 0;
font-family: Arial;
font-size: 18px;
border: 5px solid #312832;
}
#nuke-div {
z-index: 15;
position: absolute;
top: 10%;
right: 50%;
transform: translateY(-50%);
font-size: 20px;
font-family: 'MyWebFont', ArcadeClassic, Arial;
color: tomato;
}
.hidden {
display: none;
}
img {
display: block;
margin-top: 5px;
margin-left: auto;
margin-right: auto;
}
</style>
</head>
<body>
<div id='container'>
<div id="welcome">
<img src="http://i.imgur.com/hzKX3yM.png" alt="pew pew pew" width="500">
<!-- <img src="http://i.imgur.com/aAUcqMV.png" alt="pew pew pew" width="250"> -->
<div id="player-name-div">
<input type="text" id="player-name" placeholder="Enter your name?">
<input type="submit" id="player-input-button"value="Play" onclick="updateName();">
</div>
v
</div><center>
<div id="nuke-div" class="hidden">
<h1>You have the nuke! Press 'N' to deploy</h1>
</div>
<div id="score">
</div>
<div id="background-container">
<canvas id="starField"></canvas>
</div>
<div id="game-container" >
<canvas id="gameCanvas"></canvas>
</div>
<script src="/js/client/starBackground.js"></script>
<script src="/js/client/render.js"></script>
<script src="/js/client/controller.js"></script>
</body>
</html>