-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (138 loc) · 5.43 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!--
Quiver, a rogue-like web video game!
Made by Clarisse Eynard, Léan Houdayer and Mattéo Legagneux.
Copyright (C) 2021-2024. All rights reserved.
-->
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Clarisse Eynard, Léan Houdayer, Mattéo Legagneux">
<meta name="description" content="A rogue-like web video game!">
<meta name="version" content="1.1.5">
<meta property="og:type" content="website">
<meta property="og:url" content="https://debaze.github.io/Quiver">
<meta property="og:site_name" content="GitHub">
<meta property="og:title" content="Quiver">
<meta property="og:description" content="A rogue-like web video game!">
<meta property="og:image" content="https://debaze.github.io/Quiver/assets/textures/menu/background.jpg">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="assets/ui/dialog.css">
<link rel="stylesheet" type="text/css" href="assets/ui/footer.css">
<link rel="stylesheet" type="text/css" href="assets/ui/hud.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-credits.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-death.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-fight.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-keybind.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-load.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-main.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-options.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-pause.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-play.css">
<link rel="stylesheet" type="text/css" href="assets/ui/menu-save.css">
<link rel="stylesheet" type="text/css" href="assets/ui/noscript.css">
<link rel="stylesheet" type="text/css" href="assets/ui/overlay.css">
<link rel="stylesheet" type="text/css" href="assets/ui/subtitle.css">
<link rel="stylesheet" type="text/css" href="assets/textures/btn.css">
<link rel="stylesheet" type="text/css" href="assets/textures/icon.css">
<link rel="stylesheet" type="text/css" href="assets/textures/map.css">
<link rel="stylesheet" type="text/css" href="assets/textures/texture_list.css">
<link rel="stylesheet" type="text/css" href="assets/ui/main.css">
<title lang="en" translate="no">Quiver</title>
</head>
<body>
<noscript>
<p>
Quiver needs JavaScript to work.<br>
Enable JavaScript in your browser, then try again.<br><br>
<a href="">
Reload
</a>
</p>
<div class="version">
1.1.5
</div>
</noscript>
<main>
<div id="console">
<div class="console-title">
Console
</div>
<div class="x"></div>
<div class="y"></div>
</div>
<include src="assets/ui/menu-main.html"></include>
<div class="overlay overlay-menu">
<include src="assets/ui/menu-play.html"></include>
<include src="assets/ui/menu-options.html"></include>
<include src="assets/ui/menu-save.html"></include>
</div>
<include src="assets/ui/menu-keybind.html"></include>
<div class="overlay overlay-load"></div>
<include src="assets/ui/menu-load.html"></include>
<div class="overlay overlay-pause">
<include src="assets/ui/menu-pause.html"></include>
</div>
<div class="overlay overlay-death">
<include src="assets/ui/menu-death.html"></include>
</div>
<div class="map-container">
<div class="overlay overlay-map"></div>
<div id="player"></div>
<div id="map"></div>
<div id="uppermap"></div>
<div id="entities"></div>
<div class="hud">
<div class="nickname"></div>
<div class="health_info"></div>
<progress class="health_value"></progress>
<div class="mana_info"></div>
<progress class="mana_value"></progress>
</div>
<div class="level-subtitle"></div>
<div class="dialog">
<div class="dialog-content"></div>
<button class="dialog-option dialog-option-1"></button>
<button class="dialog-option dialog-option-2"></button>
</div>
<include src="assets/ui/menu-fight.html"></include>
</div>
<include src="assets/ui/menu-credits.html"></include>
<include src="assets/ui/footer.html"></include>
</main>
<script>
{
// Include every HTML file
const promises = [];
const includes = document.getElementsByTagName("include");
const domParser = new DOMParser();
const currentScript = document.currentScript;
function handlePromiseResponse(response, include) {
response.text()
.then(text => domParser.parseFromString(text, "text/html"))
.then(html => {
include.replaceWith(...html.body.children);
});
}
for (let i = 0; i < includes.length; i++) {
const include = includes[i];
const promise = fetch(include.getAttribute("src"))
.then(response => handlePromiseResponse(response, include));
promises.push(promise);
}
Promise.all(promises).then(() => {
// Load main script
fetch("assets/js/main.js")
.then(response => response.text())
.then(js => {
const script = document.createElement("script");
script.textContent = js;
currentScript.after(script);
});
});
}
</script>
</body>
</html>