landing-page-vercel

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Landing Page (Vercel)

着陆页(Vercel)

Create a production-ready static landing page with:
  • Structure: Semantic HTML5 + Modern CSS + Vanilla JS
  • Form: Working email capture (Formspree or custom endpoint)
  • Analytics: Plausible/Fathom ready
  • Design: Responsive, accessible, performant
  • Deploy: One-click Vercel deployment
创建一个可投入生产环境的静态着陆页,包含:
  • 结构: 语义化HTML5 + 现代CSS + 原生JS
  • 表单: 可用的邮箱捕获功能(支持Formspree或自定义接口)
  • 分析: 已适配Plausible/Fathom
  • 设计: 响应式、可访问、高性能
  • 部署: 一键部署至Vercel

What Makes This Different

核心优势

This skill generates working landing pages, not empty templates:
  • Real email capture form that actually submits
  • Analytics integration ready to activate
  • Responsive design tested on mobile
  • Accessibility basics (WCAG 2.1 AA)
  • Content from your PRD brief

本技能生成的是可直接使用的着陆页,而非空模板:
  • 可实际提交的真实邮箱捕获表单
  • 已预置分析集成,可直接激活
  • 经过移动端测试的响应式设计
  • 基础无障碍支持(符合WCAG 2.1 AA标准)
  • 可根据你的PRD文档生成对应内容

Workflow

工作流程

Phase 1: PRD Brief Intake

第一阶段:PRD需求收集

Ask the user for product details, then extract and confirm:
I'll help you create a landing page. Based on your description:

**Product:** [Name]
**Tagline:** [One-line value proposition]

**Hero Section:**
- Headline: [Main headline]
- Subheadline: [Supporting text]
- CTA: [Button text]

**Features:** (3-5)
1. [Feature 1]: [Description]
2. [Feature 2]: [Description]
3. [Feature 3]: [Description]

**CTA Type:** [Waitlist / Sign Up / Demo Request / Contact]

**Social Proof:** [Testimonials / Logos / Stats / None]

Is this correct? Any adjustments?
向用户获取产品细节,然后提取并确认:
我将帮你创建着陆页。根据你的描述:

**产品名称:** [名称]
**标语:** [一句话价值主张]

**英雄区:**
- 主标题:[核心标题]
- 副标题:[辅助说明文本]
- 行动按钮:[按钮文字]

**功能特性:**(3-5个)
1. [特性1]:[描述]
2. [特性2]:[描述]
3. [特性3]:[描述]

**行动类型:** [等待列表 / 注册 / 演示申请 / 联系我们]

**社交证明:** [客户评价 / 合作品牌Logo / 数据统计 / 无]

以上信息是否正确?是否需要调整?

Phase 2: Content Generation

第二阶段:内容生成

Generate complete landing page content:
Sections:
  1. Hero - Headline, subheadline, CTA button, optional hero image
  2. Features - 3-5 feature cards with icons
  3. How It Works - 3-step process (optional)
  4. Social Proof - Testimonials or logos (optional)
  5. FAQ - 4-6 common questions (optional)
  6. CTA - Final call to action with form
  7. Footer - Links, copyright, social icons
生成完整的着陆页内容:
页面板块:
  1. 英雄区 - 主标题、副标题、行动按钮、可选英雄图片
  2. 功能特性 - 3-5个带图标功能卡片
  3. 工作流程 - 3步流程说明(可选)
  4. 社交证明 - 客户评价或品牌Logo(可选)
  5. 常见问题 - 4-6个常见问题(可选)
  6. 最终行动区 - 带表单的最终行动号召
  7. 页脚 - 链接、版权信息、社交图标

Phase 3: Form Integration

第三阶段:表单集成

Email Capture Options:
  1. Formspree (Recommended - Free tier)
    • No backend needed
    • Instant setup
    • Email notifications
  2. Custom Endpoint
    • Your own API
    • Full control
    • Requires backend
  3. Waitlist Service
    • Waitlist.email
    • Loops.so
    • ConvertKit
邮箱捕获选项:
  1. Formspree(推荐 - 免费版可用)
    • 无需后端服务
    • 即时设置
    • 邮件通知
  2. 自定义接口
    • 使用自有API
    • 完全可控
    • 需要后端支持
  3. 等待列表服务
    • Waitlist.email
    • Loops.so
    • ConvertKit

Phase 4: Quality Verification

第四阶段:质量验证

Verify before handoff:
  • HTML validates (W3C)
  • Responsive on mobile
  • Form submits successfully
  • Analytics placeholders present
  • Lighthouse score 90+

交付前需验证:
  • HTML通过W3C验证
  • 移动端响应正常
  • 表单可正常提交
  • 已预置分析占位符
  • Lighthouse评分90+

Usage

使用方法

bash
undefined
bash
undefined

Create landing page with PRD

根据PRD创建着陆页

