From ff8ccd1c75749c247db7b4125210d5876842fd38 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Wed, 29 Oct 2025 02:14:00 +0000 Subject: [PATCH] 0.2 --- assets/css/custom.css | 23 +++++++++++++++++++++++ assets/js/main.js | 31 +++++++++++++++++++++++++++++-- index.php | 9 +++++++-- 3 files changed, 59 insertions(+), 4 deletions(-) diff --git a/assets/css/custom.css b/assets/css/custom.css index c7221f2..ce954ea 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -4,6 +4,29 @@ body { font-family: 'Helvetica Neue', Arial, sans-serif; } +[data-bs-theme="dark"] body { + background-color: #121212; + color: #e9ecef; +} + +[data-bs-theme="dark"] .bg-white { + background-color: #1a1a1a !important; +} + +[data-bs-theme="dark"] .game-card { + background-color: #1a1a1a; + border-color: #333; +} + +[data-bs-theme="dark"] .footer { + background-color: #1a1a1a; +} + +[data-bs-theme="dark"] .navbar { + border-bottom: 1px solid #333; +} + + .navbar { box-shadow: 0 2px 4px rgba(0,0,0,.1); } diff --git a/assets/js/main.js b/assets/js/main.js index 5d3d034..256a2c1 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -1,4 +1,31 @@ -// Future JavaScript for interactivity document.addEventListener('DOMContentLoaded', function () { console.log('BetPredict Pro loaded'); -}); + + const themeToggler = document.getElementById('theme-toggler'); + const htmlElement = document.documentElement; + const sunIcon = 'bi-sun-fill'; + const moonIcon = 'bi-moon-fill'; + + const savedTheme = localStorage.getItem('theme') || 'light'; + htmlElement.setAttribute('data-bs-theme', savedTheme); + updateIcon(savedTheme); + + themeToggler.addEventListener('click', () => { + const currentTheme = htmlElement.getAttribute('data-bs-theme'); + const newTheme = currentTheme === 'light' ? 'dark' : 'light'; + htmlElement.setAttribute('data-bs-theme', newTheme); + localStorage.setItem('theme', newTheme); + updateIcon(newTheme); + }); + + function updateIcon(theme) { + const icon = themeToggler.querySelector('i'); + if (theme === 'light') { + icon.classList.remove(moonIcon); + icon.classList.add(sunIcon); + } else { + icon.classList.remove(sunIcon); + icon.classList.add(moonIcon); + } + } +}); \ No newline at end of file diff --git a/index.php b/index.php index 4936eb1..124c149 100644 --- a/index.php +++ b/index.php @@ -27,7 +27,7 @@ $games = [ ]; ?> - + @@ -53,7 +53,12 @@ $games = [