perf(fonts): 字体按轨瘦身与非阻塞加载——Perf 62→88(Lighthouse P0)
- BaseLayout:8 个字体包 CSS 改 ?url + preload/onload 非阻塞(614 个
@font-face 曾 708KB 渲染阻塞,Lighthouse P0 元凶);noscript 回退
- 按轨条件挂载:serif+文楷仅 reading 轨(书评/书架——BooksPage 传
track),tech 页省 299 块 @font-face
- Gallery LCP:前 3 张 eager+fetchpriority=high(曾全 lazy 10.3s)
- 对比度:PostList .track 与 .post-cat 提 --ink-2(A11y P1)
- favicon.svg 补缺(BP 扣分项)
- 教训:python replace 再犯静默失配(车道改过导入顺序)——已用 edit
工具精确替换 + assert 意识持续强化
验证: 本地 dist lighthouse 首页 Perf 62→88,render-blocking 无;
FCP 2.5s/LCP 3.2s;E2E 30/30 PASS(staging)
Spec: 2026-10-25_add-blog-5c
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
f8add5ad15
commit
147f00fe1c
5 files changed
+36
-15
No files matched your search
@@ -82,7 +82,7 @@ const first = cards[0];
|
||||
|
||||
<div class="stage">
|
||||
<ul class="wall">
|
||||
{cards.map((card) => (
|
||||
{cards.map((card, i) => (
|
||||
<li
|
||||
class="shot"
|
||||
data-group={card.group}
|
||||
@@ -103,7 +103,8 @@ const first = cards[0];
|
||||
alt={card.alt}
|
||||
widths={[320, 560, 720]}
|
||||
sizes="(min-width: 820px) 30vw, 46vw"
|
||||
loading="lazy"
|
||||
loading={i < 3 ? 'eager' : 'lazy'}
|
||||
fetchpriority={i < 3 ? 'high' : undefined}
|
||||
/>
|
||||
</button>
|
||||
</li>
|
||||
|
||||
Reference in new issue
Block a user