python3 ~/.claude/skills/landing-page-vercel/scripts/scaffold.py
--out ./my-landing-page
--name "ProductName"
--tagline "Your compelling value proposition"
--features "Feature1,Feature2,Feature3"
python3 ~/.claude/skills/landing-page-vercel/scripts/scaffold.py
--out ./my-landing-page
--name "ProductName"
--tagline "Your compelling value proposition"
--features "Feature1,Feature2,Feature3"

Interactive mode

交互式模式

python3 ~/.claude/skills/landing-page-vercel/scripts/scaffold.py
--out ./my-landing-page
--interactive

---
python3 ~/.claude/skills/landing-page-vercel/scripts/scaffold.py
--out ./my-landing-page
--interactive

---

Generated Structure

生成的文件结构

my-landing-page/
├── index.html           # Main landing page
├── styles.css           # All styles (no framework)
├── script.js            # Form handling + interactions
├── data.json            # Content data (easy to edit)
├── vercel.json          # Vercel configuration
├── assets/
│   ├── favicon.ico
│   └── og-image.png     # Social sharing image
└── README.md            # Deployment instructions

my-landing-page/
├── index.html           # 主着陆页
├── styles.css           # 所有样式(无框架依赖)
├── script.js            # 表单处理与交互逻辑
├── data.json            # 内容数据(易于编辑)
├── vercel.json          # Vercel配置文件
├── assets/
│   ├── favicon.ico
│   └── og-image.png     # 社交分享图片
└── README.md            # 部署说明

Key Patterns

核心实现示例

Form Handling (JavaScript)

表单处理(JavaScript)

javascript
document.addEventListener('DOMContentLoaded', () => {
  const form = document.getElementById('signup-form');
  const button = form.querySelector('button[type="submit"]');
  const messageEl = document.getElementById('form-message');

  form.addEventListener('submit', async (e) => {
    e.preventDefault();

    const originalText = button.textContent;

    try {
      button.textContent = 'Submitting...';
      button.disabled = true;

      const response = await fetch(form.action, {
        method: 'POST',
        body: new FormData(form),
        headers: { 'Accept': 'application/json' }
      });

      if (response.ok) {
        // Hide form and show success message
        form.style.display = 'none';
        messageEl.textContent = 'Thanks! We will be in touch.';
        messageEl.classList.add('success');
      } else {
        throw new Error('Form submission failed');
      }
    } catch (error) {
      button.textContent = originalText;
      button.disabled = false;
      messageEl.textContent = 'Something went wrong. Please try again.';
      messageEl.classList.add('error');
    }
  });
});
javascript
document.addEventListener('DOMContentLoaded', () => {
  const form = document.getElementById('signup-form');
  const button = form.querySelector('button[type="submit"]');
  const messageEl = document.getElementById('form-message');

  form.addEventListener('submit', async (e) => {
    e.preventDefault();

    const originalText = button.textContent;

    try {
      button.textContent = 'Submitting...';
      button.disabled = true;

      const response = await fetch(form.action, {
        method: 'POST',
        body: new FormData(form),
        headers: { 'Accept': 'application/json' }
      });

      if (response.ok) {
        // 隐藏表单并显示成功消息
        form.style.display = 'none';
        messageEl.textContent = 'Thanks! We will be in touch.';
        messageEl.classList.add('success');
      } else {
        throw new Error('Form submission failed');
      }
    } catch (error) {
      button.textContent = originalText;
      button.disabled = false;
      messageEl.textContent = 'Something went wrong. Please try again.';
      messageEl.classList.add('error');
    }
  });
});

Data Structure (data.json)

数据结构(data.json)

json
{
  "name": "ProductName",
  "tagline": "Your compelling value proposition",
  "hero": {
    "headline": "Build something amazing",
    "subheadline": "The easiest way to create, launch, and grow your product.",
    "cta": "Join the Waitlist"
  },
  "features": [
    {
      "icon": "zap",
      "title": "Lightning Fast",
      "description": "Built for speed from the ground up."
    },
    {
      "icon": "shield",
      "title": "Secure by Default",
      "description": "Enterprise-grade security included."
    },
    {
      "icon": "sparkles",
      "title": "AI-Powered",
      "description": "Smart features that learn from you."
    }
  ],
  "faq": [
    {
      "question": "When will you launch?",
      "answer": "We're aiming for Q1 2026. Join the waitlist to be first to know."
    }
  ]
}

json
{
  "name": "ProductName",
  "tagline": "Your compelling value proposition",
  "hero": {
    "headline": "Build something amazing",
    "subheadline": "The easiest way to create, launch, and grow your product.",
    "cta": "Join the Waitlist"
  },
  "features": [
    {
      "icon": "zap",
      "title": "Lightning Fast",
      "description": "Built for speed from the ground up."
    },
    {
      "icon": "shield",
      "title": "Secure by Default",
      "description": "Enterprise-grade security included."
    },
    {
      "icon": "sparkles",
      "title": "AI-Powered",
      "description": "Smart features that learn from you."
    }
  ],
  "faq": [
    {
      "question": "When will you launch?",
      "answer": "We're aiming for Q1 2026. Join the waitlist to be first to know."
    }
  ]
}

Form Integration Guide

表单集成指南

