Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix(web): link landing hero to GitHub (#809)

Gener8aa7e64d61d0
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index 8c4aa29f3..59f1f403a 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -13,6 +13,10 @@ import { GithubOutboundLink } from "@/components/github-outbound-link";
gsap.registerPlugin(ScrollTrigger, SplitText);
+type HeroSecondaryCta =
+ | { href: string; label: string; kind?: "link" }
+ | { kind: "github"; label: string };
+
export function HeroSection({
isLoggedIn,
kicker,
@@ -40,7 +44,7 @@ export function HeroSection({
showClipboard?: boolean;
showCommunityLinks?: boolean;
primaryCtaLabel?: string;
- secondaryCta?: { href: string; label: string } | null;
+ secondaryCta?: HeroSecondaryCta | null;
headlineClassName?: string;
headlineStyle?: CSSProperties;
typewriterClassName?: string;
@@ -55,6 +59,9 @@ export function HeroSection({
const sublineRef = useRef<HTMLParagraphElement>(null);
const ctaRef = useRef<HTMLDivElement>(null);
const [copied, setCopied] = useState(false);
+ const ctaSizingClassName = largeCtas
+ ? "px-3 py-3 text-[clamp(0.6875rem,3vw,1rem)] whitespace-nowrap sm:px-8"
+ : "px-6 py-2 text-sm";
useGSAP(
() => {
@@ -344,7 +351,7 @@ export function HeroSection({
<Link
href="/c/me"
onClick={() => trackLandingCtaClicked({ cta_name: "open_app" })}
- className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${largeCtas ? "px-8 py-3 text-base" : "px-6 py-2 text-sm"}`}
+ className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${ctaSizingClassName}`}
style={{
fontFamily: "var(--font-mono)",
color: "var(--landing-bg)",
@@ -363,7 +370,7 @@ export function HeroSection({
<a
href="/sign-in"
onClick={() => trackLandingCtaClicked({ cta_name: "get_started" })}
- className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${largeCtas ? "px-8 py-3 text-base" : "px-6 py-2 text-sm"}`}
+ className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${ctaSizingClassName}`}
style={{
fontFamily: "var(--font-mono)",
color: "var(--landing-bg)",
@@ -379,27 +386,49 @@ export function HeroSection({
{primaryCtaLabel ?? "GET STARTED"}
</a>
)}
- {secondaryCta !== null && <Link
- href={secondaryCta?.href ?? "/templates"}
- onClick={secondaryCta === undefined ? () => trackLandingCtaClicked({ cta_name: "templates" }) : undefined}
- className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${largeCtas ? "px-8 py-3 text-base" : "px-6 py-2 text-sm"}`}
- style={{
- fontFamily: "var(--font-mono)",
- color: "var(--landing-text)",
- border: "1px solid var(--landing-text)",
- letterSpacing: "0.12em",
- }}
- >
- {secondaryCta === undefined && (
- <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
- <rect x="3" y="3" width="7" height="7" />
- <rect x="14" y="3" width="7" height="7" />
- <rect x="3" y="14" width="7" height="7" />
- <rect x="14" y="14" width="7" height="7" />
- </svg>
- )}
- {secondaryCta?.label ?? "TEMPLATES"}
- </Link>}
+ {secondaryCta !== null && (
+ secondaryCta?.kind === "github" ? (
+ <GithubOutboundLink
+ surface="landing"
+ target="_blank"
+ rel="noopener noreferrer"
+ className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${ctaSizingClassName}`}
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text)",
+ border: "1px solid var(--landing-text)",
+ letterSpacing: "0.12em",
+ }}
+ >
+ <svg className="size-5 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
+ </svg>
+ {secondaryCta.label}
+ </GithubOutboundLink>
+ ) : (
+ <Link
+ href={secondaryCta?.href ?? "/templates"}
+ onClick={secondaryCta === undefined ? () => trackLandingCtaClicked({ cta_name: "templates" }) : undefined}
+ className={`inline-flex items-center gap-2 transition-all duration-200 hover:opacity-80 ${ctaSizingClassName}`}
+ style={{
+ fontFamily: "var(--font-mono)",
+ color: "var(--landing-text)",
+ border: "1px solid var(--landing-text)",
+ letterSpacing: "0.12em",
+ }}
+ >
+ {secondaryCta === undefined && (
+ <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
+ <rect x="3" y="3" width="7" height="7" />
+ <rect x="14" y="3" width="7" height="7" />
+ <rect x="3" y="14" width="7" height="7" />
+ <rect x="14" y="14" width="7" height="7" />
+ </svg>
+ )}
+ {secondaryCta?.label ?? "TEMPLATES"}
+ </Link>
+ )
+ )}
</div>
</div>{/* end hero-scalable */}
diff --git a/src/web/src/components/home/landing-content.test.ts b/src/web/src/components/home/landing-content.test.ts
index de1cd613d..98abb802d 100644
--- a/src/web/src/components/home/landing-content.test.ts
+++ b/src/web/src/components/home/landing-content.test.ts
@@ -31,7 +31,7 @@ describe("landing content contract", () => {
headlineTail: "with people you trust.",
loggedOutCta: "Get started",
loggedInCta: "Open Alook",
- secondaryCta: "See how it works",
+ secondaryCta: "View on GitHub",
})
})
@@ -57,6 +57,20 @@ describe("landing content contract", () => {
expect(LANDING_MACHINE_INTRO).not.toContain("always-on")
})
+ it("uses the tracked GitHub repository link for the hero secondary CTA", () => {
+ const root = webRoot()
+ const landingPageSource = readFileSync(path.join(root, "src/components/home/landing-page.tsx"), "utf8")
+ const heroSource = readFileSync(path.join(root, "src/components/home/hero-section.tsx"), "utf8")
+
+ expect(landingPageSource).toContain('secondaryCta={{ kind: "github", label: LANDING_HERO.secondaryCta }}')
+ expect(landingPageSource).not.toContain('secondaryCta={{ href: "#product"')
+ expect(heroSource).toMatch(
+ /<GithubOutboundLink[\s\S]*?surface="landing"[\s\S]*?target="_blank"[\s\S]*?rel="noopener noreferrer"[\s\S]*?<svg[^>]*aria-hidden="true"[\s\S]*?\{secondaryCta\.label\}[\s\S]*?<\/GithubOutboundLink>/,
+ )
+ expect(heroSource).toContain('"px-3 py-3 text-[clamp(0.6875rem,3vw,1rem)] whitespace-nowrap sm:px-8"')
+ expect(heroSource).toContain('<svg className="size-5 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">')
+ })
+
it("frames continuity as one agent remembering and acting across rooms", () => {
expect(LANDING_AGENT).toMatchObject({ name: "Alli", handle: "Alli#8145" })
expect(LANDING_CONTINUITY).toMatchObject({
diff --git a/src/web/src/components/home/landing-content.ts b/src/web/src/components/home/landing-content.ts
index fa96b26e1..49041232f 100644
--- a/src/web/src/components/home/landing-content.ts
+++ b/src/web/src/components/home/landing-content.ts
@@ -25,7 +25,7 @@ export const LANDING_HERO = {
"A handle, an inbox, memory that sticks — your agents become someone your friends can actually talk to.",
loggedOutCta: "Get started",
loggedInCta: "Open Alook",
- secondaryCta: "See how it works",
+ secondaryCta: "View on GitHub",
} as const
export const LANDING_TYPEWRITER_CASES = [
diff --git a/src/web/src/components/home/landing-page.tsx b/src/web/src/components/home/landing-page.tsx
index dd887cf47..1270dd450 100644
--- a/src/web/src/components/home/landing-page.tsx
+++ b/src/web/src/components/home/landing-page.tsx
@@ -302,7 +302,7 @@ export function LandingPage({ isLoggedIn }: { isLoggedIn: boolean }) {
showCommunityLinks={false}
showMobileDesktopHint={false}
primaryCtaLabel={(isLoggedIn ? LANDING_HERO.loggedInCta : LANDING_HERO.loggedOutCta).toUpperCase()}
- secondaryCta={{ href: "#product", label: LANDING_HERO.secondaryCta.toUpperCase() }}
+ secondaryCta={{ kind: "github", label: LANDING_HERO.secondaryCta }}
testId="landing-hero"
highlightPrimaryCta
backgroundDecoration={<HeroAvatarSwarm />}