🎨 style: update base styles and background for improved UI consistency
This commit is contained in:
@@ -545,27 +545,35 @@ body:not(.dark) .card:hover {
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
/* Light Mode Buttons */
|
||||
/* Light Mode Buttons mit verbesserter Lesbarkeit */
|
||||
body:not(.dark) .btn-primary {
|
||||
background-color: var(--light-primary);
|
||||
background: linear-gradient(135deg, var(--light-primary), var(--light-primary-hover));
|
||||
color: white;
|
||||
border: none;
|
||||
transition: all 0.2s ease;
|
||||
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
|
||||
font-weight: 500;
|
||||
letter-spacing: 0.01em;
|
||||
}
|
||||
|
||||
body:not(.dark) .btn-primary:hover {
|
||||
background-color: var(--light-primary-hover);
|
||||
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
|
||||
background: linear-gradient(135deg, var(--light-primary-hover), var(--light-primary));
|
||||
box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
body:not(.dark) .btn-secondary {
|
||||
background-color: #f3f4f6;
|
||||
background: linear-gradient(135deg, #f8fafc, #f1f5f9);
|
||||
color: var(--light-text);
|
||||
border: 1px solid #e5e7eb;
|
||||
font-weight: 500;
|
||||
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
body:not(.dark) .btn-secondary:hover {
|
||||
background-color: #e5e7eb;
|
||||
background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
|
||||
border-color: #d1d5db;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
body:not(.dark) .btn-outline {
|
||||
|
||||
@@ -41,14 +41,28 @@ class NeuralNetworkBackground {
|
||||
this.animationFrameId = null;
|
||||
this.isDestroying = false;
|
||||
|
||||
// Farben - Lila Farbpalette
|
||||
// Farben für Dark/Light Mode
|
||||
this.colors = {
|
||||
background: '#040215',
|
||||
nodeColor: '#6a5498',
|
||||
nodePulse: '#9c7fe0',
|
||||
connectionColor: '#4a3870',
|
||||
flowColor: '#b47fea'
|
||||
dark: {
|
||||
background: '#040215',
|
||||
nodeColor: '#6a5498',
|
||||
nodePulse: '#9c7fe0',
|
||||
connectionColor: '#4a3870',
|
||||
flowColor: '#b47fea'
|
||||
},
|
||||
light: {
|
||||
background: '#f8f9fc',
|
||||
nodeColor: '#8c6db5',
|
||||
nodePulse: '#b094dd',
|
||||
connectionColor: '#9882bd',
|
||||
flowColor: '#7d5bb5'
|
||||
}
|
||||
};
|
||||
|
||||
// Aktuelle Farbpalette basierend auf Theme
|
||||
this.currentColors = document.documentElement.classList.contains('dark')
|
||||
? this.colors.dark
|
||||
: this.colors.light;
|
||||
|
||||
// Konfiguration
|
||||
this.config = {
|
||||
@@ -266,7 +280,11 @@ class NeuralNetworkBackground {
|
||||
}
|
||||
|
||||
render(now) {
|
||||
const colors = this.colors;
|
||||
// Aktualisiere Farben basierend auf aktuellem Theme
|
||||
this.currentColors = document.documentElement.classList.contains('dark')
|
||||
? this.colors.dark
|
||||
: this.colors.light;
|
||||
const colors = this.currentColors;
|
||||
const width = this.canvas.width / (window.devicePixelRatio || 1);
|
||||
const height = this.canvas.height / (window.devicePixelRatio || 1);
|
||||
|
||||
@@ -386,7 +404,12 @@ class NeuralNetworkBackground {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
window.neuralBackground = new NeuralNetworkBackground();
|
||||
|
||||
// Sicherstellen, dass die Seite immer im Dark Mode ist
|
||||
document.documentElement.classList.add('dark');
|
||||
document.body.classList.add('dark');
|
||||
// Theme-Wechsel-Event-Listener
|
||||
document.addEventListener('theme-changed', () => {
|
||||
if (window.neuralBackground) {
|
||||
window.neuralBackground.currentColors = document.documentElement.classList.contains('dark')
|
||||
? window.neuralBackground.colors.dark
|
||||
: window.neuralBackground.colors.light;
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user