Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Knowledge Graph | Cosmic Bio Explorer</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script> | |
| <script src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| cosmic: { | |
| 100: '#e0e7ff', | |
| 200: '#c7d2fe', | |
| 300: '#a5b4fc', | |
| 400: '#818cf8', | |
| 500: '#6366f1', | |
| 600: '#4f46e5', | |
| 700: '#4338ca', | |
| 800: '#3730a3', | |
| 900: '#312e81', | |
| }, | |
| nebula: { | |
| 100: '#f0f9ff', | |
| 200: '#e0f2fe', | |
| 300: '#bae6fd', | |
| 400: '#7dd3fc', | |
| 500: '#38bdf8', | |
| 600: '#0284c7', | |
| 700: '#0369a1', | |
| 800: '#075985', | |
| 900: '#0c4a6e', | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); | |
| } | |
| .card-hover { | |
| transition: all 0.3s ease; | |
| } | |
| .card-hover:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| #knowledge-graph { | |
| width: 100%; | |
| height: 600px; | |
| border-radius: 0.75rem; | |
| border: 1px solid #374151; | |
| background-color: rgba(31, 41, 55, 0.5); | |
| backdrop-filter: blur(10px); | |
| } | |
| </style> | |
| </head> | |
| <body class="gradient-bg text-gray-100 min-h-screen"> | |
| <div id="vanta-bg" class="fixed top-0 left-0 w-full h-full z-0"></div> | |
| <div class="relative z-10"> | |
| <nav class="bg-black bg-opacity-50 backdrop-blur-lg border-b border-gray-800"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex items-center justify-between h-16"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0"> | |
| <div class="flex items-center"> | |
| <i data-feather="activity" class="text-cosmic-400 h-8 w-8"></i> | |
| <span class="ml-2 text-xl font-bold bg-gradient-to-r from-cosmic-400 to-nebula-500 bg-clip-text text-transparent">Cosmic Bio Explorer</span> | |
| </div> | |
| </div> | |
| <div class="hidden md:block"> | |
| <div class="ml-10 flex items-baseline space-x-4"> | |
| <a href="dashboard.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Dashboard</a> | |
| <a href="publications.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Publications</a> | |
| <a href="knowledge-graph.html" class="bg-cosmic-600 text-white px-3 py-2 rounded-md text-sm font-medium">Knowledge Graph</a> | |
| <a href="trends.html" class="text-gray-300 hover:bg-gray-700 hover:text-white px-3 py-2 rounded-md text-sm font-medium">Trends</a> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="hidden md:block"> | |
| <div class="ml-4 flex items-center md:ml-6"> | |
| <a href="search.html" class="bg-gray-800 p-1 rounded-full text-gray-400 hover:text-white focus:outline-none"> | |
| <i data-feather="search" class="h-5 w-5"></i> | |
| </a> | |
| <a href="notifications.html" class="ml-3 bg-gray-800 p-1 rounded-full text-gray-400 hover:text-white focus:outline-none"> | |
| <i data-feather="bell" class="h-5 w-5"></i> | |
| </a> | |
| <div class="ml-3 relative"> | |
| <div> | |
| <a href="profile.html" class="max-w-xs bg-gray-800 rounded-full flex items-center text-sm focus:outline-none"> | |
| <span class="sr-only">Open user menu</span> | |
| <img class="h-8 w-8 rounded-full" src="http://static.photos/space/200x200/42" alt=""> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="-mr-2 flex md:hidden"> | |
| <button type="button" class="bg-gray-800 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none" aria-controls="mobile-menu" aria-expanded="false"> | |
| <span class="sr-only">Open main menu</span> | |
| <i data-feather="menu" class="h-6 w-6"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <main class="py-10 px-4 sm:px-6 lg:px-8"> | |
| <div class="max-w-7xl mx-auto"> | |
| <div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-8"> | |
| <div> | |
| <h1 class="text-3xl font-bold text-white mb-2">Space Biology Knowledge Graph</h1> | |
| <p class="text-gray-400">Visualizing connections between studies, organisms, and space missions</p> | |
| </div> | |
| <div class="mt-4 md:mt-0"> | |
| <button class="px-4 py-2 bg-cosmic-600 hover:bg-cosmic-700 text-white font-medium rounded-full transition duration-300 inline-flex items-center"> | |
| <i data-feather="download" class="h-4 w-4 mr-2"></i> Export Graph | |
| </button> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-1 lg:grid-cols-4 gap-6"> | |
| <div class="lg:col-span-3"> | |
| <div id="knowledge-graph"></div> | |
| </div> | |
| <div class="lg:col-span-1"> | |
| <div class="bg-gray-800 bg-opacity-50 backdrop-blur-md rounded-xl p-6 border border-gray-700"> | |
| <h2 class="text-xl font-semibold text-white mb-4">Graph Legend</h2> | |
| <div class="space-y-4"> | |
| <div class="flex items-center"> | |
| <div class="w-4 h-4 rounded-full bg-cosmic-400 mr-2"></div> | |
| <span class="text-gray-300">Studies</span> | |
| </div> | |
| <div class="flex items-center"> | |
| <div class="w-4 h-4 rounded-full bg-nebula-400 mr-2"></div> | |
| <span class="text-gray-300">Organisms</span> | |
| </div> | |
| <div class="flex items-center"> | |
| <div class="w-4 h-4 rounded-full bg-green-400 mr-2"></div> | |
| <span class="text-gray-300">Research Areas</span> | |
| </div> | |
| <div class="flex items-center"> | |
| <div class="w-4 h-4 rounded-full bg-purple-400 mr-2"></div> | |
| <span class="text-gray-300">Space Missions</span> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <h3 class="text-sm font-medium text-gray-300 mb-2">Selected Node</h3> | |
| <div class="bg-gray-700 p-3 rounded-lg"> | |
| <p class="text-sm text-white">Select a node to see details</p> | |
| </div> | |
| </div> | |
| <div class="mt-6"> | |
| <h3 class="text-sm font-medium text-gray-300 mb-2">Filters</h3> | |
| <div class="space-y-2"> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-cosmic-400 rounded border-gray-600 bg-gray-700 focus:ring-cosmic-500" checked> | |
| <span class="ml-2 text-sm text-gray-300">Show Studies</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-nebula-400 rounded border-gray-600 bg-gray-700 focus:ring-nebula-500" checked> | |
| <span class="ml-2 text-sm text-gray-300">Show Organisms</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-green-400 rounded border-gray-600 bg-gray-700 focus:ring-green-500" checked> | |
| <span class="ml-2 text-sm text-gray-300">Show Research Areas</span> | |
| </label> | |
| <label class="flex items-center"> | |
| <input type="checkbox" class="form-checkbox h-4 w-4 text-purple-400 rounded border-gray-600 bg-gray-700 focus:ring-purple-500" checked> | |
| <span class="ml-2 text-sm text-gray-300">Show Missions</span> | |
| </label> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <script> | |
| // Initialize Vanta.js background | |
| VANTA.NET({ | |
| el: "#vanta-bg", | |
| mouseControls: true, | |
| touchControls: true, | |
| gyroControls: false, | |
| minHeight: 200.00, | |
| minWidth: 200.00, | |
| scale: 1.00, | |
| scaleMobile: 1.00, | |
| color: 0x6366f1, | |
| backgroundColor: 0x0f172a, | |
| points: 12.00, | |
| maxDistance: 20.00, | |
| spacing: 16.00 | |
| }); | |
| // Initialize feather icons | |
| feather.replace(); | |
| // Initialize knowledge graph | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Create nodes and edges for the graph | |
| const nodes = new vis.DataSet([ | |
| {id: 1, label: 'Muscle Atrophy Study', color: '#6366f1', shape: 'box', borderWidth: 0, font: {color: 'white'}}, | |
| {id: 2, label: 'Human', color: '#38bdf8', font: {color: 'white'}}, | |
| {id: 3, label: 'ISS', color: '#a855f7', font: {color: 'white'}}, | |
| {id: 4, label: 'Muscle Biology', color: '#10b981', font: {color: 'white'}}, | |
| {id: 5, label: 'Bone Loss Study', color: '#6366f1', shape: 'box', borderWidth: 0, font: {color: 'white'}}, | |
| {id: 6, label: 'Mouse', color: '#38bdf8', font: {color: 'white'}}, | |
| {id: 7, label: 'Bone Biology', color: '#10b981', font: {color: 'white'}}, | |
| {id: 8, label: 'Plant Growth Study', color: '#6366f1', shape: 'box', borderWidth: 0, font: {color: 'white'}}, | |
| {id: 9, label: 'Arabidopsis', color: '#38bdf8', font: {color: 'white'}}, | |
| {id: 10, label: 'Plant Biology', color: '#10b981', font: {color: 'white'}}, | |
| {id: 11, label: 'Artemis', color: '#a855f7', font: {color: 'white'}} | |
| ]); | |
| const edges = new vis.DataSet([ | |
| {from: 1, to: 2, color: {color: '#6b7280'}}, | |
| {from: 1, to: 3, color: {color: '#6b7280'}}, | |
| {from: 1, to: 4, color: {color: '#6b7280'}}, | |
| {from: 5, to: 2, color: {color: '#6b7280'}}, | |
| {from: 5, to: 3, color: {color: '#6b7280'}}, | |
| {from: 5, to: 7, color: {color: '#6b7280'}}, | |
| {from: 8, to: 9, color: {color: '#6b7280'}}, | |
| {from: 8, to: 11, color: {color: '#6b7280'}}, | |
| {from: 8, to: 10, color: {color: '#6b7280'}}, | |
| {from: 3, to: 11, color: {color: '#6b7280'}, dashes: true} | |
| ]); | |
| // Create the network | |
| const container = document.getElementById('knowledge-graph'); | |
| const data = { | |
| nodes: nodes, | |
| edges: edges | |
| }; | |
| const options = { | |
| nodes: { | |
| size: 20, | |
| borderWidth: 0, | |
| shadow: { | |
| enabled: true, | |
| color: 'rgba(0,0,0,0.5)', | |
| size: 10, | |
| x: 5, | |
| y: 5 | |
| } | |
| }, | |
| edges: { | |
| width: 1, | |
| shadow: { | |
| enabled: true, | |
| color: 'rgba(0,0,0,0.5)', | |
| size: 10, | |
| x: 5, | |
| y: 5 | |
| } | |
| }, | |
| physics: { | |
| barnesHut: { | |
| gravitationalConstant: -8000, | |
| springConstant: 0.04, | |
| springLength: 95 | |
| } | |
| } | |
| }; | |
| const network = new vis.Network(container, data, options); | |
| }); | |
| </script> | |
| </body> | |
| </html> |