Update requirements and enhance mindmap UI: Comment out Pillow dependency, add network background script, and implement new styles and animations for improved visual effects in the mindmap template.

This commit is contained in:
2025-04-25 21:30:35 +01:00
parent 84b492d8d2
commit ab280b55af
10 changed files with 636 additions and 105 deletions

View File

@@ -22,6 +22,52 @@
width: 100%;
}
/* Neuronales Netz / Universum Hintergrund */
.neural-universe-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(ellipse at center, rgba(30, 20, 60, 0.7) 0%, rgba(10, 10, 25, 0.9) 100%);
z-index: -1;
overflow: hidden;
}
.neural-universe-bg::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image:
radial-gradient(circle at 20% 30%, rgba(179, 143, 255, 0.15) 0%, transparent 25%),
radial-gradient(circle at 80% 20%, rgba(88, 169, 255, 0.1) 0%, transparent 20%),
radial-gradient(circle at 40% 80%, rgba(20, 184, 166, 0.12) 0%, transparent 30%),
radial-gradient(circle at 70% 65%, rgba(139, 92, 246, 0.08) 0%, transparent 25%);
z-index: -1;
}
.neural-universe-bg::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.3)"/></svg>');
background-size: 200px 200px;
opacity: 0.4;
z-index: -1;
animation: twinkling 8s infinite linear;
}
@keyframes twinkling {
from { transform: rotate(0deg) scale(1); }
to { transform: rotate(360deg) scale(1.2); }
}
/* Verbesserte Glasmorphismus-Stile für Karten */
.glass-card, .mindmap-card {
background: rgba(24, 28, 45, 0.75);
@@ -91,6 +137,44 @@
letter-spacing: 0.3px;
}
/* Visuelle Trennung für den unteren Bereich */
.visual-divider {
position: relative;
height: 6px;
width: 100%;
background: linear-gradient(90deg,
transparent 0%,
rgba(179, 143, 255, 0.8) 20%,
rgba(88, 169, 255, 0.8) 50%,
rgba(179, 143, 255, 0.8) 80%,
transparent 100%);
margin: 2rem 0;
box-shadow: 0 0 15px rgba(179, 143, 255, 0.5);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.visual-divider::before, .visual-divider::after {
content: "";
position: absolute;
height: 1px;
width: 100%;
background: linear-gradient(90deg,
transparent 0%,
rgba(255, 255, 255, 0.3) 20%,
rgba(255, 255, 255, 0.5) 50%,
rgba(255, 255, 255, 0.3) 80%,
transparent 100%);
}
.visual-divider::before {
top: -10px;
}
.visual-divider::after {
bottom: -10px;
}
/* Mindmap-Header */
.mindmap-header {
background: rgba(20, 24, 42, 0.85);
@@ -401,113 +485,167 @@
html.light .mindmap-card-footer {
border-color: rgba(0, 0, 0, 0.06);
}
/* Animation für die Verbindungen im Mindmap */
.link {
stroke-dasharray: 5;
animation: dash 30s linear infinite;
stroke-width: 2.5px;
}
@keyframes dash {
to {
stroke-dashoffset: 1000;
}
}
/* Move the selection panel more to the left */
.thoughts-panel {
left: 20px !important; /* Changed from right: 20px */
width: 350px !important; /* Increased from 300px for better visibility */
background: rgba(24, 28, 45, 0.85) !important; /* More visible background */
border: 1px solid rgba(179, 143, 255, 0.3) !important; /* Accent colored border */
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important; /* Stronger shadow */
}
/* Mindmap container with network background */
#mindmap-container::before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('/static/network-bg.jpg');
background-size: cover;
background-position: center;
opacity: 0.2;
z-index: -1;
animation: pulse 10s ease-in-out infinite alternate;
pointer-events: none;
}
@keyframes pulse {
0% { opacity: 0.1; transform: scale(1); }
100% { opacity: 0.3; transform: scale(1.05); }
}
/* Enhance node visibility */
.node circle {
stroke-width: 3px !important;
filter: drop-shadow(0 0 8px rgba(179, 143, 255, 0.5)) !important;
}
.node.selected circle {
stroke: rgba(179, 143, 255, 0.9) !important;
stroke-width: 4px !important;
filter: drop-shadow(0 0 15px rgba(179, 143, 255, 0.8)) !important;
}
/* Improve visibility of node labels */
.node-label {
font-weight: 700 !important;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9) !important;
filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.8)) !important;
}
/* Make connections more visible */
.link {
stroke: rgba(179, 143, 255, 0.6) !important;
stroke-width: 2.5px !important;
filter: drop-shadow(0 0 5px rgba(179, 143, 255, 0.4)) !important;
}
.link.highlighted {
stroke: rgba(88, 169, 255, 0.8) !important;
stroke-width: 4px !important;
filter: drop-shadow(0 0 8px rgba(88, 169, 255, 0.6)) !important;
}
</style>
{% endblock %}
{% block content %}
<div class="container mx-auto px-4 py-12">
<!-- Feature-Karten-Container -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-8 mb-12">
<!-- Feature-Karte 1: Visualisiere Wissen -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-brain"></i>
</div>
<h3>Visualisiere Wissen</h3>
<p>Sieh Wissen als vernetztes System, entdecke Zusammenhänge und erkenne überraschende Verbindungen zwischen verschiedenen Themengebieten.</p>
<div class="relative overflow-hidden">
<!-- Neuronales Netz / Universum Hintergrund -->
<div class="neural-universe-bg"></div>
<div class="container mx-auto px-4 py-8">
<!-- Mindmap-Visualisierung Header -->
<div class="mindmap-header p-6 mb-6">
<h2 class="text-3xl font-bold gradient-text">Wissenslandschaft erkunden</h2>
<p class="text-gray-300 mb-0">Interagiere mit der Mindmap, um Verbindungen zu entdecken und neue Ideen hinzuzufügen</p>
</div>
<!-- Feature-Karte 2: Teile Gedanken -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-lightbulb"></i>
</div>
<h3>Teile Gedanken</h3>
<p>Füge deine eigenen Ideen und Perspektiven hinzu. Erstelle Verbindungen zu vorhandenen Gedanken und bereichere die wachsende Wissensbasis.</p>
</div>
<!-- Feature-Karte 3: Community -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-users"></i>
</div>
<h3>Community</h3>
<p>Sei Teil einer Gemeinschaft, die gemeinsam ein verteiltes Wissensarchiv aufbaut und sich in thematisch fokussierten Bereichen austauscht.</p>
</div>
</div>
<!-- Mindmap-Visualisierung Header -->
<div class="mindmap-header p-6 mb-6">
<h2 class="text-3xl font-bold mb-2 gradient-text">Wissenslandschaft erkunden</h2>
<p class="text-gray-300 mb-0">Interagiere mit der Mindmap, um Verbindungen zu entdecken und neue Ideen hinzuzufügen</p>
</div>
<!-- Mindmap-Container -->
<div class="glass-card overflow-hidden mb-12">
<div id="mindmap-container" class="relative" style="height: 70vh; min-height: 500px;">
<!-- Lade-Overlay -->
<div class="mindmap-loading absolute inset-0 flex items-center justify-center z-10" style="background: rgba(14, 18, 32, 0.7); backdrop-filter: blur(5px);">
<div class="text-center">
<div class="inline-block animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-purple-500 mb-4"></div>
<p class="text-white text-lg">Wissenslandschaft wird geladen...</p>
<div class="w-64 h-2 bg-gray-700 rounded-full mt-4 overflow-hidden">
<div class="loading-progress h-full bg-gradient-to-r from-purple-500 to-blue-500 rounded-full" style="width: 0%"></div>
<!-- Mindmap-Container - Jetzt größer -->
<div class="glass-card overflow-hidden mb-12">
<div id="mindmap-container" class="relative" style="height: 80vh; min-height: 700px;">
<!-- Lade-Overlay -->
<div class="mindmap-loading absolute inset-0 flex items-center justify-center z-10" style="background: rgba(14, 18, 32, 0.7); backdrop-filter: blur(5px);">
<div class="text-center">
<div class="inline-block animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-purple-500 mb-4"></div>
<p class="text-white text-lg">Wissenslandschaft wird geladen...</p>
<div class="w-64 h-2 bg-gray-700 rounded-full mt-4 overflow-hidden">
<div class="loading-progress h-full bg-gradient-to-r from-purple-500 to-blue-500 rounded-full" style="width: 0%"></div>
</div>
</div>
</div>
</div>
<!-- Steuerungsleiste -->
<div class="controls-bar p-4 flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-wrap gap-2">
<button class="control-btn" id="zoom-in-btn">
<i class="fas fa-search-plus mr-1"></i> Vergrößern
</button>
<button class="control-btn" id="zoom-out-btn">
<i class="fas fa-search-minus mr-1"></i> Verkleinern
</button>
<button class="control-btn" id="center-btn">
<i class="fas fa-bullseye mr-1"></i> Zentrieren
</button>
</div>
<div class="flex flex-wrap gap-2">
<button class="control-btn" id="add-thought-btn">
<i class="fas fa-plus-circle mr-1"></i> Gedanke hinzufügen
</button>
<button class="control-btn" id="connect-btn">
<i class="fas fa-link mr-1"></i> Verbinden
</button>
</div>
</div>
</div>
<!-- Steuerungsleiste -->
<div class="controls-bar p-4 flex flex-wrap items-center justify-between gap-3">
<div class="flex flex-wrap gap-2">
<button class="control-btn" id="zoom-in-btn">
<i class="fas fa-search-plus mr-1"></i> Vergrößern
</button>
<button class="control-btn" id="zoom-out-btn">
<i class="fas fa-search-minus mr-1"></i> Verkleinern
</button>
<button class="control-btn" id="center-btn">
<i class="fas fa-bullseye mr-1"></i> Zentrieren
</button>
</div>
<div class="flex flex-wrap gap-2">
<button class="control-btn" id="add-thought-btn">
<i class="fas fa-plus-circle mr-1"></i> Gedanke hinzufügen
</button>
<button class="control-btn" id="connect-btn">
<i class="fas fa-link mr-1"></i> Verbinden
</button>
</div>
</div>
</div>
<!-- Visuelle Trennung -->
<div class="visual-divider"></div>
<!-- Unterer Bereich: KI-Assistenz, Suche und Lernpfade -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- KI-Assistenz -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-robot"></i>
<!-- Unterer Bereich: KI-Assistenz, Suche und Lernpfade -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
<!-- KI-Assistenz -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-robot"></i>
</div>
<h3>KI-Assistenz</h3>
<p>Lass dir von künstlicher Intelligenz helfen, neue Zusammenhänge zu entdecken, Inhalte zusammenzufassen und Fragen zu beantworten.</p>
</div>
<h3>KI-Assistenz</h3>
<p>Lass dir von künstlicher Intelligenz helfen, neue Zusammenhänge zu entdecken, Inhalte zusammenzufassen und Fragen zu beantworten.</p>
</div>
<!-- Intelligente Suche -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-search"></i>
<!-- Intelligente Suche -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-search"></i>
</div>
<h3>Intelligente Suche</h3>
<p>Finde genau die Informationen, die du suchst, mit fortschrittlichen Such- und Filterfunktionen für eine präzise Navigation durch das Wissen.</p>
</div>
<h3>Intelligente Suche</h3>
<p>Finde genau die Informationen, die du suchst, mit fortschrittlichen Such- und Filterfunktionen für eine präzise Navigation durch das Wissen.</p>
</div>
<!-- Geführte Pfade -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-map-signs"></i>
<!-- Geführte Pfade -->
<div class="feature-card">
<div class="feature-card-icon">
<i class="fas fa-map-signs"></i>
</div>
<h3>Geführte Pfade</h3>
<p>Folge kuratierten Lernpfaden durch komplexe Themen oder erschaffe selbst Routen für andere, die deinen Gedankengängen folgen möchten.</p>
</div>
<h3>Geführte Pfade</h3>
<p>Folge kuratierten Lernpfaden durch komplexe Themen oder erschaffe selbst Routen für andere, die deinen Gedankengängen folgen möchten.</p>
</div>
</div>
</div>
@@ -523,9 +661,73 @@
<script src="{{ url_for('static', filename='d3-extensions.js') }}"></script>
<!-- Mindmap JS -->
<script src="{{ url_for('static', filename='mindmap.js') }}"></script>
<script src="{{ url_for('static', filename='network-animation.js') }}"></script>
<script>
// Dynamische Neuronen-Netz-Animation im Hintergrund
document.addEventListener('DOMContentLoaded', function() {
// Animation des neuronalen Netzwerks hinzufügen
const neuralBg = document.querySelector('.neural-universe-bg');
// Neuronenpunkte erstellen
const neuronCount = 100;
for (let i = 0; i < neuronCount; i++) {
const neuron = document.createElement('div');
neuron.className = 'neuron-point';
// Zufällige Position
const posX = Math.random() * 100;
const posY = Math.random() * 100;
const size = Math.random() * 3 + 1;
const animDuration = Math.random() * 50 + 20;
// Styling mit Glasmorphismus
neuron.style.cssText = `
position: absolute;
left: ${posX}%;
top: ${posY}%;
width: ${size}px;
height: ${size}px;
background: rgba(255, 255, 255, ${Math.random() * 0.3 + 0.1});
border-radius: 50%;
filter: blur(${Math.random() * 1}px);
box-shadow: 0 0 ${Math.random() * 10 + 5}px rgba(179, 143, 255, 0.5);
animation: pulse ${animDuration}s infinite alternate ease-in-out;
`;
neuralBg.appendChild(neuron);
}
// Verbindungen zwischen Neuronen erstellen
const connectionCount = 40;
for (let i = 0; i < connectionCount; i++) {
const connection = document.createElement('div');
connection.className = 'neuron-connection';
// Zufällige Position und Rotation für Verbindungen
const posX = Math.random() * 100;
const posY = Math.random() * 100;
const width = Math.random() * 150 + 50;
const height = Math.random() * 1 + 0.5;
const rotation = Math.random() * 360;
const opacity = Math.random() * 0.2 + 0.05;
const animDuration = Math.random() * 20 + 10;
connection.style.cssText = `
position: absolute;
left: ${posX}%;
top: ${posY}%;
width: ${width}px;
height: ${height}px;
background: linear-gradient(90deg, transparent, rgba(179, 143, 255, ${opacity}), transparent);
transform: rotate(${rotation}deg);
animation: flash ${animDuration}s infinite alternate ease-in-out;
opacity: ${opacity};
`;
neuralBg.appendChild(connection);
}
// Initialisiere die Mindmap-Visualisierung
const mindmapContainer = document.getElementById('mindmap-container');
const containerWidth = mindmapContainer.clientWidth;
@@ -658,5 +860,21 @@
}
});
});
// Animationen für die Hintergrundeffekte
document.head.insertAdjacentHTML('beforeend', `
<style>
@keyframes pulse {
0% { transform: scale(1); opacity: 0.5; }
100% { transform: scale(1.5); opacity: 0.2; }
}
@keyframes flash {
0% { opacity: 0.02; }
50% { opacity: 0.2; }
100% { opacity: 0.08; }
}
</style>
`);
</script>
{% endblock %}