summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elements.css103
-rw-r--r--elements.json142
-rw-r--r--quantum-elements-v3.html62
3 files changed, 307 insertions, 0 deletions
diff --git a/elements.css b/elements.css
new file mode 100644
index 0000000..0cebd97
--- /dev/null
+++ b/elements.css
@@ -0,0 +1,103 @@
+/* elements.css */
+body {
+ margin: 0;
+ font-family: Arial, sans-serif;
+ background-color: #f4f4f4;
+ }
+
+ .periodic-table {
+ display: grid;
+ grid-template-columns: repeat(18, 1fr);
+ grid-gap: 5px;
+ padding: 20px;
+ max-width: 1200px;
+ margin: auto;
+ }
+
+ .element {
+ background-color: #e0e0e0;
+ border: 1px solid #999;
+ text-align: center;
+ padding: 10px;
+ cursor: pointer;
+ border-radius: 5px;
+ position: relative;
+ }
+
+ .element .number {
+ font-size: 12px;
+ position: absolute;
+ top: 5px;
+ left: 5px;
+ }
+
+ .element .symbol {
+ font-size: 20px;
+ font-weight: bold;
+ }
+
+ .element .name {
+ font-size: 12px;
+ }
+
+ /* Classification colors */
+ .alkali-metal { background-color: #ff6666; }
+ .alkaline-earth-metal { background-color: #ffdead; }
+ .lanthanoid { background-color: #ffbfff; }
+ .actinoid { background-color: #ff99cc; }
+ .transition-metal { background-color: #ffc0c0; }
+ .post-transition-metal { background-color: #cccccc; }
+ .metalloid { background-color: #cccc99; }
+ .nonmetal { background-color: #b3e6ff; }
+ noble-gas { background-color: #c0ffff; }
+ .unknown { background-color: #e5e5e5; }
+
+ /* Overlay and popup */
+ #overlay {
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.6);
+ backdrop-filter: blur(4px);
+ z-index: 1000;
+ }
+
+ #popup {
+ display: none;
+ position: fixed;
+ top: 10%;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 80%;
+ max-width: 600px;
+ background-color: #fff;
+ padding: 20px;
+ border-radius: 8px;
+ z-index: 1001;
+ overflow-y: auto;
+ max-height: 80%;
+ }
+
+ #popup h2 {
+ margin-top: 0;
+ }
+
+ #popup button {
+ display: block;
+ margin: 20px auto 0;
+ padding: 10px 20px;
+ font-size: 16px;
+ border: none;
+ background-color: #007bff;
+ color: white;
+ border-radius: 5px;
+ cursor: pointer;
+ }
+
+ #popup button:hover {
+ background-color: #0056b3;
+ }
+ \ No newline at end of file
diff --git a/elements.json b/elements.json
new file mode 100644
index 0000000..aca8450
--- /dev/null
+++ b/elements.json
@@ -0,0 +1,142 @@
+[
+ {
+ "number": 1,
+ "symbol": "H",
+ "name": "Hydrogen",
+ "category": "nonmetal",
+ "column": 1,
+ "row": 1,
+ "quantum": "Used in quantum hydride models",
+ "other": "Rocket fuel, industrial processes",
+ "vendors": [
+ "Air Liquide",
+ "Linde"
+ ]
+ },
+ {
+ "number": 2,
+ "symbol": "He",
+ "name": "Helium",
+ "category": "noble-gas",
+ "column": 18,
+ "row": 1,
+ "quantum": "Key in dilution refrigeration for qubit cooling",
+ "other": "MRI scanners, balloons",
+ "vendors": [
+ "Airgas",
+ "Gazprom"
+ ]
+ },
+ {
+ "number": 3,
+ "symbol": "Li",
+ "name": "Lithium",
+ "category": "alkali-metal",
+ "column": 1,
+ "row": 2,
+ "quantum": "Trapped-ion qubit candidate",
+ "other": "Batteries, ceramics",
+ "vendors": [
+ "Albemarle",
+ "SQM"
+ ]
+ },
+ {
+ "number": 4,
+ "symbol": "Be",
+ "name": "Beryllium",
+ "category": "alkaline-earth-metal",
+ "column": 2,
+ "row": 2,
+ "quantum": "Used in ion traps",
+ "other": "Aerospace, X-ray windows",
+ "vendors": [
+ "Materion",
+ "American Elements"
+ ]
+ },
+ {
+ "number": 5,
+ "symbol": "B",
+ "name": "Boron",
+ "category": "metalloid",
+ "column": 13,
+ "row": 2,
+ "quantum": "Used in B-doped superconductors",
+ "other": "Glass, detergents",
+ "vendors": [
+ "Borax",
+ "Eti Maden"
+ ]
+ },
+ {
+ "number": 6,
+ "symbol": "C",
+ "name": "Carbon",
+ "category": "nonmetal",
+ "column": 14,
+ "row": 2,
+ "quantum": "Base of diamond NV centers",
+ "other": "All life forms, steel",
+ "vendors": [
+ "GrafTech",
+ "Asbury"
+ ]
+ },
+ {
+ "number": 7,
+ "symbol": "N",
+ "name": "Nitrogen",
+ "category": "nonmetal",
+ "column": 15,
+ "row": 2,
+ "quantum": "Part of NV centers",
+ "other": "Fertilizers, inert gas",
+ "vendors": [
+ "Air Products",
+ "Yara"
+ ]
+ },
+ {
+ "number": 8,
+ "symbol": "O",
+ "name": "Oxygen",
+ "category": "nonmetal",
+ "column": 16,
+ "row": 2,
+ "quantum": "Present in oxide superconductors",
+ "other": "Respiration, combustion",
+ "vendors": [
+ "Praxair",
+ "Air Liquide"
+ ]
+ },
+ {
+ "number": 9,
+ "symbol": "F",
+ "name": "Fluorine",
+ "category": "halogen",
+ "column": 17,
+ "row": 2,
+ "quantum": "Used in fluorine-doped quantum dots",
+ "other": "Teflon, refrigerants",
+ "vendors": [
+ "Solvay",
+ "Honeywell"
+ ]
+ },
+ {
+ "number": 10,
+ "symbol": "Ne",
+ "name": "Neon",
+ "category": "noble-gas",
+ "column": 18,
+ "row": 2,
+ "quantum": "Cryogenic support gas",
+ "other": "Sign lighting",
+ "vendors": [
+ "Linde",
+ "Messer"
+ ]
+ }
+] \ No newline at end of file
diff --git a/quantum-elements-v3.html b/quantum-elements-v3.html
new file mode 100644
index 0000000..6cb1eea
--- /dev/null
+++ b/quantum-elements-v3.html
@@ -0,0 +1,62 @@
+<!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>
+ <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>