Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -39,26 +39,12 @@ function setThemeOnLoad() {
|
|
39 |
const currentTheme = url.searchParams.get('__theme');
|
40 |
|
41 |
if (currentTheme === 'dark') {
|
42 |
-
applyDarkTheme();
|
43 |
} else {
|
44 |
-
applyLightTheme();
|
45 |
}
|
46 |
}
|
47 |
|
48 |
-
function applyDarkTheme() {
|
49 |
-
// Implement logic to apply dark theme styles
|
50 |
-
document.body.classList.add('dark-theme');
|
51 |
-
}
|
52 |
-
|
53 |
-
function applyLightTheme() {
|
54 |
-
// Implement logic to apply light theme styles
|
55 |
-
document.body.classList.remove('dark-theme');
|
56 |
-
}
|
57 |
-
|
58 |
-
window.onload = function() {
|
59 |
-
setThemeOnLoad(); // Set theme based on current URL
|
60 |
-
}
|
61 |
-
|
62 |
"""
|
63 |
|
64 |
|
|
|
39 |
const currentTheme = url.searchParams.get('__theme');
|
40 |
|
41 |
if (currentTheme === 'dark') {
|
42 |
+
applyDarkTheme();
|
43 |
} else {
|
44 |
+
applyLightTheme();
|
45 |
}
|
46 |
}
|
47 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
"""
|
49 |
|
50 |
|