From bf8a4a4e4f17b646f6b4fa2efe7d9b42640e31c6 Mon Sep 17 00:00:00 2001 From: AirboZH Date: Thu, 12 Oct 2023 09:10:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=92=8C=E7=B3=BB=E7=BB=9F=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E4=B8=80=E8=87=B4=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/page.html | 2 +- templates/post.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/page.html b/templates/page.html index 46b603b..c7cf8e0 100644 --- a/templates/page.html +++ b/templates/page.html @@ -21,7 +21,7 @@

[[${singlePage.spec.title}]]

group="content.halo.run" kind="Post" th:attr="name=${singlePage.metadata.name}" - colorScheme="document.documentElement.getAttribute('data-mode') === 'light' ? 'light' : 'dark'" + colorScheme="window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'" /> diff --git a/templates/post.html b/templates/post.html index fd3acaf..1dea0c0 100644 --- a/templates/post.html +++ b/templates/post.html @@ -186,7 +186,7 @@ group="content.halo.run" kind="Post" th:attr="name=${post.metadata.name}" - colorScheme="document.documentElement.getAttribute('data-mode') === 'dark' ? 'dark' : 'light'" + colorScheme="window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark'" />