diff --git a/frontend/index.html b/frontend/index.html
index a9aa68c3..28ce3fa1 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -7,6 +7,22 @@
+
DocsGPT
diff --git a/frontend/src/hooks/index.ts b/frontend/src/hooks/index.ts
index 292a752f..037d666a 100644
--- a/frontend/src/hooks/index.ts
+++ b/frontend/src/hooks/index.ts
@@ -98,11 +98,18 @@ export function useDarkTheme() {
useEffect(() => {
localStorage.setItem('selectedTheme', isDarkTheme ? 'Dark' : 'Light');
- if (isDarkTheme) {
- document.body?.classList.add('dark');
- } else {
- document.body?.classList.remove('dark');
- }
+ const action = isDarkTheme ? 'add' : 'remove';
+ document.body?.classList[action]('dark');
+ document.documentElement.classList[action]('dark');
+
+ const color = isDarkTheme ? '#161616' : '#fbfbfb';
+ document.head
+ .querySelectorAll('meta[name="theme-color"]')
+ .forEach((m) => {
+ m.removeAttribute('media');
+ m.setAttribute('content', color);
+ });
+
setComponentMounted(true);
}, [isDarkTheme]);
diff --git a/frontend/src/index.css b/frontend/src/index.css
index 32d1189d..05c9c28b 100644
--- a/frontend/src/index.css
+++ b/frontend/src/index.css
@@ -195,6 +195,9 @@ layer(base);
}
}
+ html {
+ background-color: var(--background);
+ }
body.dark {
background-color: var(--background);
}