Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +12 -13
templates/index.html
CHANGED
@@ -5,12 +5,11 @@
|
|
5 |
<title>TribeForge</title>
|
6 |
<style>
|
7 |
body {
|
8 |
-
background: #87CEEB; /* Light sky blue,
|
9 |
margin: 0;
|
10 |
overflow: hidden;
|
11 |
-
font-family: 'Eurostile', Arial, sans-serif;
|
12 |
}
|
13 |
-
canvas { border: 2px solid #4682B4; border-radius: 10px; margin: 10px; }
|
14 |
#ui {
|
15 |
position: absolute;
|
16 |
top: 10px;
|
@@ -21,26 +20,26 @@
|
|
21 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
22 |
}
|
23 |
#ui span {
|
24 |
-
color: #2F4F4F;
|
25 |
font-size: 16px;
|
26 |
margin-right: 20px;
|
27 |
}
|
28 |
button {
|
29 |
padding: 8px 16px;
|
30 |
-
background: #4CAF50;
|
31 |
color: white;
|
32 |
border: none;
|
33 |
-
border-radius: 20px;
|
34 |
cursor: pointer;
|
35 |
margin-right: 10px;
|
36 |
font-size: 14px;
|
37 |
transition: background 0.3s;
|
38 |
}
|
39 |
button:hover {
|
40 |
-
background: #45a049;
|
41 |
}
|
42 |
button:disabled {
|
43 |
-
background: #A9A9A9;
|
44 |
cursor: not-allowed;
|
45 |
}
|
46 |
#editor {
|
@@ -63,8 +62,8 @@
|
|
63 |
margin: 5px 0;
|
64 |
color: #2F4F4F;
|
65 |
}
|
66 |
-
#editor input[type="color"] { vertical-align: middle; }
|
67 |
-
#editor input[type="range"] { width: 100px;
|
68 |
</style>
|
69 |
</head>
|
70 |
<body>
|
@@ -79,15 +78,15 @@
|
|
79 |
<div id="editor">
|
80 |
<h3>Creature Editor</h3>
|
81 |
<label>Color: <input type="color" id="creatureColor" value="#ff0000"></label><br>
|
82 |
-
<label>Size: <input type="range" id="creatureSize" min="
|
83 |
<button onclick="applyChanges()">Apply</button>
|
84 |
</div>
|
85 |
-
<
|
86 |
<script src="{{ url_for('static', filename='game.js') }}"></script>
|
87 |
<script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
|
88 |
<script src="{{ url_for('static', filename='creatureEditor.js') }}"></script>
|
89 |
<script>
|
90 |
-
const game = new TribalStage(
|
91 |
game.init();
|
92 |
</script>
|
93 |
</body>
|
|
|
5 |
<title>TribeForge</title>
|
6 |
<style>
|
7 |
body {
|
8 |
+
background: #87CEEB; /* Light sky blue, inspired by Spore */
|
9 |
margin: 0;
|
10 |
overflow: hidden;
|
11 |
+
font-family: 'Eurostile', Arial, sans-serif;
|
12 |
}
|
|
|
13 |
#ui {
|
14 |
position: absolute;
|
15 |
top: 10px;
|
|
|
20 |
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
|
21 |
}
|
22 |
#ui span {
|
23 |
+
color: #2F4F4F;
|
24 |
font-size: 16px;
|
25 |
margin-right: 20px;
|
26 |
}
|
27 |
button {
|
28 |
padding: 8px 16px;
|
29 |
+
background: #4CAF50;
|
30 |
color: white;
|
31 |
border: none;
|
32 |
+
border-radius: 20px;
|
33 |
cursor: pointer;
|
34 |
margin-right: 10px;
|
35 |
font-size: 14px;
|
36 |
transition: background 0.3s;
|
37 |
}
|
38 |
button:hover {
|
39 |
+
background: #45a049;
|
40 |
}
|
41 |
button:disabled {
|
42 |
+
background: #A9A9A9;
|
43 |
cursor: not-allowed;
|
44 |
}
|
45 |
#editor {
|
|
|
62 |
margin: 5px 0;
|
63 |
color: #2F4F4F;
|
64 |
}
|
65 |
+
#editor input[type="color"], #editor input[type="range"] { vertical-align: middle; }
|
66 |
+
#editor input[type="range"] { width: 100px; }
|
67 |
</style>
|
68 |
</head>
|
69 |
<body>
|
|
|
78 |
<div id="editor">
|
79 |
<h3>Creature Editor</h3>
|
80 |
<label>Color: <input type="color" id="creatureColor" value="#ff0000"></label><br>
|
81 |
+
<label>Size: <input type="range" id="creatureSize" min="0.5" max="2" step="0.1" value="1"></label><br>
|
82 |
<button onclick="applyChanges()">Apply</button>
|
83 |
</div>
|
84 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r134/three.min.js"></script>
|
85 |
<script src="{{ url_for('static', filename='game.js') }}"></script>
|
86 |
<script src="{{ url_for('static', filename='tribalStage.js') }}"></script>
|
87 |
<script src="{{ url_for('static', filename='creatureEditor.js') }}"></script>
|
88 |
<script>
|
89 |
+
const game = new TribalStage();
|
90 |
game.init();
|
91 |
</script>
|
92 |
</body>
|