Files
clawpanel/docs/engine-select-mockups/mockup-b-gradient.html
晴天 6a0d87479c feat(engine-select): Monolith 对角线全屏选择屏
替换原卡片网格为「左上 OpenClaw(石墨黑)vs 右下 Hermes(象牙白)」对角线全屏设计。
启动屏 / 引擎切换时给用户一个有冲击力的「选择时刻」。

## 核心设计
- position: fixed 跳出 #content 范围,覆盖整个 viewport(含 sidebar)
- 双三角形 clip-path: polygon (0 0, 0 100%, 100% 0) / (100% 0, 100% 100%, 0 100%)
- 内容用 absolute 定位到三角形质心(左上 11%/6.5% / 右下 11%/6.5%),永不重叠
- 微妙的 60px 网格纹 + 角落极光(紫蓝 / 橙金)+ 极细中线分割
- clamp(80px, 13vw, 200px) 巨字标题 + 序号 + Logo + tagline + 特性列表 + CTA

## 交互
- hover 联动:用 [data-hover] attribute 替代 :has(),兼容旧 WebKit
  - 鼠标悬停一侧 → 该侧亮起 + 内容平移 + CTA 反白;另一侧变暗 + 内容模糊缩小
- 点击三角形 → 三角形 clip-path 扩满(0.8s)→ 中心圆扩散(0.9s)→ 进入主页
- reveal 节点 attach 到 body,跨路由切换存活,新页面渲染后再淡出

## Both / Later 处理
- 两个次级选项保留,做成底部居中的玻璃 pill 链接(不抢戏)
- 不走对角线扩散动画,点击后直接 applyEngineSelection + navigate

## 兼容性
- prefers-reduced-motion: reduce → 关闭所有动画
- 移动端响应式:< 760px 调整字号 / 边距 / 角标
- 用 Vite define 注入的 __APP_VERSION__ 显示版本号(与 main.js / sidebar.js 一致)

## i18n
- engine.choiceTopBanner / choiceCtaEnter
- choiceOpenclaw{Tagline,Feat1,Feat2,Feat3,Category}
- choiceHermes{Tagline,Feat1,Feat2,Feat3,Category}
- choiceSecondary{Both,Later}
- 三语完整(zh-CN / en / zh-TW)

## 抽卡 prototype
保留 docs/engine-select-mockups/ 下的 V2 4 张设计 + 索引页(v2-monolith.html
即本次接入的最终版本)。
2026-05-14 06:22:32 +08:00

