diff options
| author | eltrac <hi@eltr.ac> | 2026-04-07 14:53:17 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-04-07 14:53:17 +0800 |
| commit | 10431bd8f5ff71690ae4e5444e8d7894fd401ae5 (patch) | |
| tree | 62b7fd1b6c1f68d2804f380eb522bcebeb2c8d9f /static/graph.html | |
| parent | 3e0edacc4a0cafa53ede57ebb6f0378c93f3123b (diff) | |
chore: move templates out of site repo
Diffstat (limited to 'static/graph.html')
| -rw-r--r-- | static/graph.html | 80 |
1 files changed, 0 insertions, 80 deletions
diff --git a/static/graph.html b/static/graph.html deleted file mode 100644 index 9cc77cbc..00000000 --- a/static/graph.html +++ /dev/null @@ -1,80 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8" /> - <title>Page Link Graph</title> - <script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script> - <style> - body { - margin: 0; - background: #111; - color: #eee; - font-family: sans-serif; - } - #graph { - width: 100vw; - height: 100vh; - border: 1px solid #444; - } - </style> -</head> -<body> - <div id="graph"></div> - <script> - fetch("link-graph.json") - .then(res => res.json()) - .then(data => { - const container = document.getElementById("graph"); - - const nodes = new vis.DataSet( - data.nodes.map(node => ({ - id: node.id, - label: node.label, - url: node.url, - font: { color: "#eee" } - })) - ); - - const edges = new vis.DataSet(data.edges); - - const network = new vis.Network(container, { nodes, edges }, { - nodes: { - shape: "dot", - size: 10, - color: { - background: "#29c", - border: "#fff" - }, - font: { - size: 14, - color: "#eee" - } - }, - edges: { - arrows: "to", - color: { - color: "#888" - } - }, - physics: { - stabilization: false - }, - interaction: { - navigationButtons: true, - zoomView: true, - dragView: true - } - }); - - network.on("click", function (params) { - if (params.nodes.length > 0) { - const node = nodes.get(params.nodes[0]); - if (node.url) { - window.open(node.url, "_blank"); - } - } - }); - }); - </script> -</body> -</html> |
