From b1be05309bc4b4f31fb42a050a7ad689975e3ee6 Mon Sep 17 00:00:00 2001 From: Simon <10131203+gaomeng1900@users.noreply.github.com> Date: Sat, 14 Feb 2026 18:54:43 +0800 Subject: [PATCH] feat(website): wording and style --- README-zh.md | 22 +- README.md | 22 +- packages/website/src/components/Header.tsx | 2 +- .../website/src/components/ui/marquee.tsx | 74 ++ packages/website/src/index.css | 18 + packages/website/src/pages/Home.tsx | 674 +----------------- .../src/pages/home/FeaturesSection.tsx | 166 +++++ .../website/src/pages/home/HeroSection.tsx | 358 ++++++++++ .../src/pages/home/OneMoreThingSection.tsx | 98 +++ .../src/pages/home/ScenariosSection.tsx | 172 +++++ 10 files changed, 909 insertions(+), 697 deletions(-) create mode 100644 packages/website/src/components/ui/marquee.tsx create mode 100644 packages/website/src/pages/home/FeaturesSection.tsx create mode 100644 packages/website/src/pages/home/HeroSection.tsx create mode 100644 packages/website/src/pages/home/OneMoreThingSection.tsx create mode 100644 packages/website/src/pages/home/ScenariosSection.tsx diff --git a/README-zh.md b/README-zh.md index 585e946..851c42f 100644 --- a/README-zh.md +++ b/README-zh.md @@ -30,6 +30,13 @@ - **🎨 精美 UI,支持人机协同** - **🐙 可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/#/docs/features/chrome-extension),支持跨页面任务。** +## 💡 应用场景 + +- **SaaS AI 副驾驶** — 几行代码为你的产品加上 AI 副驾驶,不需要重写后端。 +- **智能表单填写** — 把 20 次点击变成一句话。ERP、CRM、管理后台的最佳拍档。 +- **无障碍增强** — 用自然语言让任何网页无障碍。语音指令、屏幕阅读器,零门槛。 +- **跨页面 Agent** — 通过可选的 [Chrome 扩展](https://alibaba.github.io/page-agent/#/docs/features/chrome-extension),让你的 Agent 跨标签页工作。 + ## 🚀 快速开始 ### 一行代码集成 @@ -68,21 +75,6 @@ await agent.execute('点击登录按钮') 更多编程用法,请参阅 [📖 文档](https://alibaba.github.io/page-agent/#/docs/introduction/overview)。 -## 🏗️ 架构设计 - -PageAgent adopts a simplified monorepo structure: - -``` -packages/ -├── core/ # ** Core agent logic (npm: @page-agent/core) ** -├── llms/ # LLM 客户端 (npm: @page-agent/llms) -├── page-controller/ # DOM 操作 (npm: @page-agent/page-controller) -├── ui/ # 面板 UI (npm: @page-agent/ui) -├── page-agent/ # 入口类 & iife 包 (npm: page-agent) -├── extension/ # Chrome 扩展,支持跨页面任务 -└── website/ # 网站 & 文档站点 -``` - ## 🤝 贡献 欢迎社区贡献!请参阅 [CONTRIBUTING.md](CONTRIBUTING.md) 了解环境配置和本地开发说明。 diff --git a/README.md b/README.md index 6d79e51..d2c4cae 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,13 @@ The GUI Agent Living in Your Webpage. Control web interfaces with natural langua - **🎨 Pretty UI with human-in-the-loop** - **🐙 Optional [chrome extension](https://alibaba.github.io/page-agent/#/docs/features/chrome-extension) for multi-page tasks.** +## 💡 Use Cases + +- **SaaS AI Copilot** — Ship an AI copilot in your product in lines of code. No backend rewrite needed. +- **Smart Form Filling** — Turn 20-click workflows into one sentence. Perfect for ERP, CRM, and admin systems. +- **Accessibility** — Make any web app accessible through natural language. Voice commands, screen readers, zero barrier. +- **Multi-page Agent** — Extend your agent's reach across browser tabs with the optional [chrome extension](https://alibaba.github.io/page-agent/#/docs/features/chrome-extension). + ## 🚀 Quick Start ### One-line integration @@ -68,21 +75,6 @@ await agent.execute('Click the login button') For more programmatic usage, see [📖 Documentations](https://alibaba.github.io/page-agent/#/docs/introduction/overview). -## 🏗️ Structure - -PageAgent adopts a simplified monorepo structure: - -``` -packages/ -├── core/ # ** Core agent logic (npm: @page-agent/core) ** -├── llms/ # LLM client (npm: @page-agent/llms) -├── page-controller/ # DOM operations (npm: @page-agent/page-controller) -├── ui/ # Panel UI (npm: @page-agent/ui) -├── page-agent/ # Entry class and iife builds(npm: page-agent) -├── extension/ # Chrome extension for multi-page tasks -└── website/ # Website & Documentation site -``` - ## 🤝 Contributing We welcome contributions from the community! Follow our instructions in [CONTRIBUTING.md](CONTRIBUTING.md) for environment setup and local development. diff --git a/packages/website/src/components/Header.tsx b/packages/website/src/components/Header.tsx index 53edaf8..3d9fe31 100644 --- a/packages/website/src/components/Header.tsx +++ b/packages/website/src/components/Header.tsx @@ -44,7 +44,7 @@ export default function Header() { animateOnHover={true} aria-hidden="true" > - GUI Agent in your webpage + AI Agent In Your Webpage diff --git a/packages/website/src/components/ui/marquee.tsx b/packages/website/src/components/ui/marquee.tsx new file mode 100644 index 0000000..75027d0 --- /dev/null +++ b/packages/website/src/components/ui/marquee.tsx @@ -0,0 +1,74 @@ +import { ComponentPropsWithoutRef } from 'react' + +import { cn } from '@/lib/utils' + +interface MarqueeProps extends ComponentPropsWithoutRef<'div'> { + /** + * Optional CSS class name to apply custom styles + */ + className?: string + /** + * Whether to reverse the animation direction + * @default false + */ + reverse?: boolean + /** + * Whether to pause the animation on hover + * @default false + */ + pauseOnHover?: boolean + /** + * Content to be displayed in the marquee + */ + children: React.ReactNode + /** + * Whether to animate vertically instead of horizontally + * @default false + */ + vertical?: boolean + /** + * Number of times to repeat the content + * @default 4 + */ + repeat?: number +} + +export function Marquee({ + className, + reverse = false, + pauseOnHover = false, + children, + vertical = false, + repeat = 4, + ...props +}: MarqueeProps) { + return ( +
+ {Array(repeat) + .fill(0) + .map((_, i) => ( +
+ {children} +
+ ))} +
+ ) +} diff --git a/packages/website/src/index.css b/packages/website/src/index.css index 568b065..8fd8c28 100644 --- a/packages/website/src/index.css +++ b/packages/website/src/index.css @@ -377,6 +377,24 @@ td { background-position: bottom center; } } + --animate-marquee: marquee var(--duration) infinite linear; + --animate-marquee-vertical: marquee-vertical var(--duration) linear infinite; + @keyframes marquee { + from { + transform: translateX(0); + } + to { + transform: translateX(calc(-100% - var(--gap))); + } + } + @keyframes marquee-vertical { + from { + transform: translateY(0); + } + to { + transform: translateY(calc(-100% - var(--gap))); + } + } } /* shadcn dark mode */ diff --git a/packages/website/src/pages/Home.tsx b/packages/website/src/pages/Home.tsx index d410483..b76ad17 100644 --- a/packages/website/src/pages/Home.tsx +++ b/packages/website/src/pages/Home.tsx @@ -1,678 +1,20 @@ -/* eslint-disable react-dom/no-dangerously-set-innerhtml */ -import { - Bot, - Box, - ExternalLink, - MessageSquare, - PlayCircle, - Shield, - Sparkles, - Users, - Zap, -} from 'lucide-react' -import { PageAgent } from 'page-agent' -import { useEffect, useState } from 'react' -import { siGooglechrome } from 'simple-icons' -import { Link, useSearchParams } from 'wouter' - import Footer from '../components/Footer' import Header from '../components/Header' -import { AnimatedGradientText } from '../components/ui/animated-gradient-text' -import { Highlighter } from '../components/ui/highlighter' -import { NeonGradientCard } from '../components/ui/neon-gradient-card' -import { Particles } from '../components/ui/particles' -import { SparklesText } from '../components/ui/sparkles-text' -import { - CDN_DEMO_CN_URL, - CDN_DEMO_URL, - DEMO_API_KEY, - DEMO_BASE_URL, - DEMO_MODEL, -} from '../constants' -import { useLanguage } from '../i18n/context' - -function getInjection(useCN?: boolean) { - const cdn = useCN ? CDN_DEMO_CN_URL : CDN_DEMO_URL - - const injection = encodeURI( - `javascript:(function(){var s=document.createElement('script');s.src=\`${cdn}?t=\${Math.random()}\`;s.setAttribute('crossorigin', true);s.type="text/javascript";s.onload=()=>console.log('PageAgent script loaded!');document.body.appendChild(s);})();` - ) - - return ` - - ✨PageAgent - - ` -} +import FeaturesSection from './home/FeaturesSection' +import HeroSection from './home/HeroSection' +import OneMoreThingSection from './home/OneMoreThingSection' +import ScenariosSection from './home/ScenariosSection' export default function HomePage() { - const { language, isZh } = useLanguage() - - const defaultTask = isZh - ? '从导航栏中进入文档页,打开"快速开始"相关的文档,帮我总结成 markdown' - : 'Goto docs in navigation bar, find Quick-Start section, and summarize in markdown' - - const [task, setTask] = useState(() => defaultTask) - - // Update task when language changes - useEffect(() => { - setTask(defaultTask) - }, [defaultTask]) - - const [params, setParams] = useSearchParams() - const isOther = params.has('try_other') - - const [activeTab, setActiveTab] = useState<'try' | 'other'>(isOther ? 'other' : 'try') - const [cdnSource, setCdnSource] = useState<'international' | 'china'>('international') - - const handleExecute = async () => { - if (!task.trim()) return - - const win = window as any - - if (!win.pageAgent || win.pageAgent.disposed) { - win.pageAgent = new PageAgent({ - // 把 react 根元素排除掉,挂了很多冒泡时间导致假阳 - interactiveBlacklist: [document.getElementById('root')!], - language: language, - - instructions: { - system: 'You are a helpful assistant on PageAgent website.', - getPageInstructions: (url) => { - const hint = url.includes('page-agent') ? 'This is PageAgent demo page.' : undefined - console.log('[instructions] getPageInstructions:', url, '->', hint) - return hint - }, - }, - - model: - import.meta.env.DEV && import.meta.env.LLM_MODEL_NAME - ? import.meta.env.LLM_MODEL_NAME - : DEMO_MODEL, - baseURL: - import.meta.env.DEV && import.meta.env.LLM_BASE_URL - ? import.meta.env.LLM_BASE_URL - : DEMO_BASE_URL, - apiKey: - import.meta.env.DEV && import.meta.env.LLM_API_KEY - ? import.meta.env.LLM_API_KEY - : DEMO_API_KEY, - - // enableAskUser: false, - // promptForNextTask: false, - // enablePanel: false, - }) - } - - const result = await win.pageAgent.execute(task) - console.log(result) - } - return (
- {/* Hero Section */}
-
-
- {/* Background Pattern + Particles */} - - - -
-
- - - GUI Agent in your webpage - -
- -

- {isZh ? '让你的 Web 应用' : 'The AI Operator'} -
- {isZh ? '拥有 AI 操作员' : 'Living in Your Web App'} -

- -

- - - {isZh ? '🪄一行代码' : '🪄One line of code'} - - - {isZh - ? ',为你的网站添加 GUI Agent。' - : ' adds intelligent GUI Agents to your website.'} -
- {isZh - ? '用户/答疑机器人给出文字指示,AI 帮你操作页面。' - : 'Users give natural language commands, AI handles the rest.'} -

- - {/* Try It Now Section - Tab Card */} -
-
- - {/* Tab Headers */} -
- - -
- - {/* Tab Content */} -
- {activeTab === 'try' && ( -
-
- setTask(e.target.value)} - placeholder={ - isZh - ? '输入您想要 AI 执行的任务...' - : 'Describe what you want AI to do...' - } - className="w-full px-4 py-3 pr-20 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white placeholder-gray-500 dark:placeholder-gray-400 focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-none text-sm mb-0" - data-page-agent-not-interactive - /> - -
-
- )} - - {activeTab === 'other' && ( -
- {/* 左侧:操作步骤 */} -
- {/* Keyboard Shortcut Hint */} -
-

- - {isZh ? '步骤 1:' : 'Step 1:'} - {' '} - {isZh ? '显示收藏夹栏' : 'Show your bookmarks bar'} -

-
- - Ctrl + Shift + B - - - {isZh ? '或' : 'or'} - - - ⌘ + Shift + B - -
-
- - {/* Draggable Bookmarklet */} -
-

- - {isZh ? '步骤 2:' : 'Step 2:'} - {' '} - {isZh - ? '拖拽下面按钮到收藏夹栏' - : 'Drag this button to your bookmarks'} -

-
- -
-
-
- - {/* Usage Instructions */} -
-

- - {isZh ? '步骤 3:' : 'Step 3:'} - {' '} - {isZh - ? '在其他网站点击收藏夹中的按钮即可使用' - : 'Click the bookmark on any site to activate'} -

-
-
- - {/* 右侧:注意事项 */} -
-

- {isZh ? '⚠️ 注意' : '⚠️ Heads Up'} -

-
    -
  • - - {isZh - ? '仅做技术评估,链接定期失效' - : 'Demo only—link may expire without notice'} -
  • -
  • - - {isZh - ? '使用 DeepSeek 模型,参考 DeepSeek 用户协议和隐私政策' - : 'This free demo uses DeepSeek API (see their terms and privacy policy)'} -
  • -
  • - - {isZh - ? '部分网站屏蔽了链接嵌入,将无反应' - : 'Some sites block script injection (CSP policies)'} -
  • -
  • - - {isZh - ? '仅支持单页应用,页面跳转后需要重新注入' - : 'Works on single-page apps only—reload required after navigation'} -
  • -
  • - - {isZh - ? '仅识别文本,不识别图像,不支持拖拽等复杂交互' - : 'Text-only understanding—no image recognition or drag-and-drop'} -
  • -
  • - - {isZh ? '详细使用限制参照' : 'Full limitations in'}{' '} - - {isZh ? '《文档》' : 'Docs'} - -
  • -
-
-
- )} -
-
-
-
- -
    -
  • - - {isZh ? '纯前端方案' : 'Pure Front-end Solution'} -
  • -
  • - - {isZh ? '支持私有模型' : 'Your Own Models'} -
  • -
  • - - {isZh ? '无痛脱敏' : 'Built-in Privacy'} -
  • -
  • - - {isZh ? 'MIT 开源' : 'MIT Open Source'} -
  • -
