📝 feat(database): Refactor database files and remove unnecessary CSS/JS files
This commit is contained in:
@@ -1,526 +0,0 @@
|
||||
/**
|
||||
* Mercedes-Benz MYP Platform - Responsive Verbesserungen & Problembehebung
|
||||
* Entfernt eckige Hintergründe und verbessert Responsivität
|
||||
*/
|
||||
|
||||
/* Globale Überschreibungen für problematische Hintergründe */
|
||||
* {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Erlaubte Hintergründe explizit definieren */
|
||||
body,
|
||||
html {
|
||||
background: #f8fafc !important;
|
||||
}
|
||||
|
||||
.dark body,
|
||||
.dark html {
|
||||
background: #000000 !important;
|
||||
}
|
||||
|
||||
/* Mercedes Professional Overrides */
|
||||
.bg-professional,
|
||||
.professional-hero,
|
||||
.professional-container,
|
||||
.mb-glass,
|
||||
.card-professional,
|
||||
.stat-card {
|
||||
background: #f8fafc !important;
|
||||
border-radius: 2rem !important;
|
||||
}
|
||||
|
||||
.dark .bg-professional,
|
||||
.dark .professional-hero,
|
||||
.dark .professional-container,
|
||||
.dark .mb-glass,
|
||||
.dark .card-professional,
|
||||
.dark .stat-card {
|
||||
background: #111111 !important;
|
||||
border-color: #333333 !important;
|
||||
}
|
||||
|
||||
/* Entferne alle eckigen Hintergründe mit problematischen Farben */
|
||||
[style*="#182031"],
|
||||
[style*="#d5d7d8"],
|
||||
[style*="rgb(24, 32, 49)"],
|
||||
[style*="rgb(213, 215, 216)"] {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Navbar und Navigation - Responsive */
|
||||
.navbar {
|
||||
background: rgba(255, 255, 255, 0.95) !important;
|
||||
backdrop-filter: blur(20px) !important;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.dark .navbar {
|
||||
background: rgba(0, 0, 0, 0.95) !important;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
|
||||
/* Responsive Typography */
|
||||
@media (max-width: 640px) {
|
||||
.title-professional {
|
||||
font-size: 2.5rem !important;
|
||||
line-height: 1.1 !important;
|
||||
}
|
||||
|
||||
.subtitle-professional {
|
||||
font-size: 1.125rem !important;
|
||||
line-height: 1.5 !important;
|
||||
}
|
||||
|
||||
.btn-professional {
|
||||
padding: 0.75rem 1.5rem !important;
|
||||
font-size: 0.875rem !important;
|
||||
}
|
||||
|
||||
.professional-container,
|
||||
.mb-glass,
|
||||
.card-professional {
|
||||
padding: 1.5rem !important;
|
||||
margin: 1rem !important;
|
||||
border-radius: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) and (max-width: 768px) {
|
||||
.title-professional {
|
||||
font-size: 3.5rem !important;
|
||||
line-height: 1.1 !important;
|
||||
}
|
||||
|
||||
.subtitle-professional {
|
||||
font-size: 1.25rem !important;
|
||||
line-height: 1.6 !important;
|
||||
}
|
||||
|
||||
.btn-professional {
|
||||
padding: 1rem 2rem !important;
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
|
||||
.professional-container,
|
||||
.mb-glass,
|
||||
.card-professional {
|
||||
padding: 2rem !important;
|
||||
margin: 1.5rem !important;
|
||||
border-radius: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) and (max-width: 1024px) {
|
||||
.title-professional {
|
||||
font-size: 4.5rem !important;
|
||||
line-height: 1.1 !important;
|
||||
}
|
||||
|
||||
.subtitle-professional {
|
||||
font-size: 1.5rem !important;
|
||||
line-height: 1.6 !important;
|
||||
}
|
||||
|
||||
.btn-professional {
|
||||
padding: 1.25rem 2.5rem !important;
|
||||
font-size: 1.125rem !important;
|
||||
}
|
||||
|
||||
.professional-container,
|
||||
.mb-glass,
|
||||
.card-professional {
|
||||
padding: 2.5rem !important;
|
||||
margin: 2rem !important;
|
||||
border-radius: 2rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1025px) {
|
||||
.title-professional {
|
||||
font-size: 6rem !important;
|
||||
line-height: 1.1 !important;
|
||||
}
|
||||
|
||||
.subtitle-professional {
|
||||
font-size: 2rem !important;
|
||||
line-height: 1.6 !important;
|
||||
}
|
||||
|
||||
.btn-professional {
|
||||
padding: 1.5rem 3rem !important;
|
||||
font-size: 1.25rem !important;
|
||||
}
|
||||
|
||||
.professional-container,
|
||||
.mb-glass,
|
||||
.card-professional {
|
||||
padding: 3rem !important;
|
||||
margin: 2rem !important;
|
||||
border-radius: 2rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive Grid Improvements */
|
||||
@media (max-width: 640px) {
|
||||
.grid {
|
||||
grid-template-columns: 1fr !important;
|
||||
gap: 1rem !important;
|
||||
}
|
||||
|
||||
.grid-cols-2 {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
|
||||
.grid-cols-3 {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
|
||||
.grid-cols-4 {
|
||||
grid-template-columns: 1fr !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 641px) and (max-width: 768px) {
|
||||
.grid-cols-3 {
|
||||
grid-template-columns: repeat(2, 1fr) !important;
|
||||
}
|
||||
|
||||
.grid-cols-4 {
|
||||
grid-template-columns: repeat(2, 1fr) !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive Flex Improvements */
|
||||
.flex-col-mobile {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.flex-col-mobile {
|
||||
flex-direction: row !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive Spacing */
|
||||
@media (max-width: 640px) {
|
||||
.space-y-6 > * + * {
|
||||
margin-top: 1rem !important;
|
||||
}
|
||||
|
||||
.space-y-8 > * + * {
|
||||
margin-top: 1.5rem !important;
|
||||
}
|
||||
|
||||
.space-y-12 > * + * {
|
||||
margin-top: 2rem !important;
|
||||
}
|
||||
|
||||
.space-x-6 > * + * {
|
||||
margin-left: 1rem !important;
|
||||
}
|
||||
|
||||
.space-x-8 > * + * {
|
||||
margin-left: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Input Field Responsivität */
|
||||
.input-professional {
|
||||
background: #ffffff !important;
|
||||
border: 2px solid #e2e8f0 !important;
|
||||
border-radius: 1rem !important;
|
||||
padding: 1rem !important;
|
||||
font-size: 1rem !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.dark .input-professional {
|
||||
background: #1a1a1a !important;
|
||||
border-color: #333333 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.input-professional:focus {
|
||||
border-color: #3b82f6 !important;
|
||||
box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1) !important;
|
||||
background: #ffffff !important;
|
||||
}
|
||||
|
||||
.dark .input-professional:focus {
|
||||
background: #222222 !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.input-professional {
|
||||
padding: 0.875rem !important;
|
||||
font-size: 0.875rem !important;
|
||||
border-radius: 0.75rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Alert und Modal Responsivität */
|
||||
.alert-professional {
|
||||
border-radius: 1.5rem !important;
|
||||
padding: 2rem !important;
|
||||
margin-bottom: 2rem !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.alert-professional {
|
||||
padding: 1.5rem !important;
|
||||
margin-bottom: 1.5rem !important;
|
||||
border-radius: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Status Card Responsivität */
|
||||
.status-professional {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
gap: 0.5rem !important;
|
||||
padding: 0.75rem 1rem !important;
|
||||
border-radius: 2rem !important;
|
||||
font-size: 0.875rem !important;
|
||||
font-weight: 700 !important;
|
||||
border: 1px solid transparent !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.status-professional {
|
||||
padding: 0.5rem 0.75rem !important;
|
||||
font-size: 0.75rem !important;
|
||||
border-radius: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Button Responsivität */
|
||||
.btn-professional {
|
||||
display: inline-flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
|
||||
color: white !important;
|
||||
border: none !important;
|
||||
border-radius: 1rem !important;
|
||||
font-weight: 700 !important;
|
||||
text-decoration: none !important;
|
||||
transition: all 0.3s ease !important;
|
||||
box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3) !important;
|
||||
}
|
||||
|
||||
.btn-professional:hover {
|
||||
background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
|
||||
transform: translateY(-2px) !important;
|
||||
box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.btn-professional {
|
||||
width: 100% !important;
|
||||
justify-content: center !important;
|
||||
padding: 1rem 2rem !important;
|
||||
font-size: 1rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hero Header Responsivität */
|
||||
.professional-hero {
|
||||
position: relative !important;
|
||||
overflow: hidden !important;
|
||||
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
|
||||
border: 1px solid #e2e8f0 !important;
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.dark .professional-hero {
|
||||
background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%) !important;
|
||||
border-color: #333333 !important;
|
||||
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
|
||||
}
|
||||
|
||||
/* Mobile Navigation Verbesserungen */
|
||||
@media (max-width: 1024px) {
|
||||
.navbar-menu-new {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.mobile-menu-new {
|
||||
background: rgba(255, 255, 255, 0.95) !important;
|
||||
backdrop-filter: blur(20px) !important;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.dark .mobile-menu-new {
|
||||
background: rgba(0, 0, 0, 0.95) !important;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
}
|
||||
|
||||
.mobile-nav-item {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
padding: 1rem !important;
|
||||
border-radius: 0.75rem !important;
|
||||
color: #64748b !important;
|
||||
text-decoration: none !important;
|
||||
transition: all 0.3s ease !important;
|
||||
}
|
||||
|
||||
.dark .mobile-nav-item {
|
||||
color: #94a3b8 !important;
|
||||
}
|
||||
|
||||
.mobile-nav-item:hover,
|
||||
.mobile-nav-item.active {
|
||||
background: rgba(59, 130, 246, 0.1) !important;
|
||||
color: #3b82f6 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Container Max-Width Responsivität */
|
||||
.max-w-7xl {
|
||||
max-width: 100% !important;
|
||||
padding-left: 1rem !important;
|
||||
padding-right: 1rem !important;
|
||||
}
|
||||
|
||||
@media (min-width: 640px) {
|
||||
.max-w-7xl {
|
||||
padding-left: 1.5rem !important;
|
||||
padding-right: 1.5rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.max-w-7xl {
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 2rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1024px) {
|
||||
.max-w-7xl {
|
||||
max-width: 80rem !important;
|
||||
padding-left: 2rem !important;
|
||||
padding-right: 2rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Entferne alle potentiellen eckigen Standard-Hintergründe */
|
||||
div, section, article, aside, header, footer, main, nav {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Glasmorphism Verbesserungen */
|
||||
.mb-glass {
|
||||
background: rgba(255, 255, 255, 0.9) !important;
|
||||
backdrop-filter: blur(20px) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
|
||||
}
|
||||
|
||||
.dark .mb-glass {
|
||||
background: rgba(17, 17, 17, 0.95) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
|
||||
}
|
||||
|
||||
/* Entfernt alle Standardhintergründe von Browsern */
|
||||
input, textarea, select, button {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
/* Erlaubte Input-Hintergründe */
|
||||
.input-professional,
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="password"],
|
||||
input[type="number"],
|
||||
input[type="datetime-local"],
|
||||
textarea,
|
||||
select {
|
||||
background: #ffffff !important;
|
||||
border: 2px solid #e2e8f0 !important;
|
||||
}
|
||||
|
||||
.dark .input-professional,
|
||||
.dark input[type="text"],
|
||||
.dark input[type="email"],
|
||||
.dark input[type="password"],
|
||||
.dark input[type="number"],
|
||||
.dark input[type="datetime-local"],
|
||||
.dark textarea,
|
||||
.dark select {
|
||||
background: #1a1a1a !important;
|
||||
border-color: #333333 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
/* Animation Verbesserungen */
|
||||
@keyframes fadeInResponsive {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.animate-fade-in {
|
||||
animation: fadeInResponsive 0.6s ease-out !important;
|
||||
}
|
||||
|
||||
.animate-slide-up {
|
||||
animation: fadeInResponsive 0.8s ease-out !important;
|
||||
}
|
||||
|
||||
.animate-scale-in {
|
||||
animation: fadeInResponsive 0.5s ease-out !important;
|
||||
}
|
||||
|
||||
/* Smooth Scrolling */
|
||||
html {
|
||||
scroll-behavior: smooth !important;
|
||||
}
|
||||
|
||||
/* Performance Optimierungen */
|
||||
* {
|
||||
box-sizing: border-box !important;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100% !important;
|
||||
height: auto !important;
|
||||
}
|
||||
|
||||
/* Accessibility Verbesserungen */
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
* {
|
||||
animation-duration: 0.01ms !important;
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* Focus Indicators */
|
||||
button:focus,
|
||||
input:focus,
|
||||
textarea:focus,
|
||||
select:focus,
|
||||
a:focus {
|
||||
outline: 2px solid #3b82f6 !important;
|
||||
outline-offset: 2px !important;
|
||||
}
|
||||
|
||||
/* Entfernt problematische Farben aus allen Elementen */
|
||||
[style*="background-color: #182031"],
|
||||
[style*="background: #182031"],
|
||||
[style*="background-color: #d5d7d8"],
|
||||
[style*="background: #d5d7d8"] {
|
||||
background: transparent !important;
|
||||
background-color: transparent !important;
|
||||
}
|
@@ -1,241 +0,0 @@
|
||||
/**
|
||||
* Mercedes-Benz MYP Platform - Background Fix
|
||||
* Entfernt problematische eckige Hintergründe zur Laufzeit
|
||||
*/
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
// Problematische Farben die entfernt werden sollen
|
||||
const problematicColors = [
|
||||
'#182031',
|
||||
'#d5d7d8',
|
||||
'rgb(24, 32, 49)',
|
||||
'rgb(213, 215, 216)',
|
||||
'rgba(24, 32, 49, 1)',
|
||||
'rgba(213, 215, 216, 1)'
|
||||
];
|
||||
|
||||
// Funktion zum Entfernen problematischer Hintergründe
|
||||
function removeProblematicBackgrounds() {
|
||||
const allElements = document.querySelectorAll('*');
|
||||
|
||||
allElements.forEach(element => {
|
||||
const computedStyle = window.getComputedStyle(element);
|
||||
const backgroundColor = computedStyle.backgroundColor;
|
||||
const backgroundImage = computedStyle.backgroundImage;
|
||||
|
||||
// Prüfe auf problematische Hintergrundfarben
|
||||
problematicColors.forEach(color => {
|
||||
if (backgroundColor.includes(color.replace('#', '')) ||
|
||||
backgroundColor === color ||
|
||||
backgroundImage.includes(color)) {
|
||||
|
||||
console.log('Entferne problematischen Hintergrund:', color, 'von Element:', element);
|
||||
element.style.background = 'transparent';
|
||||
element.style.backgroundColor = 'transparent';
|
||||
element.style.backgroundImage = 'none';
|
||||
}
|
||||
});
|
||||
|
||||
// Spezielle Checks für inline styles
|
||||
const inlineStyle = element.getAttribute('style');
|
||||
if (inlineStyle) {
|
||||
problematicColors.forEach(color => {
|
||||
if (inlineStyle.includes(color)) {
|
||||
console.log('Entferne problematischen Inline-Style:', color, 'von Element:', element);
|
||||
|
||||
// Entferne problematische Farbe aus inline style
|
||||
let newStyle = inlineStyle
|
||||
.replace(new RegExp(`background-color:\\s*${color.replace('#', '\\#')}[^;]*;?`, 'gi'), '')
|
||||
.replace(new RegExp(`background:\\s*${color.replace('#', '\\#')}[^;]*;?`, 'gi'), '')
|
||||
.replace(/background-color:\s*transparent\s*!important\s*;?\s*/gi, '')
|
||||
.trim();
|
||||
|
||||
if (newStyle !== inlineStyle) {
|
||||
element.setAttribute('style', newStyle);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Funktion zum Erzwingen des Mercedes-Designs
|
||||
function enforceDesign() {
|
||||
const isDark = document.documentElement.classList.contains('dark');
|
||||
|
||||
// Haupthintergrund erzwingen
|
||||
document.body.style.background = isDark ? '#000000' : '#f8fafc';
|
||||
document.documentElement.style.background = isDark ? '#000000' : '#f8fafc';
|
||||
|
||||
// Professionelle Container sicherstellen
|
||||
const containers = document.querySelectorAll(
|
||||
'.professional-container, .mb-glass, .card-professional, .bg-professional, .professional-hero'
|
||||
);
|
||||
|
||||
containers.forEach(container => {
|
||||
if (isDark) {
|
||||
container.style.background = '#111111';
|
||||
container.style.borderColor = '#333333';
|
||||
} else {
|
||||
container.style.background = '#f8fafc';
|
||||
container.style.borderColor = '#e2e8f0';
|
||||
}
|
||||
container.style.borderRadius = '2rem';
|
||||
});
|
||||
|
||||
// Input-Felder sicherstellen
|
||||
const inputs = document.querySelectorAll(
|
||||
'.input-professional, input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea, select'
|
||||
);
|
||||
|
||||
inputs.forEach(input => {
|
||||
if (isDark) {
|
||||
input.style.background = '#1a1a1a';
|
||||
input.style.borderColor = '#333333';
|
||||
input.style.color = '#ffffff';
|
||||
} else {
|
||||
input.style.background = '#ffffff';
|
||||
input.style.borderColor = '#e2e8f0';
|
||||
input.style.color = '#0f172a';
|
||||
}
|
||||
input.style.borderWidth = '2px';
|
||||
input.style.borderRadius = '1rem';
|
||||
});
|
||||
}
|
||||
|
||||
// Funktion zum Überwachen von DOM-Änderungen
|
||||
function observeChanges() {
|
||||
const observer = new MutationObserver(function(mutations) {
|
||||
let shouldCheck = false;
|
||||
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.type === 'childList' || mutation.type === 'attributes') {
|
||||
shouldCheck = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (shouldCheck) {
|
||||
// Kleine Verzögerung um Layout-Thrashing zu vermeiden
|
||||
setTimeout(() => {
|
||||
removeProblematicBackgrounds();
|
||||
enforceDesign();
|
||||
}, 10);
|
||||
}
|
||||
});
|
||||
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true,
|
||||
attributeFilter: ['style', 'class']
|
||||
});
|
||||
}
|
||||
|
||||
// Dark Mode Toggle überwachen
|
||||
function setupDarkModeObserver() {
|
||||
const darkModeObserver = new MutationObserver(function(mutations) {
|
||||
mutations.forEach(function(mutation) {
|
||||
if (mutation.type === 'attributes' && mutation.attributeName === 'class') {
|
||||
const target = mutation.target;
|
||||
if (target === document.documentElement &&
|
||||
(target.classList.contains('dark') || !target.classList.contains('dark'))) {
|
||||
|
||||
// Warte kurz und wende dann das Design neu an
|
||||
setTimeout(() => {
|
||||
enforceDesign();
|
||||
}, 50);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
darkModeObserver.observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ['class']
|
||||
});
|
||||
}
|
||||
|
||||
// Entferne CSS-Klassen die problematische Hintergründe verursachen könnten
|
||||
function removeProblematicClasses() {
|
||||
const elements = document.querySelectorAll('*');
|
||||
const problematicClassPatterns = [
|
||||
/bg-slate-\d+/,
|
||||
/bg-gray-\d+/,
|
||||
/bg-zinc-\d+/
|
||||
];
|
||||
|
||||
elements.forEach(element => {
|
||||
const classList = Array.from(element.classList);
|
||||
let classesRemoved = false;
|
||||
|
||||
classList.forEach(className => {
|
||||
problematicClassPatterns.forEach(pattern => {
|
||||
if (pattern.test(className)) {
|
||||
console.log('Entferne problematische CSS-Klasse:', className, 'von Element:', element);
|
||||
element.classList.remove(className);
|
||||
classesRemoved = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
if (classesRemoved) {
|
||||
// Füge professional classes hinzu
|
||||
if (!element.classList.contains('bg-professional') &&
|
||||
!element.classList.contains('professional-container') &&
|
||||
!element.classList.contains('mb-glass')) {
|
||||
// Nur bei bestimmten Elementen
|
||||
if (element.tagName === 'DIV' || element.tagName === 'SECTION') {
|
||||
element.classList.add('bg-professional');
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Initialisierung
|
||||
function init() {
|
||||
console.log('Mercedes-Benz Background Fix - Initialisierung');
|
||||
|
||||
// Sofort ausführen
|
||||
removeProblematicBackgrounds();
|
||||
removeProblematicClasses();
|
||||
enforceDesign();
|
||||
|
||||
// Observer einrichten
|
||||
observeChanges();
|
||||
setupDarkModeObserver();
|
||||
|
||||
// Regelmäßige Überprüfung alle 5 Sekunden
|
||||
setInterval(() => {
|
||||
removeProblematicBackgrounds();
|
||||
enforceDesign();
|
||||
}, 5000);
|
||||
|
||||
console.log('Mercedes-Benz Background Fix - Aktiv');
|
||||
}
|
||||
|
||||
// Starten wenn DOM bereit ist
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', init);
|
||||
} else {
|
||||
init();
|
||||
}
|
||||
|
||||
// Auch beim Laden von Ressourcen
|
||||
window.addEventListener('load', () => {
|
||||
setTimeout(() => {
|
||||
removeProblematicBackgrounds();
|
||||
enforceDesign();
|
||||
}, 100);
|
||||
});
|
||||
|
||||
// Expose für Debug-Zwecke
|
||||
window.mercedesBackgroundFix = {
|
||||
removeProblematicBackgrounds,
|
||||
enforceDesign,
|
||||
removeProblematicClasses
|
||||
};
|
||||
|
||||
})();
|
Reference in New Issue
Block a user