summaryrefslogtreecommitdiff
path: root/quantum-elements.html
diff options
context:
space:
mode:
authorAnna Knoerr <an.kn@protonmail.ch>2025-07-21 15:50:59 +0200
committerAnna Knoerr <an.kn@protonmail.ch>2025-07-21 15:50:59 +0200
commit77d5ee8e8f5d55f6137f05ea97a6c479dc6d7041 (patch)
tree54d27bd9a211c7a0579d01ca7a499b51f04f902c /quantum-elements.html
parent05dfb1981711df1d91b942e0bc38631a21fe1c38 (diff)
renamed url
Diffstat (limited to 'quantum-elements.html')
-rw-r--r--quantum-elements.html63
1 files changed, 63 insertions, 0 deletions
diff --git a/quantum-elements.html b/quantum-elements.html
new file mode 100644
index 0000000..65a631c
--- /dev/null
+++ b/quantum-elements.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Interactive Periodic Table</title>
+ <link rel="stylesheet" href="elements.css" />
+</head>
+<body>
+ <h1 style="text-align: center; padding-top: 20px; font-size: 1.8em;">Explore the elements used in quantum tech!</h1>
+ <div id="overlay"></div>
+ <div id="popup">
+ <h2 id="element-name">Element Name</h2>
+ <h3>Usage in Quantum Technologies</h3>
+ <p id="quantum-text">Dummy text for usage in quantum technologies...</p>
+ <h3>Usage in Other Technologies</h3>
+ <p id="other-text">Dummy text for other usage...</p>
+ <h3>Vendors</h3>
+ <p id="vendors-text">Dummy text for vendors...</p>
+ <button onclick="closePopup()">Close</button>
+ </div>
+
+ <div class="periodic-table" id="table"></div>
+
+ <script>
+ async function loadElements() {
+ const res = await fetch('elements.json');
+ const elements = await res.json();
+ const table = document.getElementById("table");
+
+ elements.forEach(el => {
+ const div = document.createElement("div");
+ div.className = `element ${el.category}`;
+ div.style.gridColumn = el.column;
+ div.style.gridRow = el.row;
+ div.onclick = () => openPopup(el);
+ div.innerHTML = `
+ <span class="number">${el.number}</span>
+ <span class="symbol">${el.symbol}</span>
+ <span class="name">${el.name}</span>
+ `;
+ table.appendChild(div);
+ });
+ }
+
+ function openPopup(el) {
+ document.getElementById("overlay").style.display = "block";
+ document.getElementById("popup").style.display = "block";
+ document.getElementById("element-name").innerText = el.name;
+ document.getElementById("quantum-text").innerText = el.quantum || 'No data.';
+ document.getElementById("other-text").innerText = el.other || 'No data.';
+ document.getElementById("vendors-text").innerText = el.vendors?.join(', ') || 'No data.';
+ }
+
+ function closePopup() {
+ document.getElementById("overlay").style.display = "none";
+ document.getElementById("popup").style.display = "none";
+ }
+
+ loadElements();
+ </script>
+</body>
+</html>