-
-
-
- - {/* Features Section */} -
-
-
- {/* Feature 1 */} -
- -

- {isZh ? '纯页面内方案' : 'In-page Solution'} -

-

- {isZh - ? '完全运行在你的页面内。不需要浏览器插件、不需要无头浏览器,不需要后端。' - : 'Runs entirely within your page. No browser extensions, no headless browsers, and no backend required.'} -

-
- - {/* Feature 2 */} -
- -

- {isZh ? '零后端部署' : 'Zero Backend Setup'} -

-

- {isZh - ? '前端脚本引入,自定义 LLM 接入点。从 OpenAI 到 qwen3,完全由你掌控。' - : 'Just drop in a script. Works with any LLM provider—OpenAI, Anthropic, or your own models.'} -

-
- - {/* Feature 3 */} -
- -

- {isZh ? '普惠智能交互' : 'Natural Language UI'} -

-

- {isZh - ? '为复杂 B端系统、管理后台提供自然语言入口。让每个用户都能轻松上手。' - : 'Transform complex admin panels into chat interfaces. Make powerful tools accessible to everyone, not just experts.'} -

-
- - {/* Feature 4 */} -
- -

- {isZh ? '安全可控集成' : 'Secure by Design'} -

-

- {isZh - ? '支持操作黑白名单、数据脱敏保护。注入自定义知识库,让 AI 按你的规则工作。' - : 'Control what AI can access with allowlists, data masking, and custom knowledge injection. Your rules, your data.'} -