Option 1: Formspree (Recommended)

选项1:Formspree(推荐)

  1. Go to formspree.io
  2. Create a free account
  3. Create a new form
  4. Copy your form ID
  5. Replace
    YOUR_FORM_ID
    in the HTML
  1. 访问 formspree.io
  2. 创建免费账户
  3. 创建新表单
  4. 复制你的表单ID
  5. 替换HTML中的
    YOUR_FORM_ID

Option 2: Custom Endpoint

选项2:自定义接口

javascript
// In script.js, update the form action
const API_URL = 'https://your-api.com/api/waitlist';

form.addEventListener('submit', async (e) => {
  e.preventDefault();
  const email = form.querySelector('input[name="email"]').value;

  const response = await fetch(API_URL, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email })
  });
  // Handle response...
});

javascript
// 在script.js中更新表单提交地址
const API_URL = 'https://your-api.com/api/waitlist';

form.addEventListener('submit', async (e) => {
  e.preventDefault();
  const email = form.querySelector('input[name="email"]').value;

  const response = await fetch(API_URL, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ email })
  });
  // 处理响应...
});

Analytics Setup

分析功能设置

Plausible (Privacy-friendly)

Plausible(隐私友好型)

html
<!-- Add to head section -->
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
html
<!-- 添加至head区域 -->
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>

Fathom

Fathom

html
<!-- Add to head section -->
<script src="https://cdn.usefathom.com/script.js" data-site="YOUR_SITE_ID" defer></script>

html
<!-- 添加至head区域 -->
<script src="https://cdn.usefathom.com/script.js" data-site="YOUR_SITE_ID" defer></script>

Deployment

部署方法

Vercel (One-click)

Vercel(一键部署)

bash
undefined
bash
undefined

Install Vercel CLI

安装Vercel CLI

npm i -g vercel
npm i -g vercel

Deploy

部署

cd my-landing-page vercel
cd my-landing-page vercel

Production deploy

生产环境部署

vercel --prod
undefined
vercel --prod
undefined

Vercel Configuration (vercel.json)

Vercel配置(vercel.json)

json
{
  "version": 2,
  "builds": [
    { "src": "*.html", "use": "@vercel/static" },
    { "src": "*.css", "use": "@vercel/static" },
    { "src": "*.js", "use": "@vercel/static" },
    { "src": "assets/**", "use": "@vercel/static" }
  ],
  "routes": [
    { "src": "/(.*)", "dest": "/index.html" }
  ],
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Content-Type-Options", "value": "nosniff" },
        { "key": "X-Frame-Options", "value": "DENY" },
        { "key": "X-XSS-Protection", "value": "1; mode=block" }
      ]
    }
  ]
}

json
{
  "version": 2,
  "builds": [
    { "src": "*.html", "use": "@vercel/static" },
    { "src": "*.css", "use": "@vercel/static" },
    { "src": "*.js", "use": "@vercel/static" },
    { "src": "assets/**", "use": "@vercel/static" }
  ],
  "routes": [
    { "src": "/(.*)", "dest": "/index.html" }
  ],
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "X-Content-Type-Options", "value": "nosniff" },
        { "key": "X-Frame-Options", "value": "DENY" },
        { "key": "X-XSS-Protection", "value": "1; mode=block" }
      ]
    }
  ]
}

CSS Variables

CSS变量

css
:root {
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-bg: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

css
:root {
  --color-primary: #3b82f6;
  --color-primary-dark: #2563eb;
  --color-bg: #0f172a;
  --color-bg-secondary: #1e293b;
  --color-text: #f8fafc;
  --color-text-muted: #94a3b8;
  --font-sans: system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
}

Accessibility Checklist

无障碍检查清单

  • Semantic HTML structure
  • Proper heading hierarchy (h1 → h2 → h3)
  • Alt text for images
  • Focus states for interactive elements
  • Color contrast ratio 4.5:1 minimum
  • Form labels and error messages
  • Skip link for keyboard navigation
  • Responsive text sizing (no fixed px for body text)

  • 语义化HTML结构
  • 正确的标题层级(h1 → h2 → h3)
  • 图片替代文本
  • 交互元素的焦点状态
  • 颜色对比度最低4.5:1
  • 表单标签与错误提示
  • 键盘导航跳转链接
  • 响应式文本尺寸(正文不使用固定px值)

Performance Checklist

性能检查清单

  • No external CSS frameworks
  • Minimal JavaScript
  • Optimized images (WebP with fallback)
  • System fonts (no web font loading)
  • Lazy loading for below-fold images
  • Preconnect for external resources

  • 无外部CSS框架依赖
  • 极简JavaScript代码
  • 优化后的图片(WebP格式带降级方案)
  • 使用系统字体(无Web字体加载)
  • 折叠区域图片懒加载
  • 外部资源预连接

References

参考文件

  • scripts/scaffold.py
    - Generation script
  • assets/templates/
    - HTML/CSS templates
  • scripts/scaffold.py
    - 生成脚本
  • assets/templates/
    - HTML/CSS模板