Reduce navigation flash with instant theme background and view transitions.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-26 03:26:57 +08:00
parent aaf69329cb
commit cababd67f5
5 changed files with 51 additions and 5 deletions
+18
View File
@@ -1,8 +1,25 @@
/* 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;
@@ -59,6 +76,7 @@
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;