添加明暗主题切换功能

This commit is contained in:
Zuoling Rong
2025-05-01 20:55:21 +08:00
parent 1660eed771
commit 582cc652ac
5 changed files with 319 additions and 182 deletions

View File

@@ -13,7 +13,7 @@
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body class="loading">
<body class="loaded">
<div class="layout">
<!-- 移动端按钮 -->
<div class="mobile-buttons">
@@ -85,6 +85,11 @@
{{SEARCH_RESULTS}}
</main>
<!-- 主题切换按钮 -->
<button class="theme-toggle" aria-label="切换主题">
<i class="fas fa-moon"></i>
</button>
</div>
<script src="script.js"></script>
</body>