commit 59ad2d013e04ede4d039cabcc2b10707cfc714ce Author: alex Date: Fri Nov 6 16:54:52 2026 +0800 Prepare static site for deployment Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba5b128 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +outputs/ +.build-check/ diff --git a/.openai/hosting.json b/.openai/hosting.json new file mode 100644 index 0000000..06a7f78 --- /dev/null +++ b/.openai/hosting.json @@ -0,0 +1,6 @@ +{ + "project_id": "appgprj_6aed798a86a88191930e07602f7782a4", + "static": { + "directory": "dist" + } +} diff --git a/.sites-checkout-live b/.sites-checkout-live new file mode 160000 index 0000000..795c178 --- /dev/null +++ b/.sites-checkout-live @@ -0,0 +1 @@ +Subproject commit 795c178b072637c902ea679e465816db7ef239a7 diff --git a/dist/admin.css b/dist/admin.css new file mode 100644 index 0000000..3e318bd --- /dev/null +++ b/dist/admin.css @@ -0,0 +1,3 @@ +:root { --admin-bg:#f2f6f3; --admin-card:#fff; --admin-text:#18251f; --admin-muted:#6e7d75; --admin-line:#dbe5df; --admin-brand:#1f6f54; --admin-soft:#e7f3ec; } +*{box-sizing:border-box}body{margin:0;background:var(--admin-bg);color:var(--admin-text);font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;line-height:1.5}.admin-shell{display:grid;grid-template-columns:250px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;padding:28px 20px;background:#0c2119;color:#fff}.admin-brand{display:flex;align-items:center;gap:12px;margin:0 8px 38px}.admin-brand img{width:40px;height:40px;border-radius:12px}.admin-brand span{display:grid}.admin-brand small{color:#8ca89a;font-size:10px}.side-nav{display:grid;gap:6px}.side-nav button{padding:12px 14px;text-align:left;border:0;border-radius:11px;background:transparent;color:#9eb4a9;cursor:pointer}.side-nav button.active,.side-nav button:hover{color:#fff;background:rgba(255,255,255,.08)}.side-footer{position:absolute;left:28px;right:28px;bottom:25px}.side-footer a{color:#a7bdb2;font-size:13px;text-decoration:none}.admin-main{padding:38px 44px 70px}.admin-top{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:32px}.admin-top h1{margin:0;font-size:28px;letter-spacing:-.03em}.admin-top p{margin:6px 0 0;color:var(--admin-muted);font-size:13px}.admin-actions{display:flex;flex-wrap:wrap;gap:8px}.admin-button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:0 15px;border:1px solid var(--admin-line);border-radius:10px;background:#fff;color:var(--admin-text);cursor:pointer}.admin-button.primary{border-color:var(--admin-brand);background:var(--admin-brand);color:#fff}.admin-button.danger{color:#a13a3a}.panel{display:none}.panel.active{display:block}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}.stat{padding:22px;border:1px solid var(--admin-line);border-radius:16px;background:#fff}.stat strong{display:block;font-size:30px}.stat span{color:var(--admin-muted);font-size:12px}.admin-card{margin-bottom:16px;padding:24px;border:1px solid var(--admin-line);border-radius:16px;background:var(--admin-card);box-shadow:0 10px 30px rgba(22,51,38,.04)}.admin-card-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}.admin-card h2,.admin-card h3{margin:0}.admin-card h2{font-size:18px}.admin-card h3{font-size:15px}.field-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}.field-grid.three{grid-template-columns:repeat(3,1fr)}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:12px;color:var(--admin-muted);font-weight:600}.field input,.field textarea,.field select{width:100%;padding:11px 12px;border:1px solid var(--admin-line);border-radius:9px;background:#fff;color:var(--admin-text);outline:none}.field input:focus,.field textarea:focus{border-color:#76aa91;box-shadow:0 0 0 3px rgba(31,111,84,.08)}.field textarea{min-height:105px;resize:vertical}.repeater{display:grid;gap:12px}.repeater-item{padding:18px;border:1px solid var(--admin-line);border-radius:13px;background:#fbfdfb}.item-actions{display:flex;gap:8px}.icon-button{border:0;background:transparent;color:var(--admin-muted);cursor:pointer}.notice{margin-bottom:18px;padding:13px 15px;border:1px solid #cfe0d5;border-radius:12px;background:#eaf5ee;color:#345c48;font-size:13px}.import-input{display:none}.admin-toast{position:fixed;right:30px;bottom:28px;padding:12px 16px;border-radius:10px;background:#102b20;color:#fff;opacity:0;transform:translateY(12px);transition:.2s;pointer-events:none}.admin-toast.show{opacity:1;transform:none}@media(max-width:900px){.admin-shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;padding:16px}.admin-brand{margin-bottom:16px}.side-nav{grid-template-columns:repeat(4,1fr)}.side-nav button{text-align:center;padding:9px 4px}.side-footer{display:none}.admin-main{padding:26px 18px 60px}.admin-top{align-items:flex-start;flex-direction:column}.stat-grid{grid-template-columns:1fr}.field-grid,.field-grid.three{grid-template-columns:1fr}} +[hidden]{display:none!important}.auth-screen{position:relative;display:grid;place-items:center;min-height:100vh;padding:28px;overflow:hidden;background:radial-gradient(circle at 50% 8%,rgba(66,190,119,.24),transparent 28rem),#07110e;color:#f3fbf6}.auth-screen::before{content:"";position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);background-size:46px 46px;mask-image:linear-gradient(to bottom,#000,transparent 80%)}.auth-glow{position:absolute;width:360px;height:360px;border-radius:50%;background:rgba(73,218,137,.16);filter:blur(85px)}.auth-card{position:relative;z-index:1;width:min(430px,100%);padding:38px;border:1px solid rgba(174,255,210,.14);border-radius:26px;background:rgba(13,32,24,.88);box-shadow:0 30px 90px rgba(0,0,0,.38);backdrop-filter:blur(24px)}.auth-logo{width:58px;height:58px;border-radius:16px;box-shadow:0 14px 35px rgba(31,111,84,.34)}.auth-kicker{display:block;margin-top:24px;color:#83e7ae;font-size:10px;letter-spacing:.2em}.auth-card h1{margin:8px 0 7px;font-size:30px;letter-spacing:-.04em}.auth-card>p{margin:0;color:#9db2a7;font-size:13px}.auth-fields{display:grid;gap:14px;margin-top:26px}.auth-fields label{display:grid;gap:7px;color:#b8cbc1;font-size:12px;font-weight:600}.auth-fields input{width:100%;padding:12px 13px;border:1px solid rgba(184,255,215,.16);border-radius:10px;background:rgba(255,255,255,.055);color:#fff;outline:none}.auth-fields input:focus{border-color:#78e4a7;box-shadow:0 0 0 3px rgba(85,218,143,.1)}.auth-error{min-height:20px!important;margin:12px 0 0!important;color:#ff9999!important}.auth-submit{width:100%;min-height:46px;border:0;border-radius:11px;background:linear-gradient(135deg,#b7ffd5,#67df9c);color:#082818;font-weight:700;cursor:pointer}.auth-submit:disabled{opacity:.55;cursor:wait}.auth-card small{display:block;margin-top:16px;color:#6f887b;text-align:center;font-size:11px}.toggle{display:inline-flex;align-items:center;gap:9px;color:var(--admin-muted);font-size:12px;cursor:pointer;user-select:none}.toggle input{position:absolute;opacity:0;pointer-events:none}.toggle-ui{position:relative;width:38px;height:22px;border-radius:999px;background:#cdd8d2;transition:.2s}.toggle-ui::after{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.16);transition:.2s}.toggle input:checked+.toggle-ui{background:var(--admin-brand)}.toggle input:checked+.toggle-ui::after{transform:translateX(16px)} diff --git a/dist/admin.html b/dist/admin.html new file mode 100644 index 0000000..fbd7dc4 --- /dev/null +++ b/dist/admin.html @@ -0,0 +1,8 @@ +内容管理 · 如饮AI +
+

内容概览

所有修改保存在当前浏览器,可导出 JSON 用于迁移或备份。

静态站管理说明:内容配置保存在当前浏览器。保存后,同一浏览器中的产品页会立即读取新配置;导出 JSON 可用于备份或交给开发者固化到部署版本中。
+
3已显示下载入口
0文档条目
0版本记录

首页文案

+

多平台下载链接

+

文档条目

+

更新日志

+
diff --git a/dist/admin.js b/dist/admin.js new file mode 100644 index 0000000..f1b5c9d --- /dev/null +++ b/dist/admin.js @@ -0,0 +1,57 @@ +let state = window.getRuyinConfig(); +const titles = { overview: "内容概览", downloads: "下载配置", docs: "文档管理", changelog: "更新日志" }; +const $ = selector => document.querySelector(selector); +const $$ = selector => [...document.querySelectorAll(selector)]; + +function esc(value = "") { return String(value).replace(/[&<>'"]/g, c => ({"&":"&","<":"<",">":">","'":"'",'"':"""}[c])); } +function toast(message) { const el = $(".admin-toast"); el.textContent = message; el.classList.add("show"); setTimeout(() => el.classList.remove("show"), 2200); } +function getPath(path) { return path.split(".").reduce((acc, key) => acc?.[key], state); } +function setPath(path, value) { const parts = path.split("."); const last = parts.pop(); const target = parts.reduce((acc, key) => acc[key], state); target[last] = value; } + +function renderStaticFields() { $$('[data-path]').forEach(input => input.value = getPath(input.dataset.path) ?? ""); } + +function renderDownloads() { + $("#download-editor").innerHTML = Object.entries(state.downloads).map(([key, item]) => `

${esc(item.label)}

`).join(""); +} + +function renderDocs() { + $("#docs-editor").innerHTML = state.docs.length ? state.docs.map((doc, index) => `

文档 ${index + 1}

`).join("") : '
暂无文档,点击右上角新增。
'; +} + +function renderChangelog() { + $("#changelog-editor").innerHTML = state.changelog.length ? state.changelog.map((item, index) => `

v${esc(item.version)}

`).join("") : '
暂无更新日志,点击右上角新增。
'; +} + +function updateStats() { $("#stat-downloads").textContent = Object.values(state.downloads).filter(item => item.enabled !== false).length; $("#stat-docs").textContent = state.docs.length; $("#stat-releases").textContent = state.changelog.length; } +function renderAll() { renderStaticFields(); renderDownloads(); renderDocs(); renderChangelog(); updateStats(); } + +$$('[data-panel]').forEach(button => button.addEventListener("click", () => { + $$('[data-panel]').forEach(el => el.classList.toggle("active", el === button)); + $$('[data-panel-content]').forEach(el => el.classList.toggle("active", el.dataset.panelContent === button.dataset.panel)); + $("#panel-title").textContent = titles[button.dataset.panel]; +})); + +document.addEventListener("input", event => { + const el = event.target; + if (el.dataset.path) setPath(el.dataset.path, el.value); + if (el.dataset.download) state.downloads[el.dataset.download][el.dataset.field] = el.type === "checkbox" ? el.checked : el.value; + if (el.dataset.doc) state.docs[Number(el.dataset.doc)][el.dataset.field] = el.value; + if (el.dataset.release) state.changelog[Number(el.dataset.release)][el.dataset.field] = el.dataset.field === "highlights" ? el.value.split("\n").filter(Boolean) : el.value; +}); + +document.addEventListener("click", event => { + const deleteDoc = event.target.dataset.deleteDoc; + if (deleteDoc !== undefined) { state.docs.splice(Number(deleteDoc), 1); renderDocs(); updateStats(); } + const moveDoc = event.target.dataset.moveDoc; + if (moveDoc !== undefined && event.target.dataset.direction === "up" && Number(moveDoc) > 0) { const i = Number(moveDoc); [state.docs[i-1], state.docs[i]] = [state.docs[i], state.docs[i-1]]; renderDocs(); } + const deleteRelease = event.target.dataset.deleteRelease; + if (deleteRelease !== undefined) { state.changelog.splice(Number(deleteRelease), 1); renderChangelog(); updateStats(); } +}); + +$("#add-doc").addEventListener("click", () => { state.docs.push({ id: `doc-${Date.now()}`, category: "新分类", title: "新文档", summary: "文档摘要", content: "在这里填写文档正文。" }); renderDocs(); updateStats(); }); +$("#add-release").addEventListener("click", () => { state.changelog.unshift({ version: "1.0.1", date: new Date().toISOString().slice(0,10), type: "功能更新", highlights: ["在这里填写更新内容"] }); renderChangelog(); updateStats(); }); +$("#save-button").addEventListener("click", () => { localStorage.setItem(window.RUYIN_CONFIG_KEY, JSON.stringify(state)); toast("配置已保存"); }); +$("#export-button").addEventListener("click", () => { const blob = new Blob([JSON.stringify(state, null, 2)], {type:"application/json"}); const url = URL.createObjectURL(blob); const link = Object.assign(document.createElement("a"), {href:url, download:"ruyin-site-config.json"}); link.click(); URL.revokeObjectURL(url); toast("配置已导出"); }); +$("#import-button").addEventListener("click", () => $("#import-input").click()); +$("#import-input").addEventListener("change", async event => { try { state = JSON.parse(await event.target.files[0].text()); renderAll(); toast("配置已导入,请保存"); } catch { toast("无法读取此配置文件"); } }); +renderAll(); diff --git a/dist/app.js b/dist/app.js new file mode 100644 index 0000000..4f1d0cb --- /dev/null +++ b/dist/app.js @@ -0,0 +1,104 @@ +const config = window.getRuyinConfig(); + +const icons = { + windows: '', + mac: '', + linux: '' +}; + +function escapeHTML(value = "") { + return String(value).replace(/[&<>'"]/g, char => ({ "&": "&", "<": "<", ">": ">", "'": "'", '"': """ }[char])); +} + +function showToast(message) { + const toast = document.querySelector(".toast"); + if (!toast) return; + toast.textContent = message; + toast.classList.add("show"); + clearTimeout(window.__toastTimer); + window.__toastTimer = setTimeout(() => toast.classList.remove("show"), 2400); +} + +function platformKey() { + const platform = (navigator.userAgentData?.platform || navigator.platform || "").toLowerCase(); + if (platform.includes("mac")) return "mac"; + if (platform.includes("linux")) return "linux"; + return "windows"; +} + +function bindDownload(link, data) { + link.href = data?.url || "#"; + if (!data?.url || data.url === "#") { + link.addEventListener("click", event => { + event.preventDefault(); + showToast(`${data?.label || "此平台"} 下载链接暂未配置`); + }); + } +} + +function renderHome() { + const hero = document.querySelector("[data-home]"); + if (!hero) return; + document.querySelector("[data-headline]").textContent = config.product.headline; + document.querySelector("[data-description]").textContent = config.product.description; + document.querySelectorAll("[data-version]").forEach(el => el.textContent = config.product.version); + + const enabledDownloads = Object.entries(config.downloads).filter(([, item]) => item.enabled !== false); + const detectedKey = platformKey(); + const selectedKey = config.downloads[detectedKey]?.enabled !== false ? detectedKey : enabledDownloads[0]?.[0]; + const selected = selectedKey ? config.downloads[selectedKey] : null; + const primary = document.querySelector("[data-primary-download]"); + if (selected) { + primary.innerHTML = `${icons[selectedKey]}下载 ${escapeHTML(selected.label)} 版`; + bindDownload(primary, selected); + } else { + primary.innerHTML = "暂无可用下载"; + primary.removeAttribute("href"); + primary.classList.add("disabled"); + primary.setAttribute("aria-disabled", "true"); + } + + const grid = document.querySelector("[data-download-grid]"); + grid.innerHTML = enabledDownloads.length ? enabledDownloads.map(([key, item]) => ` +
+
${icons[key]}
+

${escapeHTML(item.label)}

+

${escapeHTML(item.meta)} · ${escapeHTML(item.size)}

+ + 获取安装包 + + +
`).join("") : '
下载通道正在维护中,请稍后再来。
'; + grid.querySelectorAll("[data-download-key]").forEach(link => bindDownload(link, config.downloads[link.dataset.downloadKey])); +} + +function renderDocs() { + const list = document.querySelector("[data-docs-list]"); + if (!list) return; + const nav = document.querySelector("[data-docs-nav]"); + if (!config.docs.length) { + list.innerHTML = '
文档正在整理中。
'; + nav.innerHTML = ""; + return; + } + nav.innerHTML = config.docs.map((doc, index) => `${escapeHTML(doc.title)}`).join(""); + list.innerHTML = config.docs.map(doc => `
${escapeHTML(doc.category)}

${escapeHTML(doc.title)}

${escapeHTML(doc.summary)}

${escapeHTML(doc.content)}

`).join(""); +} + +function renderChangelog() { + const timeline = document.querySelector("[data-changelog]"); + if (!timeline) return; + if (!config.changelog.length) { + timeline.innerHTML = '
暂时没有更新记录。
'; + return; + } + timeline.innerHTML = config.changelog.map(item => `
${escapeHTML(item.type)}

v${escapeHTML(item.version)}

`).join(""); +} + +renderHome(); +renderDocs(); +renderChangelog(); + +window.addEventListener("storage", event => { + if (event.key === window.RUYIN_CONFIG_KEY) location.reload(); +}); diff --git a/dist/assets/brand.svg b/dist/assets/brand.svg new file mode 100644 index 0000000..febc82a --- /dev/null +++ b/dist/assets/brand.svg @@ -0,0 +1,12 @@ + + 如饮AI DrinkWater + 让 AI 像喝水一样自然 + + + + + + 如饮AI + DRINKWATER + 让 AI 像喝水一样自然 + diff --git a/dist/assets/icon.svg b/dist/assets/icon.svg new file mode 100644 index 0000000..c5e5e3e --- /dev/null +++ b/dist/assets/icon.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/dist/changelog.html b/dist/changelog.html new file mode 100644 index 0000000..d07061c --- /dev/null +++ b/dist/changelog.html @@ -0,0 +1,4 @@ +更新日志 · 如饮AI + +
What's new

每一次更新,都更接近自然。

记录新能力、体验优化与重要修复。

+ diff --git a/dist/config.js b/dist/config.js new file mode 100644 index 0000000..d9b7836 --- /dev/null +++ b/dist/config.js @@ -0,0 +1,50 @@ +window.RUYIN_DEFAULT_CONFIG = { + product: { + name: "如饮AI", + englishName: "DrinkWater", + version: "1.0.0", + tagline: "让 AI 像喝水一样自然", + headline: "让智能,成为你的自然延伸", + description: "一个能理解目标、调用工具并持续完成任务的桌面智能体。把复杂交给如饮AI,把时间留给真正重要的事。" + }, + downloads: { + windows: { label: "Windows", meta: "Windows 10 / 11 · 64 位", url: "#", size: "待配置", enabled: true }, + mac: { label: "macOS", meta: "macOS 12+ · Apple / Intel", url: "#", size: "待配置", enabled: true }, + linux: { label: "Linux", meta: "AppImage · x86_64", url: "#", size: "待配置", enabled: true } + }, + docs: [ + { id: "start", category: "入门", title: "开始使用如饮AI", summary: "从安装到完成第一个智能体任务。", content: "下载并安装适合你系统的版本。启动如饮AI后,在输入框中描述你想完成的目标。建议同时说明背景、期望结果和限制条件,让智能体更准确地执行任务。" }, + { id: "agent", category: "核心概念", title: "认识智能体", summary: "理解目标、上下文与工具调用。", content: "如饮AI 会围绕你的目标制定步骤,在获得授权后调用可用工具,并根据执行结果继续推进。你可以随时补充信息、调整方向或停止任务。" }, + { id: "tips", category: "使用技巧", title: "写出更好的任务", summary: "用简单结构获得更稳定的结果。", content: "一个清晰的任务通常包含:要做什么、给谁使用、需要参考什么、什么不能做,以及怎样算完成。你不需要学习复杂提示词,像和靠谱同事沟通一样自然即可。" }, + { id: "privacy", category: "安全", title: "权限与数据", summary: "清楚掌控每一次关键操作。", content: "在执行敏感操作前,请仔细确认授权范围。不要在任务中粘贴无关的密码、密钥或隐私信息。使用完成后,及时检查并撤销不再需要的权限。" } + ], + changelog: [ + { version: "1.0.0", date: "2026-11-06", type: "首发版本", highlights: ["全新桌面智能体工作台", "支持多步骤任务持续执行", "Windows、macOS 与 Linux 多平台下载", "更轻盈的上下文管理体验"] }, + { version: "0.9.0", date: "2026-10-18", type: "预览版本", highlights: ["完成核心交互与任务流", "优化长任务状态反馈", "新增运行过程随时接管能力"] } + ] +}; + +window.RUYIN_CONFIG_KEY = "ruyin-ai-site-config-v1"; +window.getRuyinConfig = function () { + try { + const saved = localStorage.getItem(window.RUYIN_CONFIG_KEY); + const defaults = structuredClone(window.RUYIN_DEFAULT_CONFIG); + if (!saved) return defaults; + const parsed = JSON.parse(saved); + const downloads = Object.fromEntries(Object.entries(defaults.downloads).map(([key, item]) => [key, { + ...item, + ...(parsed.downloads?.[key] || {}), + enabled: parsed.downloads?.[key]?.enabled !== false + }])); + return { + ...defaults, + ...parsed, + product: { ...defaults.product, ...(parsed.product || {}) }, + downloads, + docs: Array.isArray(parsed.docs) ? parsed.docs : defaults.docs, + changelog: Array.isArray(parsed.changelog) ? parsed.changelog : defaults.changelog + }; + } catch (error) { + return JSON.parse(JSON.stringify(window.RUYIN_DEFAULT_CONFIG)); + } +}; diff --git a/dist/docs.html b/dist/docs.html new file mode 100644 index 0000000..745992b --- /dev/null +++ b/dist/docs.html @@ -0,0 +1,4 @@ +文档 · 如饮AI + +
Documentation

简单开始,持续深入。

了解如饮AI 如何理解目标、推进任务,以及你如何始终掌握过程。

+ diff --git a/dist/index.html b/dist/index.html new file mode 100644 index 0000000..dd0a656 --- /dev/null +++ b/dist/index.html @@ -0,0 +1,32 @@ + + + + + + 如饮AI · 让 AI 像喝水一样自然 + + + + +
+
+
+ Desktop AI Agent +

让智能,成为你的自然延伸

+

一个能理解目标、调用工具并持续完成任务的桌面智能体。把复杂交给如饮AI,把时间留给真正重要的事。

+
下载 Windows 版其他系统当前版本 v1.0.0 · 自动识别你的系统
+
+
+
+
如饮AI · 工作流正在执行
“整理这周的项目进度,生成一份清晰的汇报。”
✓理解目标与交付格式完成
✓汇总项目资料完成
↗生成结构化周报
+
+
+
One agent, every desktop

选择你的工作平台

三端独立配置下载地址。无论你在哪里工作,如饮AI 都保持同样自然、连贯的体验。

+

不是再多一个工具。
是少做很多琐事。

从一句自然语言开始,让智能体理解目标、拆解步骤并推进到结果。你始终知道它在做什么,也随时可以接管。

从文档开始 →
+
+
+ + diff --git a/dist/styles.css b/dist/styles.css new file mode 100644 index 0000000..4bbbbb7 --- /dev/null +++ b/dist/styles.css @@ -0,0 +1,214 @@ +:root { + --bg: #07110e; + --bg-soft: #0a1813; + --surface: rgba(18, 39, 31, .72); + --surface-strong: #10271f; + --line: rgba(175, 255, 211, .13); + --text: #f3fbf6; + --muted: #9eb2a8; + --brand: #8cf0b7; + --brand-strong: #57da90; + --brand-deep: #1f6f54; + --white: #fff; + --radius: 28px; + --shadow: 0 24px 80px rgba(0, 0, 0, .34); + color-scheme: dark; +} + +* { box-sizing: border-box; } +html { scroll-behavior: smooth; } +body { + margin: 0; + min-width: 320px; + background: + radial-gradient(circle at 72% 18%, rgba(52, 191, 117, .16), transparent 27rem), + radial-gradient(circle at 14% 42%, rgba(44, 118, 93, .13), transparent 22rem), + var(--bg); + color: var(--text); + font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif; + line-height: 1.6; + -webkit-font-smoothing: antialiased; +} +body::before { + content: ""; + position: fixed; + inset: 0; + pointer-events: none; + opacity: .28; + background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); + background-size: 48px 48px; + mask-image: linear-gradient(to bottom, black, transparent 75%); + z-index: -1; +} +a { color: inherit; text-decoration: none; } +button, input, textarea { font: inherit; } +button, a { -webkit-tap-highlight-color: transparent; } + +.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; } +.site-header { + position: sticky; + top: 0; + z-index: 30; + padding: 18px 0; + background: linear-gradient(to bottom, rgba(7, 17, 14, .94), rgba(7, 17, 14, .68), transparent); + backdrop-filter: blur(18px); +} +.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; } +.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; } +.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 8px 25px rgba(31, 111, 84, .36); } +.brand img.brand-lockup { width: 242px; height: auto; border-radius: 0; box-shadow: none; } +.brand-copy { display: grid; line-height: 1.1; } +.brand-copy strong { font-size: 17px; letter-spacing: -.02em; } +.brand-copy small { color: var(--muted); font-size: 9px; letter-spacing: .18em; margin-top: 5px; } +.nav-links { display: flex; align-items: center; gap: 8px; } +.nav-link { + padding: 10px 16px; + border: 1px solid transparent; + border-radius: 999px; + color: #c5d5cd; + font-size: 14px; + transition: .25s ease; +} +.nav-link:hover, .nav-link.active { border-color: var(--line); background: rgba(255,255,255,.05); color: #fff; } + +.hero { min-height: 750px; padding: 76px 0 86px; position: relative; overflow: hidden; } +.hero-grid { display: grid; grid-template-columns: 1.02fr .98fr; gap: 40px; align-items: center; } +.eyebrow { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; } +.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; box-shadow: 0 0 10px currentColor; } +h1 { margin: 24px 0 22px; font-size: clamp(52px, 6.3vw, 88px); line-height: .98; letter-spacing: -.065em; font-weight: 620; } +.gradient-text { display: block; color: transparent; background: linear-gradient(100deg, #f4fff8 4%, #b9f6d3 47%, #67df9c 94%); background-clip: text; -webkit-background-clip: text; } +.hero-copy > p { max-width: 610px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.8; } +.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 38px; } +.button { + display: inline-flex; align-items: center; justify-content: center; gap: 10px; + min-height: 52px; padding: 0 22px; border: 0; border-radius: 14px; + cursor: pointer; transition: transform .22s ease, box-shadow .22s ease, background .22s ease; +} +.button:hover { transform: translateY(-2px); } +.button.disabled { opacity: .48; cursor: not-allowed; pointer-events: none; box-shadow: none; } +.button.primary { color: #062414; background: linear-gradient(135deg, #b6ffd5, #67df9c); box-shadow: 0 16px 35px rgba(77, 218, 140, .21); font-weight: 700; } +.button.secondary { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: #e7f5ed; } +.version-note { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 2px; color: #71877c; font-size: 12px; } +.version-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); } + +.agent-visual { position: relative; min-height: 540px; display: grid; place-items: center; perspective: 1000px; } +.orb { position: absolute; border-radius: 50%; filter: blur(1px); animation: float 8s ease-in-out infinite; } +.orb.one { width: 420px; height: 420px; background: radial-gradient(circle at 35% 30%, rgba(174,255,210,.58), rgba(32,129,87,.28) 34%, rgba(7,17,14,0) 70%); box-shadow: inset -38px -40px 90px rgba(3, 34, 21, .42), 0 0 110px rgba(72, 229, 143, .12); } +.orb.two { width: 88px; height: 88px; right: 6%; top: 12%; background: radial-gradient(circle at 30% 25%, #c9ffe0, #34a76d 55%, #0b3323); animation-delay: -2s; } +.orb.three { width: 30px; height: 30px; left: 8%; bottom: 21%; background: #7de9aa; box-shadow: 0 0 35px #5bdb91; animation-delay: -4s; } +.agent-card { + position: relative; width: min(400px, 84%); padding: 22px; + border: 1px solid rgba(190,255,216,.19); border-radius: 30px; + background: linear-gradient(145deg, rgba(23,55,42,.78), rgba(6,22,16,.74)); + box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.06); backdrop-filter: blur(28px); + transform: rotateY(-7deg) rotateX(4deg); animation: cardFloat 7s ease-in-out infinite; +} +.card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; } +.status { display: flex; align-items: center; gap: 7px; } +.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 12px var(--brand); } +.prompt { margin-top: 48px; font-size: 21px; line-height: 1.5; letter-spacing: -.02em; } +.prompt span { color: var(--brand); } +.agent-steps { display: grid; gap: 10px; margin-top: 32px; } +.step { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.045); color: #bed0c7; font-size: 12px; } +.step-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: var(--brand); background: rgba(109,229,161,.1); } +.step-done { color: #789083; } +.thinking { display: flex; gap: 4px; } +.thinking i { width: 4px; height: 4px; border-radius: 50%; background: var(--brand); animation: pulse 1.2s infinite; } +.thinking i:nth-child(2) { animation-delay: .2s; }.thinking i:nth-child(3) { animation-delay: .4s; } + +.platforms { padding: 32px 0 120px; } +.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; } +.section-head h2, .page-title h1 { margin: 10px 0 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.1; letter-spacing: -.045em; } +.section-head p { max-width: 460px; margin: 0; color: var(--muted); } +.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; } +.download-card { position: relative; min-height: 230px; padding: 26px; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(145deg, rgba(19,44,34,.8), rgba(10,24,19,.86)); transition: .28s ease; } +.download-card:hover { transform: translateY(-6px); border-color: rgba(142,240,185,.35); box-shadow: 0 22px 55px rgba(0,0,0,.24); } +.download-card::after { content: ""; position: absolute; width: 160px; height: 160px; right: -55px; bottom: -72px; border-radius: 50%; background: var(--brand-deep); filter: blur(50px); opacity: .3; } +.os-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: rgba(139,240,182,.1); color: var(--brand); } +.download-card h3 { margin: 24px 0 3px; font-size: 21px; } +.download-card p { margin: 0; color: var(--muted); font-size: 13px; } +.card-download { position: absolute; z-index: 2; left: 26px; bottom: 24px; display: inline-flex; align-items: center; gap: 8px; color: #eafff2; font-size: 13px; } +.card-download svg { transition: transform .2s ease; }.card-download:hover svg { transform: translateY(3px); } + +.promise { padding-bottom: 120px; } +.promise-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 54px; border-radius: var(--radius); background: linear-gradient(125deg, #e1ffed, #80e8ad); color: #092818; overflow: hidden; position: relative; } +.promise-panel::after { content: ""; position: absolute; width: 360px; height: 360px; right: -70px; top: -170px; border: 1px solid rgba(9,40,24,.16); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.09), 0 0 0 84px rgba(255,255,255,.07); } +.promise-panel h2 { margin: 0; font-size: clamp(36px, 4.5vw, 64px); line-height: 1; letter-spacing: -.055em; } +.promise-copy { display: grid; align-content: end; position: relative; z-index: 1; } +.promise-copy p { margin: 0 0 22px; font-size: 16px; color: rgba(9,40,24,.72); } +.promise-copy a { width: fit-content; font-weight: 700; border-bottom: 1px solid currentColor; } + +.site-footer { padding: 0 0 28px; color: #6e8378; font-size: 12px; } +.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 22px; border-top: 1px solid var(--line); } + +.page-main { min-height: calc(100vh - 160px); padding: 74px 0 110px; } +.page-title { max-width: 760px; margin-bottom: 54px; } +.page-title p { color: var(--muted); font-size: 17px; } +.docs-layout { display: grid; grid-template-columns: 250px 1fr; gap: 42px; } +.docs-nav { position: sticky; top: 106px; align-self: start; display: grid; gap: 6px; } +.docs-nav a { padding: 10px 12px; color: var(--muted); border-left: 1px solid var(--line); font-size: 13px; } +.docs-nav a:hover, .docs-nav a.active { color: var(--brand); border-color: var(--brand); background: linear-gradient(90deg, rgba(104,222,155,.08), transparent); } +.docs-list { display: grid; gap: 14px; } +.doc-card { scroll-margin-top: 118px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: rgba(15,35,28,.62); } +.doc-card .category { color: var(--brand); font-size: 11px; letter-spacing: .12em; } +.doc-card h2 { margin: 9px 0 9px; font-size: 24px; letter-spacing: -.025em; } +.doc-card .summary { color: #c2d2c9; margin: 0 0 18px; } +.doc-card .content { color: var(--muted); margin: 0; white-space: pre-wrap; } +.timeline { position: relative; max-width: 900px; } +.timeline::before { content: ""; position: absolute; left: 13px; top: 12px; bottom: 0; width: 1px; background: linear-gradient(var(--brand), transparent); } +.release { position: relative; padding: 0 0 58px 62px; } +.release::before { content: ""; position: absolute; left: 6px; top: 8px; width: 14px; height: 14px; border: 6px solid var(--bg); border-radius: 50%; background: var(--brand); box-shadow: 0 0 22px rgba(113,230,163,.5); } +.release-meta { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; } +.release-tag { padding: 4px 9px; border-radius: 999px; color: var(--brand); background: rgba(103,223,156,.09); } +.release h2 { margin: 12px 0 18px; font-size: 32px; letter-spacing: -.03em; } +.release ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #b7c9bf; } +.release li { position: relative; padding-left: 18px; } +.release li::before { content: ""; position: absolute; left: 0; top: .75em; width: 5px; height: 5px; border-radius: 50%; background: var(--brand); } +.empty-state { padding: 38px; text-align: center; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); } +.toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; transform: translate(-50%, 18px); padding: 11px 16px; border-radius: 12px; background: #e7fff1; color: #092818; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s ease; box-shadow: 0 14px 40px rgba(0,0,0,.28); } +.toast.show { opacity: 1; transform: translate(-50%, 0); } + +@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-18px) scale(1.025); } } +@keyframes cardFloat { 0%,100% { transform: rotateY(-7deg) rotateX(4deg) translateY(0); } 50% { transform: rotateY(-4deg) rotateX(2deg) translateY(-12px); } } +@keyframes pulse { 0%,80%,100% { opacity: .25; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.15); } } + +@media (max-width: 900px) { + .hero { padding-top: 34px; } + .hero-grid { grid-template-columns: 1fr; } + .hero-copy { text-align: center; } + .hero-copy .eyebrow, .hero-actions { justify-content: center; } + .hero-copy > p { margin-inline: auto; } + .version-note { justify-content: center; } + .agent-visual { min-height: 460px; } + .download-grid { grid-template-columns: 1fr; } + .download-card { min-height: 190px; } + .promise-panel { grid-template-columns: 1fr; padding: 40px; min-height: 360px; } + .docs-layout { grid-template-columns: 1fr; } + .docs-nav { position: relative; top: 0; grid-template-columns: repeat(2, 1fr); } +} +@media (max-width: 620px) { + .shell { width: min(100% - 28px, 1180px); } + .site-header { padding: 12px 0; } + .brand-copy small { display: none; } + .brand img.brand-lockup { width: 166px; } + .nav { gap: 8px; } + .nav-link { padding: 9px 11px; font-size: 12px; } + h1 { font-size: 48px; } + .hero { min-height: auto; padding-bottom: 42px; } + .hero-copy > p { font-size: 16px; } + .hero-actions .button { width: 100%; } + .agent-visual { min-height: 390px; margin-inline: -10px; } + .orb.one { width: 330px; height: 330px; } + .agent-card { width: 90%; padding: 18px; } + .prompt { margin-top: 34px; font-size: 18px; } + .section-head { align-items: start; flex-direction: column; } + .platforms, .promise { padding-bottom: 80px; } + .promise-panel { padding: 32px 26px; } + .footer-row { align-items: flex-start; flex-direction: column; } + .page-main { padding-top: 44px; } + .docs-nav { grid-template-columns: 1fr; } + .release { padding-left: 42px; } +} +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; } +} diff --git a/scripts/preview-server.js b/scripts/preview-server.js new file mode 100644 index 0000000..c10fe73 --- /dev/null +++ b/scripts/preview-server.js @@ -0,0 +1,22 @@ +const root = `${import.meta.dir}/../dist`; +const contentTypes = { + ".html": "text/html; charset=utf-8", + ".css": "text/css; charset=utf-8", + ".js": "text/javascript; charset=utf-8", + ".svg": "image/svg+xml" +}; + +Bun.serve({ + port: Number(process.env.PORT || 4173), + async fetch(request) { + const url = new URL(request.url); + const relative = url.pathname === "/" ? "/index.html" : url.pathname; + if (relative.includes("..")) return new Response("Not found", { status: 404 }); + const file = Bun.file(`${root}${relative}`); + if (!(await file.exists())) return new Response("Not found", { status: 404 }); + const extension = relative.slice(relative.lastIndexOf(".")); + return new Response(file, { headers: { "content-type": contentTypes[extension] || "application/octet-stream" } }); + } +}); + +console.log("如饮AI preview: http://127.0.0.1:4173");