From 5a1f539ea48ff4d7a3f145f3a03659c4215b4215 Mon Sep 17 00:00:00 2001 From: "feifei.xu" <307327147@qq.com> Date: Sun, 15 Mar 2026 08:26:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9A=97=E9=BB=91?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2=E6=97=B6=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E9=97=AA=E7=83=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 问题原因: - 主题脚本在 body 底部,HTML 加载时先用默认亮色显示 - 造成 FOUC (Flash of Unstyled Content) 修复方案: - 在 head 最开始就立即应用主题 (inline script) - 阻塞式初始化,防止页面闪烁 Author: xiaohei --- app/templates/base.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/templates/base.html b/app/templates/base.html index f62767b..f1c269a 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,11 +1,21 @@ {# 基础模板 #} - +