Spaces:
Sleeping
Sleeping
Create templates/index.html
Browse files- templates/index.html +27 -0
templates/index.html
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<title>TribeForge</title>
|
6 |
+
<style>
|
7 |
+
canvas { border: 1px solid black; }
|
8 |
+
#ui { font-family: Arial, sans-serif; position: absolute; top: 10px; }
|
9 |
+
button { padding: 5px 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
|
10 |
+
button:hover { background: #45a049; }
|
11 |
+
</style>
|
12 |
+
</head>
|
13 |
+
<body>
|
14 |
+
<div id="ui">
|
15 |
+
<span id="resources">Food: 0</span> | <span id="population">Tribe: 1/5</span>
|
16 |
+
<button onclick="gatherFood()">Gather Food</button>
|
17 |
+
<button onclick="buildHut()">Build Hut</button>
|
18 |
+
</div>
|
19 |
+
<canvas id="gameCanvas" width="800" height="600"></canvas>
|
20 |
+
<script src="{{ url_for('static', filename='game.js') }}"></script>
|
21 |
+
<script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
|
22 |
+
<script>
|
23 |
+
const game = new TribalStage(document.getElementById("gameCanvas"));
|
24 |
+
game.init();
|
25 |
+
</script>
|
26 |
+
</body>
|
27 |
+
</html>
|