|
55 | 55 | margin-top: 0 !important; |
56 | 56 | } |
57 | 57 |
|
58 | | - /* Garantir que o fundo permaneça como está, especialmente no Kanban */ |
59 | | - body { |
| 58 | + /* Garantir que o fundo seja dark quando o tema dark estiver ativo */ |
| 59 | + body.dark { |
| 60 | + background-color: #1f2937 !important; |
| 61 | + /* bg-gray-800 */ |
| 62 | + } |
| 63 | + |
| 64 | + body:not(.dark) { |
60 | 65 | background-color: #f3f4f6 !important; |
61 | 66 | /* bg-gray-100 */ |
62 | 67 | } |
63 | 68 |
|
64 | | - /* Garantir que o app não tenha fundo escuro */ |
65 | | - #app { |
66 | | - background-color: transparent !important; |
| 69 | + /* Garantir que o app tenha fundo dark quando necessário */ |
| 70 | + #app.dark { |
| 71 | + background-color: #1f2937 !important; |
67 | 72 | } |
68 | 73 |
|
69 | | - /* Garantir que o wrapper principal não tenha fundo escuro */ |
70 | | - #app>div.flex.flex-wrap.app-wrapper { |
| 74 | + #app:not(.dark) { |
71 | 75 | background-color: transparent !important; |
72 | 76 | } |
73 | 77 |
|
74 | | - /* Corrigir fundo escuro específico do Kanban */ |
75 | | - #app>div.flex.flex-wrap.app-wrapper.dark\:text-slate-300>main>div>div { |
76 | | - background-color: transparent !important; |
| 78 | + /* Garantir que o wrapper principal tenha fundo dark quando necessário */ |
| 79 | + #app>div.flex.flex-wrap.app-wrapper.dark { |
| 80 | + background-color: #1f2937 !important; |
77 | 81 | } |
78 | 82 |
|
79 | | - /* Garantir que o main do Kanban não tenha fundo escuro */ |
80 | | - #app>div.flex.flex-wrap.app-wrapper.dark\:text-slate-300>main { |
| 83 | + #app>div.flex.flex-wrap.app-wrapper:not(.dark) { |
81 | 84 | background-color: transparent !important; |
82 | 85 | } |
83 | 86 |
|
| 87 | + |
| 88 | + |
| 89 | + /* Layout responsivo para Kanban no mobile */ |
| 90 | + @media (max-width: 768px) { |
| 91 | + |
| 92 | + /* Div mãe - forçar flex-col no mobile */ |
| 93 | + #app>div.flex.flex-wrap.app-wrapper.dark\:text-slate-300>main>div>div>div.flex-1.overflow-auto>div { |
| 94 | + flex-direction: column !important; |
| 95 | + gap: 1rem !important; |
| 96 | + } |
| 97 | + |
| 98 | + /* Coluna esquerda - ocupar largura total no mobile e ficar abaixo */ |
| 99 | + #app>div.flex.flex-wrap.app-wrapper.dark\:text-slate-300>main>div>div>div.flex-1.overflow-auto>div>div.w-2\/3.p-8.space-y-6 { |
| 100 | + width: 100% !important; |
| 101 | + padding: 1rem !important; |
| 102 | + order: 2 !important; |
| 103 | + } |
| 104 | + |
| 105 | + /* Coluna direita - ocupar largura total no mobile e ficar acima */ |
| 106 | + #app>div.flex.flex-wrap.app-wrapper.dark\:text-slate-300>main>div>div>div.flex-1.overflow-auto>div>div.w-1\/3.p-4.space-y-6 { |
| 107 | + width: 100% !important; |
| 108 | + padding: 1rem !important; |
| 109 | + order: 1 !important; |
| 110 | + } |
| 111 | + } |
| 112 | + |
84 | 113 | .navbar-item-indicator { |
85 | 114 | height: 3px; |
86 | 115 | transition: all 0.3s ease; |
|
325 | 354 | }); |
326 | 355 | </script> |
327 | 356 |
|
| 357 | + <!-- Script para forçar tema dark no mobile --> |
| 358 | + <script data-name="ForceDarkTheme"> |
| 359 | + document.addEventListener('DOMContentLoaded', function () { |
| 360 | + function forceDarkTheme() { |
| 361 | + // Aplicar apenas no mobile |
| 362 | + if (window.innerWidth > 768) { |
| 363 | + return; |
| 364 | + } |
| 365 | + |
| 366 | + // Forçar tema dark no body |
| 367 | + document.body.classList.remove('light'); |
| 368 | + document.body.classList.add('dark'); |
| 369 | + |
| 370 | + // Forçar tema dark no elemento app |
| 371 | + const appElement = document.getElementById('app'); |
| 372 | + if (appElement) { |
| 373 | + appElement.classList.remove('light'); |
| 374 | + appElement.classList.add('dark'); |
| 375 | + } |
| 376 | + |
| 377 | + // Forçar tema dark no wrapper principal |
| 378 | + const appWrapper = document.querySelector('#app > div.flex.flex-wrap.app-wrapper'); |
| 379 | + if (appWrapper) { |
| 380 | + appWrapper.classList.remove('light'); |
| 381 | + appWrapper.classList.add('dark'); |
| 382 | + } |
| 383 | + |
| 384 | + // Adicionar classes dark em todos os elementos filhos |
| 385 | + document.querySelectorAll('*').forEach(element => { |
| 386 | + if (!element.classList.contains('dark')) { |
| 387 | + element.classList.add('dark'); |
| 388 | + } |
| 389 | + element.classList.remove('light'); |
| 390 | + }); |
| 391 | + |
| 392 | + // Forçar cores dark via CSS |
| 393 | + document.documentElement.style.setProperty('--color-scheme', 'dark'); |
| 394 | + document.documentElement.style.setProperty('color-scheme', 'dark'); |
| 395 | + } |
| 396 | + |
| 397 | + // Executar imediatamente |
| 398 | + forceDarkTheme(); |
| 399 | + |
| 400 | + // Observer para detectar mudanças no DOM |
| 401 | + const observer = new MutationObserver(function (mutations) { |
| 402 | + mutations.forEach(function (mutation) { |
| 403 | + if (mutation.addedNodes.length) { |
| 404 | + forceDarkTheme(); |
| 405 | + } |
| 406 | + }); |
| 407 | + }); |
| 408 | + |
| 409 | + // Observar mudanças no body |
| 410 | + observer.observe(document.body, { |
| 411 | + childList: true, |
| 412 | + subtree: true, |
| 413 | + attributes: true, |
| 414 | + attributeFilter: ['class'] |
| 415 | + }); |
| 416 | + |
| 417 | + // Executar periodicamente para garantir |
| 418 | + setInterval(forceDarkTheme, 1000); |
| 419 | + |
| 420 | + // Adicionar listener para resize |
| 421 | + window.addEventListener('resize', function () { |
| 422 | + forceDarkTheme(); |
| 423 | + }); |
| 424 | + }); |
| 425 | + </script> |
| 426 | + |
328 | 427 | <!-- Script para customizar botão IA --> |
329 | 428 | <script data-name="AIButton"> |
330 | 429 | document.addEventListener('DOMContentLoaded', function () { |
|
0 commit comments