Speed up top nav with turbo routing and external base CSS.
Remove view-transition lag, swap main content without full reload, prefetch pages, and tear down SSE timers on leave. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-18
@@ -1,25 +1,8 @@
|
||||
/* Copyright (c) 2025-2026 马建军. All rights reserved. 专有软件,详见 LICENSE.zh-CN.txt */
|
||||
/* 科技感增强层 — 与 base.html 变量配合 */
|
||||
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
|
||||
::view-transition-old(app-main),
|
||||
::view-transition-new(app-main) {
|
||||
animation-duration: .18s;
|
||||
}
|
||||
|
||||
::view-transition-old(app-tech-bg),
|
||||
::view-transition-new(app-tech-bg),
|
||||
::view-transition-old(site-header),
|
||||
::view-transition-new(site-header) {
|
||||
animation: none;
|
||||
}
|
||||
|
||||
.tech-bg{
|
||||
position:fixed;inset:0;z-index:0;pointer-events:none;overflow:hidden;
|
||||
view-transition-name:app-tech-bg;
|
||||
}
|
||||
.tech-grid{
|
||||
position:absolute;inset:0;
|
||||
@@ -70,13 +53,14 @@
|
||||
.tech-glow,.tech-glow-2,.tech-scanline,.card::after,.site-header::after{animation:none}
|
||||
}
|
||||
|
||||
.main.nav-loading{opacity:.75;pointer-events:none;transition:opacity .12s}
|
||||
|
||||
.page-wrap{position:relative;z-index:1}
|
||||
|
||||
.site-header{
|
||||
border-bottom:1px solid var(--border-header);
|
||||
background:transparent;
|
||||
backdrop-filter:none;
|
||||
view-transition-name:site-header;
|
||||
}
|
||||
.site-header::after{
|
||||
content:"";display:block;height:1px;margin-top:-1px;
|
||||
|
||||
Reference in New Issue
Block a user