diff --git a/index.php b/index.php
index 7bb135e..a9e02b6 100644
--- a/index.php
+++ b/index.php
@@ -8,18 +8,26 @@ header('Content-Type: text/html; charset=utf-8');
考试看板配置查询
+
考试看板配置查询
@@ -134,6 +159,34 @@ header('Content-Type: text/html; charset=utf-8');
return '' + match + '';
});
}
+
+ function toggleTheme() {
+ const body = document.body;
+ const container = document.querySelector('.container');
+ const themeToggle = document.querySelector('.theme-toggle');
+ if (body.classList.contains('dark-theme')) {
+ body.classList.remove('dark-theme');
+ container.classList.remove('dark-theme');
+ themeToggle.textContent = '切换主题';
+ } else {
+ body.classList.add('dark-theme');
+ container.classList.add('dark-theme');
+ themeToggle.textContent = '切换主题';
+ }
+ }
+