|
58 | 58 | .onboarding-screen h1 { font-size: 24px; } |
59 | 59 | .onboarding-logo img { width: 56px; height: 56px; } |
60 | 60 | } |
| 61 | + |
| 62 | + /* Dark Mode Styles */ |
| 63 | + body.dark-mode { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%) !important; } |
| 64 | + body.dark-mode .bg-white { background-color: rgba(255, 140, 66, 0.15) !important; backdrop-filter: blur(10px); } |
| 65 | + body.dark-mode .text-gray-600, body.dark-mode .text-gray-700, body.dark-mode .text-gray-800 { color: rgba(255, 255, 255, 0.9) !important; } |
| 66 | + body.dark-mode .border-orange-300, body.dark-mode .border-orange-200 { border-color: rgba(255, 140, 66, 0.3) !important; } |
| 67 | + body.dark-mode .bg-gradient-to-br { background: rgba(255, 140, 66, 0.1) !important; } |
| 68 | + body.dark-mode #mainContent .bg-white { background-color: rgba(255, 140, 66, 0.12) !important; } |
| 69 | + body.dark-mode input, body.dark-mode select, body.dark-mode textarea { background-color: rgba(255, 255, 255, 0.1) !important; color: white !important; border-color: rgba(255, 140, 66, 0.3) !important; } |
| 70 | + body.dark-mode input::placeholder { color: rgba(255, 255, 255, 0.5) !important; } |
| 71 | + body.dark-mode .bg-orange-100, body.dark-mode .bg-yellow-100 { background-color: rgba(255, 140, 66, 0.2) !important; } |
| 72 | + body.dark-mode .text-orange-700, body.dark-mode .text-orange-900 { color: rgba(255, 200, 100, 0.9) !important; } |
| 73 | + body.dark-mode #settingsModal > div, body.dark-mode #walletModal > div { background-color: rgba(255, 140, 66, 0.95) !important; backdrop-filter: blur(10px); border-color: rgba(255, 140, 66, 0.5) !important; } |
| 74 | + body.dark-mode #settingsModal h3, body.dark-mode #walletModal h3 { color: #1a1a2e !important; } |
61 | 75 | </style> |
62 | 76 | <body class="bg-gradient-to-br from-orange-100 via-yellow-50 to-green-100 min-h-screen transition-colors duration-300"> |
63 | 77 |
|
@@ -210,6 +224,9 @@ <h3>Sit back and relax</h3> |
210 | 224 | </div> |
211 | 225 | </div> |
212 | 226 | </div> |
| 227 | + <button id="themeToggle" class="bg-gradient-to-r from-orange-400 to-yellow-400 hover:from-orange-500 hover:to-yellow-500 text-white px-4 py-2 rounded-lg font-bold shadow-md transition transform hover:scale-105" title="Toggle Dark Mode"> |
| 228 | + <span id="themeIcon">🌙</span> |
| 229 | + </button> |
213 | 230 | </div> |
214 | 231 | <!-- End Onboarding Modal --> |
215 | 232 |
|
@@ -1842,6 +1859,31 @@ <h3 class="font-bold text-orange-800 mb-2 text-sm">🎯 Target Price</h3> |
1842 | 1859 | if (localStorage.getItem('mangoswapOnboardingComplete') === 'true') { |
1843 | 1860 | document.getElementById('onboardingModal').classList.add('hidden'); |
1844 | 1861 | } |
| 1862 | + |
| 1863 | + // Dark Mode Toggle |
| 1864 | + const themeToggle = document.getElementById('themeToggle'); |
| 1865 | + const themeIcon = document.getElementById('themeIcon'); |
| 1866 | + const body = document.body; |
| 1867 | + |
| 1868 | + // Check for saved theme preference or default to light mode |
| 1869 | + const currentTheme = localStorage.getItem('mangoswapTheme') || 'light'; |
| 1870 | + if (currentTheme === 'dark') { |
| 1871 | + body.classList.add('dark-mode'); |
| 1872 | + themeIcon.textContent = '☀️'; |
| 1873 | + } |
| 1874 | + |
| 1875 | + // Toggle theme |
| 1876 | + themeToggle.addEventListener('click', function() { |
| 1877 | + body.classList.toggle('dark-mode'); |
| 1878 | + |
| 1879 | + if (body.classList.contains('dark-mode')) { |
| 1880 | + themeIcon.textContent = '☀️'; |
| 1881 | + localStorage.setItem('mangoswapTheme', 'dark'); |
| 1882 | + } else { |
| 1883 | + themeIcon.textContent = '🌙'; |
| 1884 | + localStorage.setItem('mangoswapTheme', 'light'); |
| 1885 | + } |
| 1886 | + }); |
1845 | 1887 | }); |
1846 | 1888 | </script> |
1847 | 1889 |
|
0 commit comments