diff --git a/src/components/KnowledgeGraph.astro b/src/components/KnowledgeGraph.astro index 9c0a669..e795ffc 100644 --- a/src/components/KnowledgeGraph.astro +++ b/src/components/KnowledgeGraph.astro @@ -2,9 +2,6 @@ // src/components/KnowledgeGraph.astro // Interactive visualization of content connections using Cytoscape.js -// Assuming Cytoscape is loaded via CDN in BaseLayout or globally -// If not, you might need: import cytoscape from 'cytoscape'; - export interface GraphNode { id: string; label: string; @@ -34,7 +31,7 @@ const { graphData, height = "60vh" } = Astro.props; // Generate colors based on categories for nodes const uniqueCategories = [...new Set(graphData.nodes.map(node => node.category || 'Uncategorized'))]; const categoryColors = {}; -const predefinedColors = { /* Colors from previous step */ +const predefinedColors = { 'Kubernetes': '#326CE5', 'Docker': '#2496ED', 'DevOps': '#FF6F61', 'Homelab': '#06B6D4', 'Networking': '#9333EA', 'Infrastructure': '#10B981', 'Automation': '#F59E0B', 'Security': '#EF4444', 'Monitoring': '#6366F1', @@ -67,8 +64,11 @@ graphData.nodes.forEach(node => { }); --- + + +