Add 2 files
Browse files- README.md +7 -5
- index.html +653 -19
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: first-test-of-wikitechtree
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: blue
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,653 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Technology Tree Evolution</title>
|
7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
|
8 |
+
<style>
|
9 |
+
* {
|
10 |
+
margin: 0;
|
11 |
+
padding: 0;
|
12 |
+
box-sizing: border-box;
|
13 |
+
}
|
14 |
+
|
15 |
+
body {
|
16 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
17 |
+
background-color: #f0f2f5;
|
18 |
+
color: #333;
|
19 |
+
overflow-x: hidden;
|
20 |
+
}
|
21 |
+
|
22 |
+
header {
|
23 |
+
background: linear-gradient(135deg, #2c3e50, #4ca1af);
|
24 |
+
color: white;
|
25 |
+
padding: 2rem 0;
|
26 |
+
text-align: center;
|
27 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
28 |
+
}
|
29 |
+
|
30 |
+
h1 {
|
31 |
+
font-size: 2.5rem;
|
32 |
+
margin-bottom: 0.5rem;
|
33 |
+
}
|
34 |
+
|
35 |
+
.subtitle {
|
36 |
+
font-size: 1.2rem;
|
37 |
+
opacity: 0.9;
|
38 |
+
}
|
39 |
+
|
40 |
+
.container {
|
41 |
+
max-width: 1200px;
|
42 |
+
margin: 2rem auto;
|
43 |
+
padding: 0 1rem;
|
44 |
+
}
|
45 |
+
|
46 |
+
.era-navigation {
|
47 |
+
display: flex;
|
48 |
+
justify-content: center;
|
49 |
+
margin-bottom: 2rem;
|
50 |
+
flex-wrap: wrap;
|
51 |
+
gap: 0.5rem;
|
52 |
+
}
|
53 |
+
|
54 |
+
.era-button {
|
55 |
+
padding: 0.8rem 1.5rem;
|
56 |
+
border: none;
|
57 |
+
border-radius: 30px;
|
58 |
+
font-weight: bold;
|
59 |
+
cursor: pointer;
|
60 |
+
transition: all 0.3s ease;
|
61 |
+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
|
62 |
+
font-size: 0.9rem;
|
63 |
+
text-transform: uppercase;
|
64 |
+
letter-spacing: 1px;
|
65 |
+
}
|
66 |
+
|
67 |
+
.era-button:hover {
|
68 |
+
transform: translateY(-2px);
|
69 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
70 |
+
}
|
71 |
+
|
72 |
+
.era-ancient {
|
73 |
+
background-color: #e9c46a;
|
74 |
+
color: #333;
|
75 |
+
}
|
76 |
+
|
77 |
+
.era-classical {
|
78 |
+
background-color: #f4a261;
|
79 |
+
color: white;
|
80 |
+
}
|
81 |
+
|
82 |
+
.era-medieval {
|
83 |
+
background-color: #e76f51;
|
84 |
+
color: white;
|
85 |
+
}
|
86 |
+
|
87 |
+
.era-industrial {
|
88 |
+
background-color: #2a9d8f;
|
89 |
+
color: white;
|
90 |
+
}
|
91 |
+
|
92 |
+
.era-modern {
|
93 |
+
background-color: #1d3557;
|
94 |
+
color: white;
|
95 |
+
}
|
96 |
+
|
97 |
+
.era-future {
|
98 |
+
background-color: #9d4edd;
|
99 |
+
color: white;
|
100 |
+
}
|
101 |
+
|
102 |
+
.tech-tree-container {
|
103 |
+
width: 100%;
|
104 |
+
overflow: auto;
|
105 |
+
background: white;
|
106 |
+
border-radius: 12px;
|
107 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
108 |
+
padding: 2rem;
|
109 |
+
position: relative;
|
110 |
+
min-height: 800px;
|
111 |
+
margin-bottom: 3rem;
|
112 |
+
}
|
113 |
+
|
114 |
+
.tech-tree {
|
115 |
+
position: relative;
|
116 |
+
width: 1200px;
|
117 |
+
height: 700px;
|
118 |
+
margin: 0 auto;
|
119 |
+
}
|
120 |
+
|
121 |
+
.tech-node {
|
122 |
+
position: absolute;
|
123 |
+
width: 100px;
|
124 |
+
height: 100px;
|
125 |
+
border-radius: 50%;
|
126 |
+
display: flex;
|
127 |
+
flex-direction: column;
|
128 |
+
align-items: center;
|
129 |
+
justify-content: center;
|
130 |
+
text-align: center;
|
131 |
+
cursor: pointer;
|
132 |
+
transition: all 0.3s ease;
|
133 |
+
z-index: 10;
|
134 |
+
transform: scale(0.95);
|
135 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
136 |
+
}
|
137 |
+
|
138 |
+
.tech-node:hover {
|
139 |
+
transform: scale(1.05);
|
140 |
+
z-index: 20;
|
141 |
+
}
|
142 |
+
|
143 |
+
.tech-icon {
|
144 |
+
font-size: 1.8rem;
|
145 |
+
margin-bottom: 0.3rem;
|
146 |
+
}
|
147 |
+
|
148 |
+
.tech-name {
|
149 |
+
font-weight: bold;
|
150 |
+
font-size: 0.7rem;
|
151 |
+
}
|
152 |
+
|
153 |
+
.tech-era {
|
154 |
+
font-size: 0.6rem;
|
155 |
+
opacity: 0.8;
|
156 |
+
margin-top: 2px;
|
157 |
+
}
|
158 |
+
|
159 |
+
/* Node colors based on era */
|
160 |
+
.ancient {
|
161 |
+
background-color: #e9c46a;
|
162 |
+
color: #333;
|
163 |
+
}
|
164 |
+
|
165 |
+
.classical {
|
166 |
+
background-color: #f4a261;
|
167 |
+
color: white;
|
168 |
+
}
|
169 |
+
|
170 |
+
.medieval {
|
171 |
+
background-color: #e76f51;
|
172 |
+
color: white;
|
173 |
+
}
|
174 |
+
|
175 |
+
.industrial {
|
176 |
+
background-color: #2a9d8f;
|
177 |
+
color: white;
|
178 |
+
}
|
179 |
+
|
180 |
+
.modern {
|
181 |
+
background-color: #1d3557;
|
182 |
+
color: white;
|
183 |
+
}
|
184 |
+
|
185 |
+
.future {
|
186 |
+
background-color: #9d4edd;
|
187 |
+
color: white;
|
188 |
+
}
|
189 |
+
|
190 |
+
/* Connection lines */
|
191 |
+
.connection {
|
192 |
+
position: absolute;
|
193 |
+
background-color: #aaa;
|
194 |
+
height: 2px;
|
195 |
+
z-index: 1;
|
196 |
+
transform-origin: 0 0;
|
197 |
+
}
|
198 |
+
|
199 |
+
/* Vertical era lines */
|
200 |
+
.era-line {
|
201 |
+
position: absolute;
|
202 |
+
width: 2px;
|
203 |
+
height: 100%;
|
204 |
+
background-color: rgba(0, 0, 0, 0.1);
|
205 |
+
left: 50%;
|
206 |
+
z-index: 0;
|
207 |
+
}
|
208 |
+
|
209 |
+
.era-labels {
|
210 |
+
position: absolute;
|
211 |
+
top: 0;
|
212 |
+
left: 0;
|
213 |
+
width: 100%;
|
214 |
+
height: 40px;
|
215 |
+
display: flex;
|
216 |
+
justify-content: space-around;
|
217 |
+
z-index: 5;
|
218 |
+
font-weight: bold;
|
219 |
+
color: #555;
|
220 |
+
text-transform: uppercase;
|
221 |
+
font-size: 0.9rem;
|
222 |
+
letter-spacing: 1px;
|
223 |
+
}
|
224 |
+
|
225 |
+
.node-popup {
|
226 |
+
position: fixed;
|
227 |
+
top: 50%;
|
228 |
+
left: 50%;
|
229 |
+
transform: translate(-50%, -50%);
|
230 |
+
background: white;
|
231 |
+
padding: 2rem;
|
232 |
+
border-radius: 12px;
|
233 |
+
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
|
234 |
+
z-index: 100;
|
235 |
+
max-width: 400px;
|
236 |
+
display: none;
|
237 |
+
}
|
238 |
+
|
239 |
+
.node-popup h3 {
|
240 |
+
margin-bottom: 0.5rem;
|
241 |
+
color: #444;
|
242 |
+
}
|
243 |
+
|
244 |
+
.node-popup .era {
|
245 |
+
font-size: 0.9rem;
|
246 |
+
margin-bottom: 1rem;
|
247 |
+
font-weight: bold;
|
248 |
+
}
|
249 |
+
|
250 |
+
.node-popup .description {
|
251 |
+
margin-bottom: 1.5rem;
|
252 |
+
line-height: 1.6;
|
253 |
+
}
|
254 |
+
|
255 |
+
.node-popup .prerequisites {
|
256 |
+
font-size: 0.9rem;
|
257 |
+
color: #666;
|
258 |
+
}
|
259 |
+
|
260 |
+
.close-popup {
|
261 |
+
position: absolute;
|
262 |
+
top: 10px;
|
263 |
+
right: 15px;
|
264 |
+
font-size: 1.5rem;
|
265 |
+
cursor: pointer;
|
266 |
+
color: #888;
|
267 |
+
}
|
268 |
+
|
269 |
+
footer {
|
270 |
+
text-align: center;
|
271 |
+
padding: 2rem 0;
|
272 |
+
background-color: #2c3e50;
|
273 |
+
color: white;
|
274 |
+
}
|
275 |
+
|
276 |
+
.timeline-bar {
|
277 |
+
position: absolute;
|
278 |
+
bottom: 0;
|
279 |
+
left: 0;
|
280 |
+
width: 100%;
|
281 |
+
height: 4px;
|
282 |
+
background: linear-gradient(90deg, #e9c46a, #f4a261, #e76f51, #2a9d8f, #1d3557, #9d4edd);
|
283 |
+
border-radius: 0 0 12px 12px;
|
284 |
+
}
|
285 |
+
|
286 |
+
.tech-path {
|
287 |
+
position: absolute;
|
288 |
+
width: 0;
|
289 |
+
height: 2px;
|
290 |
+
background-color: rgba(255, 255, 255, 0.8);
|
291 |
+
z-index: 2;
|
292 |
+
top: 50%;
|
293 |
+
left: 0;
|
294 |
+
transition: width 0.5s ease-in-out;
|
295 |
+
}
|
296 |
+
</style>
|
297 |
+
</head>
|
298 |
+
<body>
|
299 |
+
<header>
|
300 |
+
<h1>Technology Evolution Tree</h1>
|
301 |
+
<div class="subtitle">Visualizing humanity's technological progress</div>
|
302 |
+
<div class="timeline-bar">
|
303 |
+
<div class="tech-path" id="techPath"></div>
|
304 |
+
</div>
|
305 |
+
</header>
|
306 |
+
|
307 |
+
<div class="container">
|
308 |
+
<div class="era-navigation">
|
309 |
+
<button class="era-button era-ancient">Ancient</button>
|
310 |
+
<button class="era-button era-classical">Classical</button>
|
311 |
+
<button class="era-button era-medieval">Medieval</button>
|
312 |
+
<button class="era-button era-industrial">Industrial</button>
|
313 |
+
<button class="era-button era-modern">Modern</button>
|
314 |
+
<button class="era-button era-future">Future</button>
|
315 |
+
</div>
|
316 |
+
|
317 |
+
<div class="tech-tree-container">
|
318 |
+
<div class="era-labels">
|
319 |
+
<div>4000 BCE</div>
|
320 |
+
<div>500 BCE</div>
|
321 |
+
<div>500 CE</div>
|
322 |
+
<div>1700 CE</div>
|
323 |
+
<div>1900 CE</div>
|
324 |
+
<div>Future</div>
|
325 |
+
</div>
|
326 |
+
<div class="tech-tree" id="techTree">
|
327 |
+
<!-- Connections will be added via JavaScript -->
|
328 |
+
</div>
|
329 |
+
</div>
|
330 |
+
</div>
|
331 |
+
|
332 |
+
<div class="node-popup" id="nodePopup">
|
333 |
+
<span class="close-popup">×</span>
|
334 |
+
<h3 id="popupTitle">Technology Name</h3>
|
335 |
+
<div class="era" id="popupEra">Ancient Era</div>
|
336 |
+
<div class="description" id="popupDescription">Description of technology...</div>
|
337 |
+
<div class="prerequisites" id="popupPrereqs">Prerequisites: None</div>
|
338 |
+
</div>
|
339 |
+
|
340 |
+
<footer>
|
341 |
+
<p>Explore the technological advancements that shaped human civilization</p>
|
342 |
+
</footer>
|
343 |
+
|
344 |
+
<script>
|
345 |
+
document.addEventListener('DOMContentLoaded', function() {
|
346 |
+
const techTree = document.getElementById('techTree');
|
347 |
+
const nodePopup = document.getElementById('nodePopup');
|
348 |
+
const closePopup = document.querySelector('.close-popup');
|
349 |
+
const techPath = document.getElementById('techPath');
|
350 |
+
|
351 |
+
// Technology data
|
352 |
+
const techData = [
|
353 |
+
// Ancient Era
|
354 |
+
{
|
355 |
+
id: 1,
|
356 |
+
name: "Fire",
|
357 |
+
era: "ancient",
|
358 |
+
icon: "fas fa-fire",
|
359 |
+
description: "Mastery of fire allowed for cooking, warmth, protection and became the foundation for later metallurgy and energy technologies.",
|
360 |
+
x: 100,
|
361 |
+
y: 100,
|
362 |
+
prerequisites: []
|
363 |
+
},
|
364 |
+
{
|
365 |
+
id: 2,
|
366 |
+
name: "Wheel",
|
367 |
+
era: "ancient",
|
368 |
+
icon: "fas fa-wheel",
|
369 |
+
description: "The invention of the wheel revolutionized transportation and mechanical applications, enabling carts, potter's wheels, and later complex machinery.",
|
370 |
+
x: 300,
|
371 |
+
y: 100,
|
372 |
+
prerequisites: []
|
373 |
+
},
|
374 |
+
{
|
375 |
+
id: 3,
|
376 |
+
name: "Agriculture",
|
377 |
+
era: "ancient",
|
378 |
+
icon: "fas fa-seedling",
|
379 |
+
description: "The domestication of plants led to settled communities, food surplus, and the development of complex societies and specialization.",
|
380 |
+
x: 500,
|
381 |
+
y: 100,
|
382 |
+
prerequisites: [1] // Requires Fire
|
383 |
+
},
|
384 |
+
|
385 |
+
// Classical Era
|
386 |
+
{
|
387 |
+
id: 4,
|
388 |
+
name: "Writing",
|
389 |
+
era: "classical",
|
390 |
+
icon: "fas fa-book",
|
391 |
+
description: "The development of writing systems enabled permanent records, complex communication, and the accumulation of knowledge across generations.",
|
392 |
+
x: 200,
|
393 |
+
y: 220,
|
394 |
+
prerequisites: [3] // Requires Agriculture
|
395 |
+
},
|
396 |
+
{
|
397 |
+
id: 5,
|
398 |
+
name: "Mathematics",
|
399 |
+
era: "classical",
|
400 |
+
icon: "fas fa-square-root-alt",
|
401 |
+
description: "Abstract numerical systems allowed for calculations, engineering, astronomy, and became foundational for all future scientific progress.",
|
402 |
+
x: 400,
|
403 |
+
y: 220,
|
404 |
+
prerequisites: [4] // Requires Writing
|
405 |
+
},
|
406 |
+
{
|
407 |
+
id: 6,
|
408 |
+
name: "Metalworking",
|
409 |
+
era: "classical",
|
410 |
+
icon: "fas fa-hammer",
|
411 |
+
description: "Advanced techniques in smelting and forging enabled better tools, weapons, and the beginning of mechanical engineering principles.",
|
412 |
+
x: 600,
|
413 |
+
y: 220,
|
414 |
+
prerequisites: [1] // Requires Fire
|
415 |
+
},
|
416 |
+
|
417 |
+
// Medieval Era
|
418 |
+
{
|
419 |
+
id: 7,
|
420 |
+
name: "Printing Press",
|
421 |
+
era: "medieval",
|
422 |
+
icon: "fas fa-print",
|
423 |
+
description: "Movable type printing revolutionized knowledge dissemination, making books affordable and enabling mass literacy and education.",
|
424 |
+
x: 300,
|
425 |
+
y: 340,
|
426 |
+
prerequisites: [4] // Requires Writing
|
427 |
+
},
|
428 |
+
{
|
429 |
+
id: 8,
|
430 |
+
name: "Compass",
|
431 |
+
era: "medieval",
|
432 |
+
icon: "fas fa-compass",
|
433 |
+
description: "Magnetic navigation enabled accurate long-distance sea travel, global exploration, and the connection of world civilizations.",
|
434 |
+
x: 500,
|
435 |
+
y: 340,
|
436 |
+
prerequisites: [5, 6] // Requires Mathematics and Metalworking
|
437 |
+
},
|
438 |
+
|
439 |
+
// Industrial Era
|
440 |
+
{
|
441 |
+
id: 9,
|
442 |
+
name: "Steam Engine",
|
443 |
+
era: "industrial",
|
444 |
+
icon: "fas fa-train",
|
445 |
+
description: "The practical application of steam power drove the Industrial Revolution, transforming manufacturing and transportation.",
|
446 |
+
x: 200,
|
447 |
+
y: 460,
|
448 |
+
prerequisites: [5, 6] // Requires Mathematics and Metalworking
|
449 |
+
},
|
450 |
+
{
|
451 |
+
id: 10,
|
452 |
+
name: "Electricity",
|
453 |
+
era: "industrial",
|
454 |
+
icon: "fas fa-bolt",
|
455 |
+
description: "Harnessing electromagnetic energy revolutionized nearly every aspect of life from lighting to communication to manufacturing.",
|
456 |
+
x: 400,
|
457 |
+
y: 460,
|
458 |
+
prerequisites: [5] // Requires Mathematics
|
459 |
+
},
|
460 |
+
{
|
461 |
+
id: 11,
|
462 |
+
name: "Telegraph",
|
463 |
+
era: "industrial",
|
464 |
+
icon: "fas fa-satellite-dish",
|
465 |
+
description: "Electrical communication over distance shrank the world, enabling near-instant information transfer across continents.",
|
466 |
+
x: 600,
|
467 |
+
y: 460,
|
468 |
+
prerequisites: [10] // Requires Electricity
|
469 |
+
},
|
470 |
+
|
471 |
+
// Modern Era
|
472 |
+
{
|
473 |
+
id: 12,
|
474 |
+
name: "Automobile",
|
475 |
+
era: "modern",
|
476 |
+
icon: "fas fa-car",
|
477 |
+
description: "Combustion-powered personal transportation reshaped cities, economies, and global mobility patterns.",
|
478 |
+
x: 200,
|
479 |
+
y: 580,
|
480 |
+
prerequisites: [9, 10] // Requires Steam Engine and Electricity
|
481 |
+
},
|
482 |
+
{
|
483 |
+
id: 13,
|
484 |
+
name: "Aeroplane",
|
485 |
+
era: "modern",
|
486 |
+
icon: "fas fa-plane",
|
487 |
+
description: "Powered flight revolutionized global travel, warfare, and connected the world in unprecedented ways.",
|
488 |
+
x: 400,
|
489 |
+
y: 580,
|
490 |
+
prerequisites: [10, 11] // Requires Electricity and Telegraph
|
491 |
+
},
|
492 |
+
{
|
493 |
+
id: 14,
|
494 |
+
name: "Computers",
|
495 |
+
era: "modern",
|
496 |
+
icon: "fas fa-computer",
|
497 |
+
description: "Digital computing machines automated complex calculations, information processing, and later became universal tools.",
|
498 |
+
x: 600,
|
499 |
+
y: 580,
|
500 |
+
prerequisites: [5, 10] // Requires Mathematics and Electricity
|
501 |
+
},
|
502 |
+
|
503 |
+
// Future Era
|
504 |
+
{
|
505 |
+
id: 15,
|
506 |
+
name: "Internet",
|
507 |
+
era: "future",
|
508 |
+
icon: "fas fa-network-wired",
|
509 |
+
description: "Global digital communication network enabling instant access to information and connecting humanity like never before.",
|
510 |
+
x: 400,
|
511 |
+
y: 700,
|
512 |
+
prerequisites: [13, 14] // Requires Aeroplane and Computers
|
513 |
+
},
|
514 |
+
{
|
515 |
+
id: 16,
|
516 |
+
name: "AI",
|
517 |
+
era: "future",
|
518 |
+
icon: "fas fa-robot",
|
519 |
+
description: "Artificial intelligence systems capable of learning, pattern recognition, and performing tasks once requiring human intelligence.",
|
520 |
+
x: 600,
|
521 |
+
y: 700,
|
522 |
+
prerequisites: [14] // Requires Computers
|
523 |
+
}
|
524 |
+
];
|
525 |
+
|
526 |
+
// Draw the technology nodes
|
527 |
+
techData.forEach(tech => {
|
528 |
+
const node = document.createElement('div');
|
529 |
+
node.className = `tech-node ${tech.era}`;
|
530 |
+
node.style.left = `${tech.x}px`;
|
531 |
+
node.style.top = `${tech.y}px`;
|
532 |
+
node.dataset.id = tech.id;
|
533 |
+
|
534 |
+
node.innerHTML = `
|
535 |
+
<div class="tech-icon">
|
536 |
+
<i class="${tech.icon}"></i>
|
537 |
+
</div>
|
538 |
+
<div class="tech-name">${tech.name}</div>
|
539 |
+
<div class="tech-era">${tech.era.charAt(0).toUpperCase() + tech.era.slice(1)}</div>
|
540 |
+
`;
|
541 |
+
|
542 |
+
// Add click event for popup
|
543 |
+
node.addEventListener('click', () => {
|
544 |
+
document.getElementById('popupTitle').textContent = tech.name;
|
545 |
+
document.getElementById('popupEra').textContent =
|
546 |
+
`${tech.era.charAt(0).toUpperCase() + tech.era.slice(1)} Era`;
|
547 |
+
document.getElementById('popupDescription').textContent = tech.description;
|
548 |
+
|
549 |
+
if (tech.prerequisites && tech.prerequisites.length) {
|
550 |
+
const prereqNames = tech.prerequisites.map(id =>
|
551 |
+
techData.find(t => t.id === id).name
|
552 |
+
).join(', ');
|
553 |
+
document.getElementById('popupPrereqs').textContent =
|
554 |
+
`Prerequisites: ${prereqNames}`;
|
555 |
+
} else {
|
556 |
+
document.getElementById('popupPrereqs').textContent =
|
557 |
+
'Prerequisites: None (starting technology)';
|
558 |
+
}
|
559 |
+
|
560 |
+
nodePopup.style.display = 'block';
|
561 |
+
|
562 |
+
// Animate the tech path
|
563 |
+
animateTechPath(tech.era);
|
564 |
+
});
|
565 |
+
|
566 |
+
techTree.appendChild(node);
|
567 |
+
});
|
568 |
+
|
569 |
+
// Draw connections between technologies
|
570 |
+
techData.forEach(tech => {
|
571 |
+
if (tech.prerequisites && tech.prerequisites.length) {
|
572 |
+
tech.prerequisites.forEach(prereqId => {
|
573 |
+
const prereqTech = techData.find(t => t.id === prereqId);
|
574 |
+
if (prereqTech) {
|
575 |
+
drawConnection(
|
576 |
+
prereqTech.x + 50, prereqTech.y + 50, // source (center of circle)
|
577 |
+
tech.x + 50, tech.y + 50 // target
|
578 |
+
);
|
579 |
+
}
|
580 |
+
});
|
581 |
+
}
|
582 |
+
});
|
583 |
+
|
584 |
+
// Function to draw a connection line between two points
|
585 |
+
function drawConnection(x1, y1, x2, y2) {
|
586 |
+
const line = document.createElement('div');
|
587 |
+
line.className = 'connection';
|
588 |
+
|
589 |
+
// Calculate length and angle of the line
|
590 |
+
const length = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
|
591 |
+
const angle = Math.atan2(y2 - y1, x2 - x1) * 180 / Math.PI;
|
592 |
+
|
593 |
+
// Style the line
|
594 |
+
line.style.width = `${length}px`;
|
595 |
+
line.style.left = `${x1}px`;
|
596 |
+
line.style.top = `${y1}px`;
|
597 |
+
line.style.transform = `rotate(${angle}deg)`;
|
598 |
+
|
599 |
+
// Add a subtle glow effect
|
600 |
+
line.style.boxShadow = `0 0 10px 1px rgba(255, 255, 255, 0.3)`;
|
601 |
+
|
602 |
+
techTree.insertBefore(line, techTree.firstChild);
|
603 |
+
}
|
604 |
+
|
605 |
+
// Close popup when clicking the X
|
606 |
+
closePopup.addEventListener('click', () => {
|
607 |
+
nodePopup.style.display = 'none';
|
608 |
+
});
|
609 |
+
|
610 |
+
// Close popup when clicking outside
|
611 |
+
window.addEventListener('click', (e) => {
|
612 |
+
if (e.target === nodePopup) {
|
613 |
+
nodePopup.style.display = 'none';
|
614 |
+
}
|
615 |
+
});
|
616 |
+
|
617 |
+
// Era button functionality
|
618 |
+
document.querySelectorAll('.era-button').forEach(button => {
|
619 |
+
button.addEventListener('click', () => {
|
620 |
+
const era = button.textContent.toLowerCase();
|
621 |
+
|
622 |
+
// Simple animation - we could enhance this with smooth scrolling
|
623 |
+
document.querySelector('.tech-tree-container').scrollTo({
|
624 |
+
left: getScrollPositionForEra(era),
|
625 |
+
behavior: 'smooth'
|
626 |
+
});
|
627 |
+
});
|
628 |
+
});
|
629 |
+
|
630 |
+
function getScrollPositionForEra(era) {
|
631 |
+
const eraIndex = ['ancient', 'classical', 'medieval', 'industrial', 'modern', 'future'].indexOf(era);
|
632 |
+
return eraIndex * 200; // Adjust this based on your needs
|
633 |
+
}
|
634 |
+
|
635 |
+
function animateTechPath(era) {
|
636 |
+
let width = 0;
|
637 |
+
switch(era) {
|
638 |
+
case 'ancient': width = 16; break;
|
639 |
+
case 'classical': width = 32; break;
|
640 |
+
case 'medieval': width = 48; break;
|
641 |
+
case 'industrial': width = 64; break;
|
642 |
+
case 'modern': width = 80; break;
|
643 |
+
case 'future': width = 100; break;
|
644 |
+
}
|
645 |
+
techPath.style.width = `${width}%`;
|
646 |
+
}
|
647 |
+
|
648 |
+
// Initial load - set to ancient era
|
649 |
+
animateTechPath('ancient');
|
650 |
+
});
|
651 |
+
</script>
|
652 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <a href="https://enzostvs-deepsite.hf.space" style="color: #fff;" target="_blank" >DeepSite</a> <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;"></p></body>
|
653 |
+
</html>
|