nex_animation/frontend/index.html

32 lines
2.4 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Nex Animation Studio</title>
<meta name="color-scheme" content="dark light">
<!-- 层序声明(兜底)。**权威解释在 src/styles/index.css 顶部**,一句话结论:
真正修好「按钮没内边距 / 页签塌高 / 菜单图标粘连」的,是 index.css 里把
Tailwind preflight 也放进了 antd 同一层(@import "tailwindcss/preflight.css" layer(antd)),
不是这一行。@ant-design/cssinjs 会把 `@layer antd{}` 这条 effect 样式 prepend 到
<head> 最前,静态声明抢不过它——实测这条 <style> 会被顶到第 7 个节点,
层名第一次出现仍晚于 antd。保留它的唯一理由:万一哪天有人把 preflight 改回
layer(base),这里还有一条同层的显式顺序可读,不至于满盘皆错却找不到出处。
所以:**别把它当成机制本体,也别删掉 index.css 里的 layer(antd)。** -->
<style>@layer theme, base, components, antd, utilities;</style>
<!-- 网络字体异步加载:@import 会把首屏阻塞在 fonts.googleapis.com 上(外网抖动时整页白屏)。
preconnect 提前握手 + media="print" 让这张样式表不参与首次渲染,字体到位后自动切回。 -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" media="print" onload="this.media='all'"
href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap">
<script>
/* 主题在首帧之前落地,避免深色页面先闪一下白底(React 挂载晚于这段内联脚本)。
与 src/stores/theme.ts 共用同一把钥匙 nex-the:值缺失 = 跟随系统。 */
(function () {
var saved = null
try { saved = localStorage.getItem('nex-the') } catch (e) { /* 隐私模式:按系统偏好渲染 */ }
var mode = saved === 'dark' || saved === 'light'
? saved
: (window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark')
document.documentElement.dataset.theme = mode
document.documentElement.style.colorScheme = mode
})()
</script>
</head><body><div id="root"></div><script type="module" src="/src/main.tsx"></script></body></html>