-
-
-
-
- - {/* Use Cases Section */} -
-
-
- - {isZh ? '应用场景' : 'Where It Shines'} - -

- {isZh - ? '从简单的表单填写到复杂的业务流程,AI 都能理解并执行' - : 'From simple forms to complex workflows, AI understands and executes'} -

-
- -
- {/* Use Case 1 */} -
-
-
- -
- -
-

- {isZh ? '对接答疑机器人' : 'Supercharge Support Bots'} -

-

- {isZh - ? '把你的答疑助手变成全能Agent。客服机器人不再只说「请先点击设置按钮然后点击...」,而是直接帮用户现场操作。' - : 'Stop telling users where to click—let AI do it for them. Turn your chatbot from a guide into an operator that actually completes tasks.'} -

-
-
-
- - {/* Use Case 2 */} -
-
-
- -
-
-

- {isZh ? '交互升级/智能化改造' : 'Modernize Legacy Apps'} -

-

- {isZh - ? '一行代码,老应用变身Agent,产品专家帮用户操作复杂 B 端软件。降低人工支持成本,提高用户满意度。' - : 'Add AI superpowers to old software without rebuilding. One script tag transforms complex enterprise tools into chat-driven interfaces.'} -

-
-
-
- - {/* Use Case 3 */} -
-
-
- -
-
-

