diff --git a/public/AboutUs.html b/public/AboutUs.html index 71ad59e3..68b5c0e1 100644 --- a/public/AboutUs.html +++ b/public/AboutUs.html @@ -50,6 +50,7 @@ About Us Contact Settings + @@ -232,6 +233,33 @@

Company

+ diff --git a/public/faq.css b/public/faq.css index 5d663a9a..c92ee082 100644 --- a/public/faq.css +++ b/public/faq.css @@ -624,3 +624,61 @@ html[data-theme="dark"] { --bg-secondary: #1e293b; --text-primary: #f1f5f9; } +.theme-toggle{ + background:none; + border:none; + font-size:18px; + cursor:pointer; + margin-left:15px; + color:inherit; +} + +.theme-toggle:hover{ + transform:scale(1.1); +}/* ============================= */ +/* LIGHT MODE GLOBAL FIX */ +/* ============================= */ + +html[data-theme="light"] body{ + background:#ffffff; + color:#111111; +} + +/* Navbar */ +html[data-theme="light"] .navbar{ + background:#ffffff; + border-bottom:1px solid rgba(0,0,0,0.1); +} + +/* Footer */ +html[data-theme="light"] .footer{ + background:#f5f5f5; + border-top:1px solid rgba(0,0,0,0.1); +} + +/* Links */ +html[data-theme="light"] .nav-link{ + color:#374151; +} + +html[data-theme="light"] .nav-link:hover, +html[data-theme="light"] .nav-link.active{ + color:#2563eb; +} + +/* Categories */ +html[data-theme="light"] .category-btn{ + background:#ffffff; + border:1px solid rgba(37,99,235,0.2); + color:#374151; +} + +html[data-theme="light"] .category-btn:hover{ + background:rgba(37,99,235,0.08); + color:#2563eb; +} + +/* FAQ hover */ +html[data-theme="light"] .faq-item:hover{ + background:#f9fafb; +} \ No newline at end of file diff --git a/public/faq.html b/public/faq.html index 02bcae4a..ede67564 100644 --- a/public/faq.html +++ b/public/faq.html @@ -24,10 +24,15 @@ ExpenseFlow + Home + FAQ + Login + + + + diff --git a/public/faq.js b/public/faq.js index ae0fe8ee..51f6916d 100644 --- a/public/faq.js +++ b/public/faq.js @@ -217,3 +217,24 @@ document.addEventListener('click', (e) => { trackFAQInteraction('category_switch', category); } }); +const toggle = document.getElementById("themeToggle"); + +toggle.addEventListener("click", () => { + +let currentTheme = document.documentElement.getAttribute("data-theme"); + +if(currentTheme === "light"){ +document.documentElement.setAttribute("data-theme","dark"); +localStorage.setItem("theme","dark"); +}else{ +document.documentElement.setAttribute("data-theme","light"); +localStorage.setItem("theme","light"); +} + +}); + +const savedTheme = localStorage.getItem("theme"); + +if(savedTheme){ +document.documentElement.setAttribute("data-theme",savedTheme); +} \ No newline at end of file