spore_grok / templates /index.html
broadfield-dev's picture
Create templates/index.html
784552c verified
raw
history blame
1.02 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>TribeForge</title>
<style>
canvas { border: 1px solid black; }
#ui { font-family: Arial, sans-serif; position: absolute; top: 10px; }
button { padding: 5px 10px; background: #4CAF50; color: white; border: none; border-radius: 5px; cursor: pointer; }
button:hover { background: #45a049; }
</style>
</head>
<body>
<div id="ui">
<span id="resources">Food: 0</span> | <span id="population">Tribe: 1/5</span>
<button onclick="gatherFood()">Gather Food</button>
<button onclick="buildHut()">Build Hut</button>
</div>
<canvas id="gameCanvas" width="800" height="600"></canvas>
<script src="{{ url_for('static', filename='game.js') }}"></script>
<script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
<script>
const game = new TribalStage(document.getElementById("gameCanvas"));
game.init();
</script>
</body>
</html>