270 lines
8.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Mockup B — 渐变发光(赛博朋克)</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box }
html, body { height: 100%; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; background: #060611 }
.stage { position: fixed; inset: 0; overflow: hidden }
/* 背景星点 */
.stars {
position: absolute;
inset: 0;
background-image:
radial-gradient(2px 2px at 12% 18%, rgba(120, 130, 255, 0.5), transparent),
radial-gradient(2px 2px at 88% 78%, rgba(255, 180, 100, 0.5), transparent),
radial-gradient(1.5px 1.5px at 30% 65%, rgba(160, 100, 255, 0.4), transparent),
radial-gradient(1.5px 1.5px at 70% 30%, rgba(255, 120, 80, 0.4), transparent),
radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent);
background-size: 100% 100%;
}
/* 三角形 panel */
.panel {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
cursor: pointer;
transition: filter 0.4s ease, transform 0.4s ease;
}
.panel-openclaw {
clip-path: polygon(0 0, 0 100%, 100% 0);
background:
radial-gradient(ellipse at 25% 25%, rgba(110, 80, 220, 0.45), transparent 60%),
linear-gradient(135deg, #2c1d6b 0%, #4a2585 35%, #1a0d3d 100%);
}
.panel-hermes {
clip-path: polygon(100% 100%, 0 100%, 100% 0);
background:
radial-gradient(ellipse at 75% 75%, rgba(255, 130, 60, 0.45), transparent 60%),
linear-gradient(315deg, #5b1f0a 0%, #b85419 35%, #ff8c3a 70%, #d97a4e 100%);
}
/* 中线发光 */
.panel::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(45deg, transparent 49.6%, rgba(255, 255, 255, 0.7) 49.8%, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0.7) 50.2%, transparent 50.4%);
filter: blur(0.5px);
pointer-events: none;
}
/* 内容定位 */
.panel-inner {
display: flex;
flex-direction: column;
align-items: center;
gap: 28px;
text-align: center;
color: #fff;
transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
z-index: 2;
}
.panel-openclaw .panel-inner { margin-top: -120px; margin-left: -180px }
.panel-hermes .panel-inner { margin-bottom: -120px; margin-right: -180px }
/* hover发光增强 + 浮起 */
.panel:hover { filter: brightness(1.18) saturate(1.2) }
.panel:hover .panel-inner { transform: scale(1.08) translateY(-8px) }
.panel:hover .logo { animation: pulse 1.2s ease infinite }
/* logo 装饰光圈 */
.logo {
width: 96px;
height: 96px;
display: grid;
place-items: center;
position: relative;
border-radius: 50%;
background: rgba(255, 255, 255, 0.12);
backdrop-filter: blur(10px);
border: 1.5px solid rgba(255, 255, 255, 0.3);
box-shadow: 0 0 30px currentColor, inset 0 0 30px rgba(255, 255, 255, 0.1);
}
.panel-openclaw .logo { color: rgba(170, 130, 255, 0.5) }
.panel-hermes .logo { color: rgba(255, 180, 100, 0.6) }
.logo svg { width: 50px; height: 50px; stroke: #fff; fill: none; stroke-width: 1.6 }
@keyframes pulse {
0%, 100% { box-shadow: 0 0 30px currentColor, inset 0 0 30px rgba(255, 255, 255, 0.1) }
50% { box-shadow: 0 0 60px currentColor, inset 0 0 40px rgba(255, 255, 255, 0.2) }
}
.title {
font-size: 64px;
font-weight: 300;
letter-spacing: -0.04em;
line-height: 1;
text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4);
}
.subtitle {
font-size: 14px;
opacity: 0.85;
max-width: 280px;
line-height: 1.7;
font-weight: 300;
}
.badge {
font-size: 10px;
padding: 4px 12px;
border: 1px solid rgba(255, 255, 255, 0.4);
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.15em;
margin-bottom: -10px;
}
/* 中央提示 */
.center-hint {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-45deg);
color: rgba(255, 255, 255, 0.6);
font-size: 11px;
letter-spacing: 0.3em;
pointer-events: none;
z-index: 10;
font-weight: 300;
text-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
/* —— 选中展开动画 —— */
.panel.expanding { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); z-index: 5 }
.panel.expanding::before { opacity: 0 }
.panel { transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.3, 1), filter 0.4s ease }
.reveal {
position: fixed;
top: 50%;
left: 50%;
width: 0;
height: 0;
border-radius: 50%;
transform: translate(-50%, -50%);
z-index: 20;
pointer-events: none;
transition: width 0.8s cubic-bezier(0.65, 0, 0.35, 1), height 0.8s cubic-bezier(0.65, 0, 0.35, 1);
box-shadow: 0 0 100px currentColor;
}
.reveal.active { width: 250vmax; height: 250vmax }
.home-mock {
position: fixed;
inset: 0;
z-index: 30;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 16px;
color: #fff;
opacity: 0;
pointer-events: none;
transition: opacity 0.5s ease;
}
.home-mock.show { opacity: 1; pointer-events: auto }
.home-title { font-size: 32px; font-weight: 200; letter-spacing: -0.02em }
.home-sub { font-size: 13px; opacity: 0.7; letter-spacing: 0.2em; text-transform: uppercase }
.reset-hint {
position: fixed;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
color: rgba(255, 255, 255, 0.5);
font-size: 12px;
z-index: 40;
letter-spacing: 0.05em;
}
</style>
</head>
<body>
<div class="stage" id="stage">
<div class="stars"></div>
<div class="panel panel-openclaw" data-engine="openclaw">
<div class="panel-inner">
<div class="badge">通用助理</div>
<div class="logo">
<svg viewBox="0 0 24 24">
<path d="M12 2L2 7l10 5 10-5-10-5z"/>
<path d="M2 17l10 5 10-5"/>
<path d="M2 12l10 5 10-5"/>
</svg>
</div>
<div class="title">OpenClaw</div>
<div class="subtitle">模型管理 · 渠道集成 · 记忆系统 · 智能体编排</div>
</div>
</div>
<div class="panel panel-hermes" data-engine="hermes">
<div class="panel-inner">
<div class="badge">Agent 工作流</div>
<div class="logo">
<svg viewBox="0 0 24 24">
<path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z"/>
</svg>
</div>
<div class="title">Hermes</div>
<div class="subtitle">工具调用 · Profile · Kanban · Skills · OAuth</div>
</div>
</div>
<div class="center-hint">— SELECT —</div>
</div>
<div class="reveal" id="reveal"></div>
<div class="home-mock" id="home">
<div class="home-title" id="home-name"></div>
<div class="home-sub">Loading workspace...</div>
</div>
<div class="reset-hint">点击预览 · 按 R 重置</div>
<script>
const stage = document.getElementById('stage')
const reveal = document.getElementById('reveal')
const home = document.getElementById('home')
const homeName = document.getElementById('home-name')
const colors = {
openclaw: { bg: 'linear-gradient(135deg, #2c1d6b, #4a2585)', glow: 'rgba(110, 80, 220, 0.6)' },
hermes: { bg: 'linear-gradient(315deg, #b85419, #ff8c3a)', glow: 'rgba(255, 130, 60, 0.6)' },
}
document.querySelectorAll('.panel').forEach(panel => {
panel.addEventListener('click', () => {
const engine = panel.dataset.engine
const other = stage.querySelector(`.panel:not([data-engine="${engine}"])`)
panel.classList.add('expanding')
other.style.opacity = '0'
other.style.transition = 'opacity 0.4s'
setTimeout(() => {
reveal.style.background = colors[engine].bg
reveal.style.color = colors[engine].glow
home.style.background = colors[engine].bg
homeName.textContent = engine === 'openclaw' ? 'OpenClaw' : 'Hermes'
reveal.classList.add('active')
}, 600)
setTimeout(() => home.classList.add('show'), 1300)
})
})
document.addEventListener('keydown', (e) => {
if (e.key.toLowerCase() === 'r') location.reload()
})
</script>
</body>
</html>