-
Notifications
You must be signed in to change notification settings - Fork 0
feat(web): marketing page v2 — terminal hero + narrative scroll + analytics #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
2e45d89
feat(web): rewrite header with real helpbase nav
Codehagen 12bd686
chore(web): install @magicui/terminal + 8 Tailark Pro blocks
Codehagen cba97a8
feat(web): marketing page v2 — hero terminal + narrative scroll + pri…
Codehagen 115d18b
chore(deps): lock hugeicons + radix-tooltip installed for tailark blocks
Codehagen c0fb493
test(web): coverage for the three critical new surfaces
Codehagen 22906e0
fix(sec): prefer cf-connecting-ip + scope cloudinary image allowlist
Codehagen 23ba5e8
docs(changelog): unreleased — marketing page v2 + analytics + securit…
Codehagen 91bc639
test(web): tighten non-null assertions on mock.calls access
Codehagen b0916cf
fix(ci): exclude marketing-only files from scaffold/registry sync
Codehagen c9bf189
fix(sec): drop marketing_events anon insert policy — edge fn owns writes
Codehagen c028983
feat(web): CodeRabbit fixes + hero copy + lazy-load + Pro price
Codehagen e35bf7c
feat(web): show llms.txt content instead of money illustration
Codehagen 051aa08
chore: strip session-narrative comments from source
Codehagen e99cb3d
style(design): marketing page polish pass — typography, targets, anal…
Codehagen 84eed16
copy(marketing): strip jargon — YC-style plain English across the page
Codehagen 38f5e7d
copy(hero): agent-first positioning + ownership wedge
Codehagen 6ccd72a
copy(hero): data-first H1 — flip Mintlify's Series B stat into our hook
Codehagen 0bd865e
style(design): DR-W-001/002 — align comparator to 5xl, restore mobile…
Codehagen 8dc53be
style(design): DR-W-003 — normalize FAQs mobile padding to px-6
Codehagen 2ec783a
style(design): DR-W-004 — drop xl:px-0 on how-it-works
Codehagen 711099c
style(design): DR-W-005 — pricing sub-paragraph max-w-xl \u2192 max-w…
Codehagen e1fdee9
style(design): remove floating hero decoration rails
Codehagen 55bfb69
style(design): swap three weak-fit illustrations with Tailark Pro picks
Codehagen 19e6146
style(design): swap 4 more illustrations with Tailark Pro picks (roun…
Codehagen e04c99c
style(design): custom MDX + Preview illustrations (LlmsTxtPreview pat…
Codehagen d170132
style(design): DR3-001 \u2014 shorten comparator feature names
Codehagen c6d30a8
style(design): DR3-002 \u2014 custom InstallCommandPreview replaces P…
Codehagen 5968da1
style(design): DR3-003 \u2014 retheme FlowIllustration output from in…
Codehagen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,42 @@ | ||
| import HeroSection from "@/components/hero-section" | ||
| import dynamic from "next/dynamic" | ||
|
|
||
| import { Header } from "@/components/header" | ||
| import { Hero } from "@/components/marketing/hero" | ||
| import Comparator from "@/components/comparator-7" | ||
| import FooterSection from "@/components/footer" | ||
|
|
||
| // Below-fold sections load via next/dynamic so their JS code-splits out | ||
| // of the first-paint bundle. SSR stays on — the HTML ships pre-rendered; | ||
| // only client hydration defers. | ||
| const HowItWorks = dynamic(() => import("@/components/how-it-works-3")) | ||
| const FeaturesOwnIt = dynamic(() => import("@/components/features-1")) | ||
| const AiNativeBento = dynamic(() => import("@/components/bento-2")) | ||
| const DemoCrossLink = dynamic(() => | ||
| import("@/components/marketing/demo-cross-link").then((m) => ({ | ||
| default: m.DemoCrossLink, | ||
| })), | ||
| ) | ||
| const Pricing = dynamic(() => import("@/components/pricing")) | ||
| const FAQs = dynamic(() => import("@/components/faqs-3")) | ||
|
|
||
| export default function LandingPage() { | ||
| return <HeroSection /> | ||
| return ( | ||
| <> | ||
| <Header /> | ||
| <main | ||
| id="main" | ||
| role="main" | ||
| className="bg-background overflow-hidden"> | ||
| <Hero /> | ||
| <Comparator /> | ||
| <HowItWorks /> | ||
| <FeaturesOwnIt /> | ||
| <AiNativeBento /> | ||
| <DemoCrossLink /> | ||
| <Pricing /> | ||
| <FAQs /> | ||
| </main> | ||
| <FooterSection /> | ||
| </> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| import { AgentTasksIllustration } from "@/components/illustrations/agent-tasks" | ||
| import { ModelsIllustration } from "@/components/illustrations/models" | ||
| import { Card } from '@/components/ui/card' | ||
| import { UptimeIllustration } from "@/components/illustrations/uptime" | ||
| import { DocumentAnalysisIllustration } from "@/components/illustrations/document-analysis" | ||
|
|
||
| export default function AiNativeBento() { | ||
| return ( | ||
| <section | ||
| aria-labelledby="ai-native-heading" | ||
| className="@container bg-background py-24"> | ||
| <div className="mx-auto w-full max-w-5xl px-6"> | ||
| <div className="mb-12 text-center"> | ||
| <h2 | ||
| id="ai-native-heading" | ||
| className="text-foreground text-3xl font-semibold md:text-4xl"> | ||
| Claude and Cursor can read your docs. Day one. | ||
| </h2> | ||
| <p className="text-muted-foreground mx-auto mt-4 max-w-2xl text-balance text-lg"> | ||
| Every helpbase site includes an MCP server and an llms.txt. Claude, Cursor, and ChatGPT can answer from your real docs the moment you deploy. You don't pay us for this later. | ||
| </p> | ||
| </div> | ||
| <div className="not-dark:*:bg-card/50 @xl:grid-cols-2 @3xl:grid-cols-6 grid gap-3"> | ||
| <Card className="@3xl:col-span-2 grid grid-rows-[1fr_auto] gap-y-12 overflow-hidden rounded-2xl p-8"> | ||
| <div className="relative -m-8 flex items-center justify-center p-8"> | ||
| <Stripes /> | ||
| <ModelsIllustration /> | ||
| </div> | ||
| <div> | ||
| <h3 className="text-foreground text-lg font-semibold">MCP server, built in</h3> | ||
| <p className="text-muted-foreground mt-3"> | ||
| Every helpbase site runs a Model Context Protocol endpoint. Point Claude Code or Cursor at the URL and they answer from your real docs instead of guessing. | ||
| </p> | ||
| </div> | ||
| </Card> | ||
| <Card className="@3xl:col-span-2 grid grid-rows-[1fr_auto] gap-y-12 overflow-hidden rounded-2xl p-8"> | ||
| <div className="relative -m-8 flex items-center justify-center p-8"> | ||
| <Stripes /> | ||
| <LlmsTxtPreview /> | ||
| </div> | ||
| <div> | ||
| <h3 className="text-foreground text-lg font-semibold">llms.txt, always fresh</h3> | ||
| <p className="text-muted-foreground mt-3"> | ||
| A fresh /llms.txt on every build. It's the manifest AI agents already look for. You don't have to remember to write it. | ||
| </p> | ||
| </div> | ||
| </Card> | ||
| <Card className="@xl:col-span-2 grid grid-rows-[1fr_auto] gap-y-12 overflow-hidden rounded-2xl p-8"> | ||
| <div className="relative -m-8 flex items-center justify-center p-8"> | ||
| <Stripes /> | ||
| <AgentTasksIllustration /> | ||
| </div> | ||
| <div> | ||
| <h3 className="text-foreground text-lg font-semibold">Structured agent output</h3> | ||
| <p className="text-muted-foreground mt-3"> | ||
| The MCP server exposes your content as typed tool calls: list articles, read a specific slug, search. No scraping, no guesswork. | ||
| </p> | ||
| </div> | ||
| </Card> | ||
| <Card className="@xl:col-span-2 @3xl:col-span-3 grid grid-rows-[1fr_auto] gap-8 rounded-2xl p-8"> | ||
| <div className="-m-8 flex items-center justify-center p-8"> | ||
| <DocumentAnalysisIllustration /> | ||
| </div> | ||
| <div> | ||
| <h3 className="text-foreground text-lg font-semibold">Docs that stay in sync with code</h3> | ||
| <p className="text-muted-foreground mt-3"> | ||
| helpbase sync reads your source and proposes MDX edits based on the actual functions and types. You review, you merge. AI assists, it does not author. | ||
| </p> | ||
| </div> | ||
| </Card> | ||
| <Card className="@xl:col-span-2 @3xl:col-span-3 grid grid-rows-[1fr_auto] gap-8 rounded-2xl p-8"> | ||
| <div className="-m-8 flex items-center justify-center p-8"> | ||
| <UptimeIllustration /> | ||
| </div> | ||
| <div> | ||
| <h3 className="text-foreground text-lg font-semibold">Hosted tier, if you want it</h3> | ||
| <p className="text-muted-foreground mt-3"> | ||
| helpbase deploy pushes the same app to {'{'}slug{'}'}.helpbase.dev. No servers to manage. Hosted MCP at scale, custom domain, team roles, analytics when you upgrade. | ||
| </p> | ||
| </div> | ||
| </Card> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ) | ||
| } | ||
|
|
||
| const Stripes = () => ( | ||
| <div | ||
| aria-hidden | ||
| className="opacity-3 absolute -inset-x-6 inset-y-0 bg-[repeating-linear-gradient(-45deg,var(--color-foreground),var(--color-foreground)_1px,transparent_1px,transparent_6px)] [mask-image:radial-gradient(ellipse_50%_50%_at_50%_50%,#000_70%,transparent_100%)]" | ||
| /> | ||
| ) | ||
|
|
||
| const LlmsTxtPreview = () => ( | ||
| <div className="ring-border bg-card relative z-10 w-full max-w-sm rounded-xl border border-transparent p-4 font-mono text-xs ring-1"> | ||
| <div className="text-muted-foreground mb-2 text-[0.65rem] uppercase tracking-wider">llms.txt</div> | ||
| <div className="space-y-1"> | ||
| <div className="text-foreground"># Your Product docs</div> | ||
| <div className="text-muted-foreground">Docs: https://docs.yourco.com</div> | ||
| <div className="text-muted-foreground">MCP: https://docs.yourco.com/api/mcp</div> | ||
| <div className="text-foreground mt-2">## Articles</div> | ||
| <div className="text-muted-foreground">- getting-started</div> | ||
| <div className="text-muted-foreground">- authentication</div> | ||
| <div className="text-muted-foreground">- webhooks</div> | ||
| <div className="text-muted-foreground">- rate-limits</div> | ||
| </div> | ||
| </div> | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| 'use client' | ||
|
|
||
| import { cn } from '@workspace/ui/lib/utils' | ||
| import { toJsxRuntime } from 'hast-util-to-jsx-runtime' | ||
| import { JSX, useLayoutEffect, useState } from 'react' | ||
| import { Fragment, jsx, jsxs } from 'react/jsx-runtime' | ||
| import type { BundledLanguage } from 'shiki/bundle/web' | ||
|
|
||
| const highlightCache = new Map() | ||
|
|
||
| let shikiPromise: Promise<typeof import('shiki/bundle/web')> | null = null | ||
|
|
||
| function getShiki() { | ||
| if (!shikiPromise) { | ||
| shikiPromise = import('shiki/bundle/web') | ||
| } | ||
| return shikiPromise | ||
| } | ||
|
|
||
| export async function highlight(code: string, lang: BundledLanguage) { | ||
| const cacheKey = `${lang}:${code.length}:${code.slice(0, 50)}:${code.slice(-50)}` | ||
|
|
||
| const cached = highlightCache.get(cacheKey) | ||
| if (cached) return cached | ||
|
|
||
| const { codeToHast } = await getShiki() | ||
|
|
||
| const hast = await codeToHast(code, { | ||
| lang, | ||
| themes: { | ||
| light: 'github-light', | ||
| dark: 'vesper', | ||
| }, | ||
| }) | ||
|
|
||
| const result = toJsxRuntime(hast, { | ||
| Fragment, | ||
| jsx, | ||
| jsxs, | ||
| }) as JSX.Element | ||
|
|
||
| if (highlightCache.size > 100) { | ||
| const firstKey = highlightCache.keys().next().value | ||
| if (firstKey) highlightCache.delete(firstKey) | ||
| } | ||
| highlightCache.set(cacheKey, result) | ||
|
|
||
| return result | ||
| } | ||
|
|
||
| type Props = { | ||
| code: string | null | ||
| lang: BundledLanguage | ||
| initial?: JSX.Element | ||
| preHighlighted?: JSX.Element | null | ||
| maxHeight?: number | ||
| className?: string | ||
| theme?: string | ||
| lineNumbers?: boolean // ← added | ||
| } | ||
|
|
||
| export default function CodeBlock({ code, lang, initial, maxHeight=940, preHighlighted, theme, className }: Props) { | ||
| const [content, setContent] = useState(preHighlighted || initial || null) | ||
|
|
||
| useLayoutEffect(() => { | ||
| if (preHighlighted) { | ||
| return | ||
| } | ||
|
|
||
| let isMounted = true | ||
|
|
||
| if (code) { | ||
| highlight(code, lang).then((result) => { | ||
| if (isMounted) setContent(result) | ||
| }) | ||
| } | ||
|
|
||
| return () => { | ||
| isMounted = false | ||
| } | ||
| }, [code, lang, theme, preHighlighted]) | ||
|
|
||
| return content ? ( | ||
| <div | ||
| className={cn('[&_pre]:no-scrollbar max-h-(--pre-max-height) [&_code]:text-[13px]/2 [&_code]:font-mono [&_pre]:border-l [&_pre]:p-2 [&_pre]:leading-snug', className)} | ||
| style={{ '--pre-max-height': `${maxHeight}px` } as React.CSSProperties}> | ||
| {content} | ||
| </div> | ||
| ) : ( | ||
| <pre className="rounded-lg p-4 text-xs">Loading...</pre> | ||
| ) | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a collision-free cache key for highlighted code.
The current key only fingerprints the length plus first/last 50 chars. Two different snippets with the same prefix/suffix/length will return the first snippet’s cached JSX, rendering incorrect code. Also, the cache can grow to 101 entries because eviction happens only when
size > 100.🐛 Proposed fix
export async function highlight(code: string, lang: BundledLanguage) { - const cacheKey = `${lang}:${code.length}:${code.slice(0, 50)}:${code.slice(-50)}` + const cacheKey = `${lang}:${code}` const cached = highlightCache.get(cacheKey) if (cached) return cached @@ - if (highlightCache.size > 100) { + if (highlightCache.size >= 100) { const firstKey = highlightCache.keys().next().value if (firstKey) highlightCache.delete(firstKey) }🤖 Prompt for AI Agents