Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(landingpage): update mobile adaption

Gusae2b3452b6d6
diff --git a/src/web/src/app/(auth)/sign-in/page.tsx b/src/web/src/app/(auth)/sign-in/page.tsx
index ed2f568b9..2da5905d3 100644
--- a/src/web/src/app/(auth)/sign-in/page.tsx
+++ b/src/web/src/app/(auth)/sign-in/page.tsx
@@ -24,14 +24,19 @@ import { TypewriterVisual, EMAILS_PLAYFUL } from "@/components/typewriter-visual
const isProd = process.env.NODE_ENV === "production"
-function OTPSignIn() {
+function SignInForm() {
const [email, setEmail] = useState("")
- const [code, setCode] = useState("")
- const [step, setStep] = useState<"email" | "code">("email")
const [error, setError] = useState("")
const [loading, setLoading] = useState(false)
+
+ // OTP-specific state
+ const [code, setCode] = useState("")
+ const [step, setStep] = useState<"email" | "code">("email")
const [retryAfter, setRetryAfter] = useState<number | null>(null)
+ // Password-specific state
+ const [password, setPassword] = useState("")
+
useEffect(() => {
if (retryAfter == null) return
const id = setTimeout(() => {
@@ -49,6 +54,7 @@ function OTPSignIn() {
},
}
+ // OTP handlers
async function handleSendCode(e: React.FormEvent) {
e.preventDefault()
if (retryAfter != null) return
@@ -97,6 +103,29 @@ function OTPSignIn() {
setLoading(false)
}
+ // Password handler
+ async function handlePasswordSubmit(e: React.FormEvent) {
+ e.preventDefault()
+ setError("")
+ setLoading(true)
+ const { error: signInErr } = await signIn.email(
+ { email, password },
+ { onError: () => {} },
+ )
+ if (signInErr) {
+ const { error: signUpErr } = await signUp.email(
+ { name: email.split("@")[0], email, password },
+ { onError: () => {} },
+ )
+ if (signUpErr) {
+ setError(signInErr.message ?? "Invalid email or password")
+ setLoading(false)
+ return
+ }
+ }
+ window.location.href = "/workspaces?auto"
+ }
+
const isCoolingDown = retryAfter != null
const sendLabel = loading
? "Sending..."
@@ -104,24 +133,97 @@ function OTPSignIn() {
? `Wait ${retryAfter}s`
: "Send Code"
+ const subtitle = isProd && step === "code"
+ ? "Enter the code we sent you"
+ : isProd
+ ? "Enter your email \u2014 we\u2019ll send you a verification code"
+ : undefined
+
return (
<FieldGroup>
+ {/* Header */}
<div className="flex flex-col items-center gap-2 text-center">
- <h1 className="text-2xl font-bold">Welcome back</h1>
- <p className="text-balance text-muted-foreground">
- {step === "email"
- ? "We\u2019ll send a verification code to your inbox"
- : "Enter the code we sent you"}
- </p>
+ <h1 className="text-2xl font-bold">Sign in</h1>
+ <p className="text-sm text-muted-foreground">or create an account to get started</p>
+ {subtitle && (
+ <p className="text-balance text-muted-foreground">{subtitle}</p>
+ )}
</div>
+
+ {/* Error */}
{isCoolingDown && (
<FieldError>
Too many requests. Try again in {retryAfter}s.
</FieldError>
)}
{error && !isCoolingDown && <FieldError>{error}</FieldError>}
- {step === "email" ? (
- <form onSubmit={handleSendCode}>
+
+ {/* Credential form */}
+ {isProd ? (
+ step === "email" ? (
+ <form onSubmit={handleSendCode}>
+ <FieldGroup>
+ <Field>
+ <FieldLabel htmlFor="email">Email</FieldLabel>
+ <Input
+ id="email"
+ type="email"
+ placeholder="[email protected]"
+ value={email}
+ onChange={(e) => setEmail(e.target.value)}
+ required
+ autoFocus
+ />
+ </Field>
+ <Field>
+ <Button
+ type="submit"
+ disabled={loading || isCoolingDown}
+ className="w-full"
+ >
+ {sendLabel}
+ </Button>
+ </Field>
+ </FieldGroup>
+ </form>
+ ) : (
+ <>
+ <p className="text-sm text-muted-foreground text-center">
+ We sent a code to <strong>{email}</strong>
+ </p>
+ <div className="flex justify-center">
+ <InputOTP
+ maxLength={6}
+ value={code}
+ onChange={handleVerifyCode}
+ disabled={loading}
+ autoFocus
+ >
+ <InputOTPGroup>
+ <InputOTPSlot index={0} />
+ <InputOTPSlot index={1} />
+ <InputOTPSlot index={2} />
+ <InputOTPSlot index={3} />
+ <InputOTPSlot index={4} />
+ <InputOTPSlot index={5} />
+ </InputOTPGroup>
+ </InputOTP>
+ </div>
+ <Button
+ variant="ghost"
+ className="w-full"
+ onClick={() => {
+ setStep("email")
+ setCode("")
+ setError("")
+ }}
+ >
+ Use a different email
+ </Button>
+ </>
+ )
+ ) : (
+ <form onSubmit={handlePasswordSubmit}>
<FieldGroup>
<Field>
<FieldLabel htmlFor="email">Email</FieldLabel>
@@ -132,56 +234,28 @@ function OTPSignIn() {
value={email}
onChange={(e) => setEmail(e.target.value)}
required
- autoFocus
/>
</Field>
<Field>
- <Button
- type="submit"
- disabled={loading || isCoolingDown}
- className="w-full"
- >
- {sendLabel}
+ <FieldLabel htmlFor="password">Password</FieldLabel>
+ <Input
+ id="password"
+ type="password"
+ value={password}
+ onChange={(e) => setPassword(e.target.value)}
+ required
+ />
+ </Field>
+ <Field>
+ <Button type="submit" disabled={loading} className="w-full">
+ {loading ? "Signing in..." : "Sign in"}
</Button>
</Field>
</FieldGroup>
</form>
- ) : (
- <>
- <p className="text-sm text-muted-foreground text-center">
- We sent a code to <strong>{email}</strong>
- </p>
- <div className="flex justify-center">
- <InputOTP
- maxLength={6}
- value={code}
- onChange={handleVerifyCode}
- disabled={loading}
- autoFocus
- >
- <InputOTPGroup>
- <InputOTPSlot index={0} />
- <InputOTPSlot index={1} />
- <InputOTPSlot index={2} />
- <InputOTPSlot index={3} />
- <InputOTPSlot index={4} />
- <InputOTPSlot index={5} />
- </InputOTPGroup>
- </InputOTP>
- </div>
- <Button
- variant="ghost"
- className="w-full"
- onClick={() => {
- setStep("email")
- setCode("")
- setError("")
- }}
- >
- Use a different email
- </Button>
- </>
)}
+
+ {/* Social login */}
<FieldSeparator className="*:data-[slot=field-separator-content]:bg-card">
Or continue with
</FieldSeparator>
@@ -211,101 +285,6 @@ function OTPSignIn() {
)
}
-function PasswordSignIn() {
- const [email, setEmail] = useState("")
- const [password, setPassword] = useState("")
- const [error, setError] = useState("")
- const [loading, setLoading] = useState(false)
-
- async function handleSubmit(e: React.FormEvent) {
- e.preventDefault()
- setError("")
- setLoading(true)
- const { error: signInErr } = await signIn.email(
- { email, password },
- { onError: () => {} },
- )
- if (signInErr) {
- // Sign-in failed — try auto sign-up
- const { error: signUpErr } = await signUp.email(
- { name: email.split("@")[0], email, password },
- { onError: () => {} },
- )
- if (signUpErr) {
- setError(signInErr.message ?? "Invalid email or password")
- setLoading(false)
- return
- }
- }
- window.location.href = "/workspaces?auto"
- }
-
- return (
- <form onSubmit={handleSubmit}>
- <FieldGroup>
- <div className="flex flex-col items-center gap-2 text-center">
- <h1 className="text-2xl font-bold">Welcome back</h1>
- <p className="text-balance text-muted-foreground">
- Sign in or create an account to get started
- </p>
- </div>
- {error && <FieldError>{error}</FieldError>}
- <Field>
- <FieldLabel htmlFor="email">Email</FieldLabel>
- <Input
- id="email"
- type="email"
- placeholder="[email protected]"
- value={email}
- onChange={(e) => setEmail(e.target.value)}
- required
- />
- </Field>
- <Field>
- <FieldLabel htmlFor="password">Password</FieldLabel>
- <Input
- id="password"
- type="password"
- value={password}
- onChange={(e) => setPassword(e.target.value)}
- required
- />
- </Field>
- <Field>
- <Button type="submit" disabled={loading} className="w-full">
- {loading ? "Signing in..." : "Sign in"}
- </Button>
- </Field>
- <FieldSeparator className="*:data-[slot=field-separator-content]:bg-card">
- Or continue with
- </FieldSeparator>
- <Field className="grid grid-cols-2 gap-4">
- <Button
- variant="outline"
- type="button"
- onClick={() =>
- signIn.social({ provider: "github", callbackURL: "/workspaces?auto" })
- }
- >
- <SiGithub className="size-4" />
- GitHub
- </Button>
- <Button
- variant="outline"
- type="button"
- onClick={() =>
- signIn.social({ provider: "google", callbackURL: "/workspaces?auto" })
- }
- >
- <SiGoogle className="size-4" />
- Google
- </Button>
- </Field>
- </FieldGroup>
- </form>
- )
-}
-
export default function SignInPage() {
return (
<div className="relative flex min-h-svh flex-col items-center justify-center p-6 md:p-10">
@@ -315,10 +294,10 @@ export default function SignInPage() {
<Card className="overflow-hidden p-0">
<CardContent className="grid p-0 md:grid-cols-2">
<div className="p-6 md:p-8 md:min-h-105 flex flex-col justify-center">
- {isProd ? <OTPSignIn /> : <PasswordSignIn />}
+ <SignInForm />
</div>
<div className="hidden bg-muted md:flex items-center justify-center overflow-visible min-h-80 pt-24">
- <TypewriterVisual className="scale-[0.55] shrink-0" emails={EMAILS_PLAYFUL} blobScale={2.5} blobBottom="30%" />
+ <TypewriterVisual className="scale-[0.65] shrink-0" emails={EMAILS_PLAYFUL} blobScale={2.5} blobBottom="30%" />
</div>
</CardContent>
</Card>
diff --git a/src/web/src/app/globals.css b/src/web/src/app/globals.css
index f1ecb1fa8..c431e9f9d 100644
--- a/src/web/src/app/globals.css
+++ b/src/web/src/app/globals.css
@@ -175,7 +175,7 @@
align-items: center;
justify-content: flex-end;
overflow: visible;
- zoom: 0.88; /* scale outside 3D context — keeps text crisp */
+ zoom: 0.78;
}
.typewriter-blob {
@@ -537,13 +537,40 @@
/* ── Responsive ── */
+@media (max-width: 1024px) {
+ .typewriter-visual {
+ zoom: 0.7;
+ }
+}
+
@media (max-width: 640px) {
+ .typewriter-visual {
+ zoom: 0.85;
+ }
.typewriter-scene {
- transform: scale(0.8) !important;
+ transform: scale(0.85) !important;
}
.tw-paper {
padding: 16px 18px 24px;
}
+ .tw-email-headers {
+ font-size: 12px !important;
+ }
+ .tw-email-body {
+ font-size: 13px !important;
+ }
+}
+
+@media (max-width: 480px) {
+ .typewriter-scene {
+ transform: scale(0.72) !important;
+ }
+}
+
+@media (max-width: 380px) {
+ .typewriter-scene {
+ transform: scale(0.62) !important;
+ }
}
/* ── Sonner toast: close button only on hover ── */
diff --git a/src/web/src/components/home/feature-showcase.tsx b/src/web/src/components/home/feature-showcase.tsx
index bf62a2a72..94a1d300c 100644
--- a/src/web/src/components/home/feature-showcase.tsx
+++ b/src/web/src/components/home/feature-showcase.tsx
@@ -167,11 +167,10 @@ function FeaturePanel({ feature, reversed }: { feature: Feature; reversed: boole
{feature.spec}
</div>
<p
- className="mt-4 max-w-md leading-relaxed"
+ className="mt-4 max-w-md leading-relaxed text-[0.8125rem] sm:text-[0.875rem]"
style={{
fontFamily: "var(--font-mono)",
color: "var(--landing-text-muted)",
- fontSize: "0.875rem",
}}
>
{feature.description}
@@ -277,13 +276,14 @@ function AnimatedArt({ lines }: { lines: string[] }) {
return (
<pre
ref={preRef}
- className="text-[13px]"
+ className="text-[10px] sm:text-[13px]"
style={{
fontFamily: "'Menlo', 'Consolas', 'DejaVu Sans Mono', monospace",
color: "var(--landing-phosphor)",
textShadow: "0 0 8px oklch(0.75 0.18 80 / 40%)",
opacity: 0.8,
lineHeight: 1.35,
+ overflowX: "hidden",
}}
>
{lines.join("\n")}
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index 5aebb5ecb..3ff166b01 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -25,10 +25,6 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
)
return;
- const sloganSplit = SplitText.create(headingRef.current, {
- type: "words, chars",
- });
-
const entranceTl = gsap.timeline({ delay: 0.3 });
entranceTl
@@ -38,16 +34,12 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
duration: 0.5,
ease: "power3.out",
})
- .from(
- sloganSplit.chars,
- { opacity: 0, duration: 0.04, stagger: 0.04, ease: "none" },
- 0.2
- )
- .from(sublineRef.current, { opacity: 0, duration: 0.03, ease: "none" }, "-=0.1")
+ .from(headingRef.current, { opacity: 0, duration: 0.4, ease: "power2.out" }, 0.2)
+ .from(sublineRef.current, { opacity: 0, duration: 0.3, ease: "power2.out" }, "-=0.1")
.from(
".hero-specs",
{ y: 15, opacity: 0, duration: 0.5, ease: "power2.out" },
- "+=3.5"
+ "-=0.1"
)
.from(
ctaRef.current,
@@ -55,43 +47,6 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
"-=0.2"
);
- // Scroll exit — snap transition (not continuous scrub)
- let heroVisible = true;
- ScrollTrigger.create({
- trigger: sectionRef.current,
- start: "top top",
- end: () => `+=${window.innerWidth < 640 ? 10 : 15}%`,
- pin: true,
- pinSpacing: true,
- snap: {
- snapTo: [0, 1],
- duration: { min: 0.15, max: 0.4 },
- delay: 0.05,
- ease: "power2.inOut",
- },
- onUpdate: (self) => {
- const shouldHide = self.progress > 0.5;
- if (shouldHide && heroVisible) {
- heroVisible = false;
- gsap.to(".hero-content", {
- y: -80,
- opacity: 0,
- duration: 0.4,
- ease: "power2.inOut",
- overwrite: true,
- });
- } else if (!shouldHide && !heroVisible) {
- heroVisible = true;
- gsap.to(".hero-content", {
- y: 0,
- opacity: 1,
- duration: 0.4,
- ease: "power2.inOut",
- overwrite: true,
- });
- }
- },
- });
},
{ scope: sectionRef }
);
@@ -112,22 +67,24 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
}}
/>
- <div className="hero-content relative z-10 mx-auto flex w-full max-w-4xl flex-col items-center px-6">
+ <div className="hero-content relative z-10 mx-auto flex w-full max-w-4xl flex-col items-center px-4 sm:px-6">
{/* Brand */}
- <div className="hero-brand mb-6 flex items-center gap-1.5">
- <Image src="/alook.svg" alt="Alook" width={28} height={28} />
- <span
- className="text-xl tracking-tight"
- style={{
- fontFamily: "var(--font-brand)",
- color: "var(--landing-text)",
- fontWeight: 700,
- }}
- >
- Alook
- </span>
+ <div className="hero-brand mb-6 flex flex-col sm:flex-row items-center gap-1.5">
+ <div className="flex items-center gap-1.5">
+ <Image src="/alook.svg" alt="Alook" width={28} height={28} />
+ <span
+ className="text-xl tracking-tight"
+ style={{
+ fontFamily: "var(--font-brand)",
+ color: "var(--landing-text)",
+ fontWeight: 700,
+ }}
+ >
+ Alook
+ </span>
+ </div>
<span
- className="ml-4 text-xs tracking-widest uppercase"
+ className="sm:ml-4 text-xs tracking-widest uppercase"
style={{
fontFamily: "var(--font-mono)",
color: "var(--landing-text-muted)",
@@ -138,16 +95,16 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
</div>
{/* Typewriter + Slogan wrapper */}
- <div className="relative w-full" style={{ height: 570 }}>
+ <div className="relative w-full h-[420px] sm:h-[500px] md:h-[570px]">
{/* Slogan — positioned at top of typewriter area */}
<div className="absolute top-0 left-0 right-0 z-10 flex flex-col items-center pt-2">
<h1
ref={headingRef}
- className="mb-1 text-center leading-[1.2]"
+ className="mb-1 text-center leading-[1.2] px-2"
style={{
fontFamily: "var(--font-crt)",
color: "var(--landing-text)",
- fontSize: "clamp(32px, 4vw, 44px)",
+ fontSize: "clamp(26px, 4vw, 44px)",
letterSpacing: "-0.01em",
}}
>
@@ -155,11 +112,11 @@ export function HeroSection({ isLoggedIn }: { isLoggedIn: boolean }) {
</h1>
<p
ref={sublineRef}
- className="text-center leading-relaxed whitespace-nowrap"
+ className="max-w-lg text-center leading-relaxed px-2"
style={{
fontFamily: "var(--font-crt)",
color: "var(--landing-text-muted)",
- fontSize: "clamp(16px, 2vw, 20px)",
+ fontSize: "clamp(14px, 2vw, 20px)",
}}
>
A digital colleague with its own email, calendar, and memory —