-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
405 lines (376 loc) · 12.1 KB
/
script.js
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
// Tool Section Functionality
function toggleDetails(id) {
const element = document.getElementById(id);
const button = element.previousElementSibling;
element.classList.toggle("hidden");
button.textContent = element.classList.contains("hidden")
? "Expand Details"
: "Hide Details";
}
// Enhanced Loading Animation
document.addEventListener("DOMContentLoaded", function () {
const toolSections = document.querySelectorAll(".tool-section");
toolSections.forEach((section, index) => {
section.style.animationDelay = `${index * 150}ms`;
});
});
// Smooth Scroll for Tool Sections
document.querySelectorAll(".tool-section").forEach((section) => {
section.addEventListener("click", function (e) {
if (!e.target.classList.contains("expand-button")) {
this.classList.toggle("active");
}
});
});
// Enhanced Search with Highlight
function searchTools() {
const searchInput = document.getElementById("search-input");
const filter = searchInput.value.toLowerCase();
const toolSections = document.querySelectorAll(".tool-section");
toolSections.forEach((section) => {
const title = section.querySelector("h2").textContent.toLowerCase();
const description = section.querySelector("p").textContent.toLowerCase();
if (title.includes(filter) || description.includes(filter)) {
section.style.display = "";
section.style.animation = "fadeIn 0.5s ease forwards";
} else {
section.style.display = "none";
}
});
}
// Tool Data
const toolData = {
1: {
title: "Online P.K.E. Scanner",
description: "An app that detects paranormal activity using IoT sensors.",
details:
"This app scans energy fields remotely and identifies psycho-kinetic levels in real-time, assisting Ghostbusters in tracking invisible entities.",
features: [
"Real-time energy field scanning",
"IoT sensor integration",
"Mobile app compatibility",
"Advanced entity tracking",
"Historical data analysis",
],
techStack: [
"Quantum Sensors",
"5G Network",
"Neural Processing Units",
"Holographic Display",
"Bio-electric Amplifiers",
],
buildSteps: [
"Install quantum sensor array",
"Configure neural network",
"Calibrate ectoplasmic detection",
"Set up real-time monitoring",
"Deploy mobile interface",
],
requirements: {
power: "5000W Quantum Core",
space: "Virtual Cloud Space",
connectivity: "Ultra-wide Band",
security: "Quantum Encryption",
},
maintenance: [
"Weekly sensor calibration",
"Monthly quantum core alignment",
"Bi-annual software updates",
],
safetyProtocols: [
"Auto-shutdown on overload",
"Entity containment backup",
"Emergency power routing",
],
},
2: {
title: "Cloud Ghost Trap",
description: "A cloud-based storage system for capturing ghosts remotely.",
details:
"The Cloud Ghost Trap revolutionizes ghost containment by utilizing quantum cloud storage technology, allowing for secure containment without physical limitations.",
features: [
"Quantum containment fields",
"Remote ghost transfer capability",
"Multi-ghost storage capacity",
"Emergency backup systems",
"Cross-platform accessibility",
],
},
3: {
title: "Specter Tracker Wristband",
description:
"A wearable device that alerts users of nearby ghost movement.",
details:
"This advanced wearable technology combines miniaturized P.K.E. sensors with haptic feedback to provide real-time ghost proximity alerts.",
features: [
"360-degree ghost detection",
"Haptic feedback alerts",
"Extended battery life",
"Water-resistant design",
"Neural activity monitoring",
],
},
4: {
title: "Ghost Recon Drones",
description:
"Autonomous drones equipped with thermal cameras to scan for ghosts.",
details:
"These AI-powered drones utilize multiple spectral imaging technologies to track and monitor ghostly entities in hard-to-reach locations.",
features: [
"Multi-spectral imaging",
"AI path-finding",
"Silent operation mode",
"4K ectoplasm recording",
"Swarm coordination capability",
],
},
5: {
title: "Ghost Data Analyzer",
description:
"An AI-powered platform for analyzing ghost data and providing insights.",
details:
"Using advanced machine learning algorithms, this platform processes vast amounts of paranormal data to identify patterns and predict ghost behavior.",
features: [
"Pattern recognition AI",
"Behavioral prediction",
"Real-time data processing",
"Interactive visualizations",
"Customizable analysis parameters",
],
},
6: {
title: "SpecterNet",
description:
"A social network for sharing ghost sightings and experiences.",
details:
"SpecterNet creates a global community of paranormal investigators, allowing real-time sharing of ghost encounters and collaborative investigation planning.",
features: [
"Verified sighting system",
"Live streaming capability",
"Evidence rating system",
"Investigation planning tools",
"Community challenges",
],
},
7: {
title: "Ghost Alert Network",
description: "A global system for real-time ghost activity alerts.",
details:
"This comprehensive alert system monitors paranormal activity worldwide, providing instant notifications to Ghostbusters teams about potential threats.",
features: [
"Global activity mapping",
"Threat level assessment",
"Automated dispatch system",
"Cross-team coordination",
"Custom alert parameters",
],
},
8: {
title: "Augmented Ghost Vision",
description: "AR-powered glasses to visualize ghosts in real time.",
details:
"These cutting-edge AR glasses overlay spectral data onto the real world, allowing Ghostbusters to see and track entities that are invisible to the naked eye.",
features: [
"Real-time ghost visualization",
"Threat level indicators",
"Environmental analysis",
"Voice-activated controls",
"Recording capability",
],
},
9: {
title: "Virtual Ghost Containment",
description: "A virtual storage solution for ghost containment.",
details:
"This revolutionary system creates secure virtual environments for ghost containment, utilizing quantum computing to maintain stable containment fields.",
features: [
"Virtual containment fields",
"Quantum stabilization",
"Remote monitoring",
"Automated maintenance",
"Scalable storage capacity",
],
},
10: {
title: "Digital Particle Thrower",
description:
"A web-connected weapon for tackling large-scale ghost threats.",
details:
"The Digital Particle Thrower combines traditional proton stream technology with smart targeting and cloud-based power management.",
features: [
"Smart targeting system",
"Cloud power management",
"Multiple stream modes",
"Energy efficiency optimization",
"Remote diagnostics",
],
},
11: {
title: "Ghost Translator",
description:
"An AI tool for translating ghost languages into human speech.",
details:
"Using advanced linguistic AI and spectral frequency analysis, this tool enables real-time communication with ghostly entities.",
features: [
"Real-time translation",
"Multi-spectral voice analysis",
"Emotion detection",
"Historical language database",
"Cultural context adaptation",
],
},
12: {
title: "Smart Ghost Command Center",
description: "An advanced interface for managing missions and tools.",
details:
"This comprehensive command center integrates all Ghostbusters tools and data streams into a single, intuitive interface for efficient mission management.",
features: [
"Unified tool control",
"Mission planning AI",
"Team coordination system",
"Resource management",
"Performance analytics",
],
},
};
// Modal Functionality
const modal = document.getElementById("toolModal");
const modalTitle = modal.querySelector(".modal-header h2");
const modalDescription = modal.querySelector(".modal-description");
const modalDetails = modal.querySelector(".modal-details");
const closeModal = modal.querySelector(".close-modal");
function openModal(toolId) {
const tool = toolData[toolId];
if (!tool) return;
modalTitle.textContent = tool.title;
modalDescription.textContent = tool.description;
// Create features list with enhanced styling
const featuresList = tool.features
.map(
(feature) =>
`<div class="feature-item">
<i class="fas fa-check-circle"></i>
<span>${feature}</span>
</div>`
)
.join("");
// Create tech stack list
const techStackList = tool.techStack
.map(
(tech) =>
`<div class="tech-item">
<i class="fas fa-microchip"></i>
<span>${tech}</span>
</div>`
)
.join("");
// Create build steps list
const buildStepsList = tool.buildSteps
.map(
(step, index) =>
`<div class="build-step">
<span class="step-number">${index + 1}</span>
<span>${step}</span>
</div>`
)
.join("");
// Create requirements list
const requirementsList = Object.entries(tool.requirements)
.map(
([key, value]) =>
`<div class="requirement-item">
<span class="req-label">${key}:</span>
<span class="req-value">${value}</span>
</div>`
)
.join("");
// Create maintenance list
const maintenanceList = tool.maintenance
.map(
(item) =>
`<div class="maintenance-item">
<i class="fas fa-tools"></i>
<span>${item}</span>
</div>`
)
.join("");
// Create safety protocols list
const safetyList = tool.safetyProtocols
.map(
(protocol) =>
`<div class="safety-item">
<i class="fas fa-shield-alt"></i>
<span>${protocol}</span>
</div>`
)
.join("");
modalDetails.innerHTML = `
<div class="modal-body">
<div class="modal-section">
<p class="section-details">${tool.details}</p>
</div>
<div class="modal-section">
<h3><i class="fas fa-star"></i> Key Features</h3>
<div class="features-list">
${featuresList}
</div>
</div>
<div class="modal-section">
<h3><i class="fas fa-microchip"></i> Tech Stack</h3>
<div class="tech-stack-list">
${techStackList}
</div>
</div>
<div class="modal-section">
<h3><i class="fas fa-tools"></i> Building Steps</h3>
<div class="build-steps-list">
${buildStepsList}
</div>
</div>
<div class="modal-section">
<h3><i class="fas fa-cog"></i> Requirements</h3>
<div class="requirements-list">
${requirementsList}
</div>
</div>
<div class="modal-section">
<h3><i class="fas fa-wrench"></i> Maintenance</h3>
<div class="maintenance-list">
${maintenanceList}
</div>
</div>
<div class="modal-section">
<h3><i class="fas fa-shield-alt"></i> Safety Protocols</h3>
<div class="safety-list">
${safetyList}
</div>
</div>
</div>
`;
modal.classList.add("active");
document.body.style.overflow = "hidden";
}
function closeModalHandler() {
modal.classList.remove("active");
document.body.style.overflow = "";
}
// Event Listeners
document.querySelectorAll(".expand-button").forEach((button) => {
button.addEventListener("click", () => {
const toolId = button.getAttribute("data-tool-id");
openModal(toolId);
});
});
closeModal.addEventListener("click", closeModalHandler);
// Close modal on outside click
modal.addEventListener("click", (e) => {
if (e.target === modal) {
closeModalHandler();
}
});
// Close modal on ESC key
document.addEventListener("keydown", (e) => {
if (e.key === "Escape" && modal.classList.contains("active")) {
closeModalHandler();
}
});