- {isZh ? '产品教学' : 'Interactive Walkthroughs'} -

-

- {isZh - ? '向用户演示交互过程,边做边教。例如让AI演示「如何提交报销申请」的完整操作流程。' - : "Show, don't tell. Let AI demonstrate workflows in real-time—perfect for onboarding or training new users on complex systems."} -

-
-
-
- - {/* Use Case 4 */} -
-
-
- -
-
-

- {isZh ? '无障碍支持' : 'Accessibility First'} -

-

- {isZh - ? '为视障用户、老年用户提供自然语言交互,对接屏幕阅读器或语音助理,让软件人人可用。' - : 'Make web apps accessible through natural language. Perfect for screen readers, voice control, or users who find traditional interfaces challenging.'} -

-
-
-
-
-
-
- - {/* One More Thing */} -
-
-

- One More Thing -

-

- {isZh - ? '想要多页面控制?试试可选的浏览器扩展。' - : 'Need multi-page control? Try the optional browser extension.'} -

-

- {'* '} - {isZh - ? 'PageAgent.js 本身无需任何扩展即可工作,扩展是额外的能力增强。' - : 'PageAgent.js works without any extension — this is a power-up, not a dependency.'} -

- -
- - Chrome Web Store - {isZh ? '从 Chrome 应用商店安装' : 'Install from Chrome Web Store'} - - - - - {isZh ? '查看文档' : 'Read the Docs'} - -
- -
-
-

- {isZh ? '多页面任务' : 'Multi-Page Tasks'} -

-

- {isZh - ? '跨多个页面和标签页连续执行任务,不再受限于单页上下文' - : 'Run tasks across multiple pages and tabs without being limited to a single page context'} -

-
-
-

- {isZh ? '页面内发起控制' : 'Control from Your Page'} -

-

- {isZh - ? '在页面 JS 中发起任务,驱动整个浏览器完成跨标签操作' - : 'Trigger tasks from page JS to drive the entire browser across tabs'} -

-
-
-

- {isZh ? '外部发起任务' : 'External Triggers'} -

-

- {isZh - ? '页面 JS、本地 Agent 或云端 Agent 均可通过扩展发起任务' - : 'Page JS, local agents, or cloud agents can trigger tasks through the extension'} -

-
-
-
-
+ + + +