cosmic-knowledge / index.html
M
<div className="flex h-screen font-sans bg-gradient-radial from-[#0a0e17] to-[#020204] text-gray-300" style={{ fontFamily: "'Space Grotesk', sans-serif" }}> {/* Left Sidebar */} <aside className="w-80 flex flex-col bg-gray-900/50 border border-blue-600/30 shadow-lg p-4 space-y-4"> <section> <h2 className="text-sm font-semibold text-blue-400 flex items-center mb-2"> <span className="mr-2" style={{fontSize:16}}>[UsersIcon]</span> Active Agents </h2> <div className="space-y-2 text-xs"> <div className="flex items-center"> <div className="bg-green-400 w-2 h-2 rounded-full mr-2 animate-pulse"></div> <span>Exploration Agent</span> </div> <div className="flex items-center"> <div className="bg-purple-400 w-2 h-2 rounded-full mr-2"></div> <span>Cluster Analyzer</span> </div> <div className="flex items-center"> <div className="bg-yellow-400 w-2 h-2 rounded-full mr-2"></div> <span>Confidence Scorer</span> </div> </div> </section> <section className="flex-1 overflow-y-auto"> <h2 className="text-sm font-semibold text-blue-400 flex items-center mb-2"> <span className="mr-2" style={{fontSize:16}}>[ActivityIcon]</span> Pulse Feedback </h2> <div className="mb-3"> <div className="flex justify-between mb-1 text-xs"> <span>Knowledge Density</span> <span>78%</span> </div> <div className="w-full bg-gray-700 rounded-full h-1.5"> <div className="bg-blue-400 h-1.5 rounded-full" style={{ width: '78%' }}></div> </div> </div> <div className="mb-3"> <div className="flex justify-between mb-1 text-xs"> <span>Cluster Stability</span> <span>92%</span> </div> <div className="w-full bg-gray-700 rounded-full h-1.5"> <div className="bg-purple-400 h-1.5 rounded-full" style={{ width: '92%' }}></div> </div> </div> <div className="mb-3"> <div className="flex justify-between mb-1 text-xs"> <span>Edge Confidence</span> <span>65%</span> </div> <div className="w-full bg-gray-700 rounded-full h-1.5"> <div className="bg-green-400 h-1.5 rounded-full" style={{ width: '65%' }}></div> </div> </div> </section> <button className="w-full py-2 px-4 bg-blue-900/60 hover:bg-blue-900/80 rounded-md text-blue-300 flex items-center justify-center text-sm"> <span className="mr-2" style={{fontSize:16}}>[LayersIcon]</span> New Exploration </button> </aside> {/* Main content */} <main className="flex flex-col flex-1"> {/* Top bar */} <header className="h-12 flex items-center bg-gray-900/60 border border-blue-600/30 shadow px-4 space-x-6 text-sm"> <div className="flex items-center space-x-2"> <span className="font-semibold">Layer:</span> <span className="text-blue-300">Stratum VII</span> </div> <div className="flex items-center space-x-2"> <span className="font-semibold">Nodes:</span> <span className="text-purple-300">14,892</span> </div> <div className="flex items-center space-x-2"> <span className="font-semibold">Clusters:</span> <span className="text-green-300">327</span> </div> <div className="ml-auto flex space-x-2 text-gray-400"> <button className="p-1 rounded hover:bg-blue-700/30">[SearchIcon]</button> <button className="p-1 rounded hover:bg-blue-700/30">[SettingsIcon]</button> </div> </header> {/* Map and right panel */} <section className="flex flex-1 overflow-hidden"> {/* Map Canvas */} <div className="relative flex-1 bg-gradient-radial from-[#121a2b] to-[#05070a] border border-blue-600/30 shadow-lg"> <div className="absolute inset-0 flex flex-col items-center justify-center"> <div className="text-6xl text-blue-400 mb-4">🌌</div> <p className="text-gray-500">Loading cosmic knowledge...</p> </div> {/* Controls */} <div className="absolute bottom-4 left-4 bg-gray-900/80 border border-blue-600/30 rounded-md p-2 flex space-x-1"> <button className="p-1 rounded hover:bg-blue-700/30">[ZoomInIcon]</button> <button className="p-1 rounded hover:bg-blue-700/30">[ZoomOutIcon]</button> <button className="p-1 rounded hover:bg-blue-700/30">[MaximizeIcon]</button> </div> {/* Depth filter */} <div className="absolute top-4 right-4 bg-gray-900/80 border border-blue-600/30 rounded-md p-3 w-48 text-xs text-blue-400"> <h3 className="font-semibold mb-2">Depth Filter</h3> <input type="range" min="1" max="10" value="7" readOnly className="w-full h-1 bg-gray-700 rounded-lg cursor-pointer" /> <div className="flex justify-between mt-1 text-gray-400"> <span>Surface</span> <span>Core</span> </div> </div> </div> {/* Right Panel */} <aside className="w-80 bg-gray-900/50 border border-blue-600/30 shadow-lg flex flex-col"> {/* Node Detail */} <div className="p-4 border-b border-blue-600/30 space-y-4"> <h2 className="text-sm font-semibold text-blue-400">Node Details</h2> <div> <div className="flex justify-between text-xs mb-1"> <span>Entity</span> <span>Quantum Entanglement Principle</span> </div> </div> <div> <div className="flex justify-between text-xs mb-1"> <span>Confidence</span> <span>84%</span> </div> <div className="w-full bg-gray-700 rounded-full h-1"> <div className="bg-blue-400 h-1 rounded-full" style={{ width: '84%' }}></div> </div> </div> <div> <div className="flex justify-between text-xs mb-1"> <span>Depth</span> <span>Stratum VII</span> </div> </div> <div> <div className="flex justify-between text-xs mb-1"> <span>Connected Nodes</span> <span>23</span> </div> </div> </div> {/* Related Clusters */} <div className="p-4 border-b border-blue-600/30 flex-1 overflow-y-auto"> <h2 className="text-sm font-semibold text-blue-400 mb-2">Related Clusters</h2> <div className="p-2 mb-2 rounded-md bg-blue-900/50 text-blue-200 cursor-pointer hover:bg-opacity-80"> <div className="flex justify-between text-xs"> <span>Quantum Foundations</span> <span>12 nodes</span> </div> </div> <div className="p-2 mb-2 rounded-md bg-purple-900/50 text-purple-200 cursor-pointer hover:bg-opacity-80"> <div className="flex justify-between text-xs"> <span>Entanglement Applications</span> <span>8 nodes</span> </div> </div> <div className="p-2 mb-2 rounded-md bg-green-900/50 text-green-200 cursor-pointer hover:bg-opacity-80"> <div className="flex justify-between text-xs"> <span>Theoretical Physics</span> <span>15 nodes</span> </div> </div> </div> {/* Cluster Insights */} <div className="p-4 text-xs text-blue-400"> <h2 className="font-semibold mb-2">Cluster Insights</h2> <p>Coming soon...</p> </div> </aside> </section> </main> </div> - Follow Up Deployment
8b98e18 verified
Raw History Blame Contribute Delete
17.4 kB
function CosmicKnowledgeMap() {
return (
<>
<Head>
<title>Cosmic Knowledge Map</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
{`
body {
font-family: 'Space Grotesk', sans-serif;
}
.cosmic-border {
border: 1px solid rgba(64, 114, 203, 0.3);
box-shadow: 0 0 15px rgba(64, 114, 203, 0.2);
}
`}
</style>
</Head>
<KnowledgeMapApp />
</>
);
}
// Wrap the app for Next.js compatibility
export default function KnowledgeMapPage() {
return <CosmicKnowledgeMap />;
}
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cosmic Knowledge Map</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Space Grotesk', sans-serif;
background: radial-gradient(circle at center, #0a0e17 0%, #020204 100%);
color: #e0e0e0;
}
.cosmic-border {
border: 1px solid rgba(64, 114, 203, 0.3);
box-shadow: 0 0 15px rgba(64, 114, 203, 0.2);
}
.node-glow {
box-shadow: 0 0 10px 2px rgba(64, 114, 203, 0.5);
}
.cluster-glow {
box-shadow: 0 0 20px 5px rgba(101, 64, 203, 0.4);
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 0.7; }
50% { opacity: 1; }
100% { opacity: 0.7; }
}
#mapCanvas {
background: radial-gradient(circle at center, #121a2b 0%, #05070a 100%);
}
</style>
</head>
<!-- Active Agents -->
<div class="p-4 border-b cosmic-border">
<h2 class="text-sm font-semibold text-blue-200 mb-2 flex items-center">
<i data-feather="users" class="mr-2 w-4 h-4"></i>
Active Agents
</h2>
<div class="space-y-2">
<div class="flex items-center text-xs">
<div class="w-2 h-2 rounded-full bg-green-400 mr-2 pulse-animation"></div>
<span>Exploration Agent</span>
</div>
<div class="flex items-center text-xs">
<div class="w-2 h-2 rounded-full bg-purple-400 mr-2"></div>
<span>Cluster Analyzer</span>
</div>
<div class="flex items-center text-xs">
<div class="w-2 h-2 rounded-full bg-yellow-400 mr-2"></div>
<span>Confidence Scorer</span>
</div>
</div>
</div>
<!-- Pulse Feedback -->
<div class="p-4 flex-1">
<h2 class="text-sm font-semibold text-blue-200 mb-2 flex items-center">
<i data-feather="activity" class="mr-2 w-4 h-4"></i>
Pulse Feedback
</h2>
<div class="space-y-3">
<div>
<div class="flex justify-between text-xs mb-1">
<span>Knowledge Density</span>
<span>78%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-1.5">
<div class="bg-blue-400 h-1.5 rounded-full" style="width: 78%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-xs mb-1">
<span>Cluster Stability</span>
<span>92%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-1.5">
<div class="bg-purple-400 h-1.5 rounded-full" style="width: 92%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-xs mb-1">
<span>Edge Confidence</span>
<span>65%</span>
</div>
<div class="w-full bg-gray-700 rounded-full h-1.5">
<div class="bg-green-400 h-1.5 rounded-full" style="width: 65%"></div>
</div>
</div>
</div>
</div>
<div class="p-4 border-t cosmic-border">
<button class="w-full bg-blue-900/50 hover:bg-blue-900/70 text-blue-200 py-2 px-4 rounded-md text-sm flex items-center justify-center">
<i data-feather="layers" class="mr-2 w-4 h-4"></i>
New Exploration
</button>
</div>
</div>
<!-- Main Content -->
<div class="flex-1 flex flex-col">
<!-- Top Bar -->
<div class="h-12 bg-gray-900/50 cosmic-border flex items-center px-4">
<div class="flex items-center space-x-4">
<div class="flex items-center text-sm">
<span class="text-gray-400 mr-2">Layer:</span>
<span class="text-blue-300">Stratum VII</span>
</div>
<div class="flex items-center text-sm">
<span class="text-gray-400 mr-2">Nodes:</span>
<span class="text-purple-300">14,892</span>
</div>
<div class="flex items-center text-sm">
<span class="text-gray-400 mr-2">Clusters:</span>
<span class="text-green-300">327</span>
</div>
</div>
<div class="ml-auto flex items-center space-x-2">
<button class="p-1 rounded-md hover:bg-gray-800">
<i data-feather="search" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="p-1 rounded-md hover:bg-gray-800">
<i data-feather="settings" class="w-4 h-4 text-gray-400"></i>
</button>
</div>
</div>
<!-- Main Panel -->
<div class="flex-1 flex overflow-hidden">
<!-- Map Canvas -->
<div class="flex-1 relative">
<div id="mapCanvas" class="w-full h-full cosmic-border">
<!-- This would be replaced with actual canvas/SVG rendering -->
<div class="absolute inset-0 flex items-center justify-center">
<div class="text-center">
<div class="text-4xl mb-4 text-blue-300">🌌</div>
<p class="text-gray-400">Loading cosmic knowledge...</p>
</div>
</div>
</div>
<!-- Layer Controls -->
<div class="absolute bottom-4 left-4 bg-gray-900/80 cosmic-border rounded-md p-2">
<div class="flex space-x-1">
<button class="p-2 rounded hover:bg-gray-800">
<i data-feather="zoom-in" class="w-4 h-4"></i>
</button>
<button class="p-2 rounded hover:bg-gray-800">
<i data-feather="zoom-out" class="w-4 h-4"></i>
</button>
<button class="p-2 rounded hover:bg-gray-800">
<i data-feather="maximize" class="w-4 h-4"></i>
</button>
</div>
</div>
<!-- Depth Filter -->
<div class="absolute top-4 right-4 bg-gray-900/80 cosmic-border rounded-md p-3 w-48">
<h3 class="text-xs font-semibold text-blue-200 mb-2">Depth Filter</h3>
<input type="range" min="1" max="10" value="7" class="w-full h-1 bg-gray-700 rounded-lg appearance-none cursor-pointer">
<div class="flex justify-between text-xs mt-1">
<span class="text-gray-400">Surface</span>
<span class="text-gray-400">Core</span>
</div>
</div>
</div>
<!-- Right Panel -->
<div class="w-80 bg-gray-900/50 cosmic-border flex flex-col">
<!-- Node Detail Panel -->
<div class="p-4 border-b cosmic-border">
<h2 class="text-sm font-semibold text-blue-200 mb-2">Node Details</h2>
<div class="space-y-4">
<div>
<div class="text-xs text-gray-400 mb-1">Entity</div>
<div class="text-sm font-medium">Quantum Entanglement Principle</div>
</div>
<div>
<div class="text-xs text-gray-400 mb-1">Confidence</div>
<div class="flex items-center">
<div class="w-full bg-gray-700 rounded-full h-1.5 mr-2">
<div class="bg-blue-400 h-1.5 rounded-full" style="width: 84%"></div>
</div>
<span class="text-xs">84%</span>
</div>
</div>
<div>
<div class="text-xs text-gray-400 mb-1">Depth</div>
<div class="text-sm">Stratum VII</div>
</div>
<div>
<div class="text-xs text-gray-400 mb-1">Connected Nodes</div>
<div class="text-sm">23</div>
</div>
</div>
</div>
<!-- Related Clusters -->
<div class="p-4 border-b cosmic-border flex-1">
<h2 class="text-sm font-semibold text-blue-200 mb-2">Related Clusters</h2>
<div class="space-y-2">
<div class="p-2 bg-gray-800/50 rounded-md hover:bg-gray-800 cursor-pointer">
<div class="flex justify-between items-center">
<span class="text-sm">Quantum Foundations</span>
<span class="text-xs bg-blue-900/50 text-blue-200 px-2 py-0.5 rounded-full">12 nodes</span>
</div>
</div>
<div class="p-2 bg-gray-800/50 rounded-md hover:bg-gray-800 cursor-pointer">
<div class="flex justify-between items-center">
<span class="text-sm">Entanglement Applications</span>
<span class="text-xs bg-purple-900/50 text-purple-200 px-2 py-0.5 rounded-full">8 nodes</span>
</div>
</div>
<div class="p-2 bg-gray-800/50 rounded-md hover:bg-gray-800 cursor-pointer">
<div class="flex justify-between items-center">
<span class="text-sm">Theoretical Physics</span>
<span class="text-xs bg-green-900/50 text-green-200 px-2 py-0.5 rounded-full">15 nodes</span>
</div>
</div>
</div>
</div>
<!-- Analytics -->
<div class="p-4">
<h2 class="text-sm font-semibold text-blue-200 mb-2">Cluster Insights</h2>
<div class="space-y-3">
<div>
<div class="text-xs text-gray-400 mb-1">Density</div>
<div class="flex items-center">
<div class="w-full bg-gray-700 rounded-full h-1.5 mr-2">
<div class="bg-purple-400 h-1.5 rounded-full" style="width: 68%"></div>
</div>
<span class="text-xs">68%</span>
</div>
</div>
<div>
<div class="text-xs text-gray-400 mb-1">Novelty</div>
<div class="flex items-center">
<div class="w-full bg-gray-700 rounded-full h-1.5 mr-2">
<div class="bg-yellow-400 h-1.5 rounded-full" style="width: 42%"></div>
</div>
<span class="text-xs">42%</span>
</div>
</div>
<div>
<div class="text-xs text-gray-400 mb-1">Stability</div>
<div class="flex items-center">
<div class="w-full bg-gray-700 rounded-full h-1.5 mr-2">
<div class="bg-green-400 h-1.5 rounded-full" style="width: 91%"></div>
</div>
<span class="text-xs">91%</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize feather icons
feather.replace();
// Mock API calls
async function fetchNodes() {
// Placeholder for GET /nodes
console.log("Fetching nodes from API...");
return [];
}
async function fetchClusters() {
// Placeholder for GET /clusters
console.log("Fetching clusters from API...");
return [];
}
async function fetchNodeDetails(nodeId) {
// Placeholder for GET /nodes/{id}
console.log(`Fetching details for node ${nodeId}...`);
return {};
}
async function runClusterAnalysis() {
// Placeholder for POST /analytics/clustering
console.log("Running cluster analysis...");
return { status: "queued" };
}
// Initialize the application
document.addEventListener('DOMContentLoaded', () => {
fetchNodes();
fetchClusters();
// This would be replaced with actual map rendering logic
setTimeout(() => {
document.querySelector('#mapCanvas').innerHTML = `
<div class="absolute inset-0">
<!-- Example cluster -->
<div class="absolute top-1/4 left-1/3 w-32 h-32 rounded-full bg-purple-900/20 cluster-glow border border-purple-500/30 flex items-center justify-center cursor-pointer">
<div class="text-xs text-purple-200">Quantum Physics</div>
</div>
<!-- Example node -->
<div class="absolute top-1/2 left-1/2 w-8 h-8 rounded-full bg-blue-500/80 node-glow border border-blue-300 cursor-pointer"></div>
</div>
`;
}, 1500);
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=archvilefilth/cosmic-knowledge" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>