64 lines
1.5 KiB
HTML
64 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Ruby's Brain Map</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/force-graph"></script>
|
|
<style>
|
|
body {
|
|
background-color: #121212;
|
|
color: #e0e0e0;
|
|
margin: 0;
|
|
padding: 0;
|
|
overflow: hidden;
|
|
}
|
|
#graph {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
}
|
|
.nav {
|
|
position: absolute;
|
|
top: 10px;
|
|
left: 10px;
|
|
background-color: #1e1e1e;
|
|
padding: 10px;
|
|
z-index: 1000;
|
|
}
|
|
.nav a {
|
|
color: #e0e0e0;
|
|
margin-right: 20px;
|
|
text-decoration: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="nav">
|
|
<a href="/">🏠 Home</a>
|
|
<a href="/journal">📓 Journal</a>
|
|
<a href="/concepts">🧠 Concepts</a>
|
|
<a href="/brainmap">🕸️ Brain Map</a>
|
|
<a href="/growth">📈 Growth</a>
|
|
<a href="/dreams">🌃 Dreams</a>
|
|
</div>
|
|
|
|
<div id="graph"></div>
|
|
|
|
<script>
|
|
const graphData = {
|
|
nodes: {{ nodes | safe }},
|
|
links: {{ links | safe }}
|
|
};
|
|
|
|
const Graph = ForceGraph()(document.getElementById('graph'))
|
|
.graphData(graphData)
|
|
.nodeAutoColorBy('id')
|
|
.nodeLabel('id')
|
|
.linkWidth(link => Math.log(link.value + 1))
|
|
.linkColor(() => 'rgba(255,255,255,0.2)')
|
|
.backgroundColor('#121212');
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|