Skip to content

Commit 495441b

Browse files
Claudeclaude
authored andcommitted
feat: inline mailing list signup form in docs pages
Replace "Join the mailing list" links (which sent users back to the homepage) with an inline email signup form that posts directly to the same Google Apps Script endpoint used by gitmem.ai homepage. Added to: tiers, free-vs-pro, and configuration pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 45ef4de commit 495441b

File tree

5 files changed

+172
-3
lines changed

5 files changed

+172
-3
lines changed

apps/docs/app/global.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,87 @@
160160
border-color: hsla(358, 84%, 40%, 0.3);
161161
background: hsla(358, 84%, 15%, 0.15);
162162
}
163+
164+
/* Inline signup form */
165+
.signup-inline {
166+
margin: 1rem 0;
167+
}
168+
169+
.signup-inline .signup-row {
170+
display: flex;
171+
gap: 0.5rem;
172+
max-width: 28rem;
173+
}
174+
175+
.signup-inline input[type="email"] {
176+
flex: 1;
177+
padding: 0.5rem 0.75rem;
178+
border: 1px solid hsl(0, 0%, 80%);
179+
border-radius: 0.375rem;
180+
font-size: 0.875rem;
181+
background: transparent;
182+
color: inherit;
183+
outline: none;
184+
}
185+
186+
.signup-inline input[type="email"]:focus {
187+
border-color: hsl(358, 84%, 52%);
188+
box-shadow: 0 0 0 2px hsla(358, 84%, 52%, 0.15);
189+
}
190+
191+
.dark .signup-inline input[type="email"] {
192+
border-color: hsl(0, 0%, 30%);
193+
}
194+
195+
.dark .signup-inline input[type="email"]:focus {
196+
border-color: hsl(358, 84%, 55%);
197+
box-shadow: 0 0 0 2px hsla(358, 84%, 55%, 0.2);
198+
}
199+
200+
.signup-inline button {
201+
padding: 0.5rem 1rem;
202+
border: none;
203+
border-radius: 0.375rem;
204+
font-size: 0.875rem;
205+
font-weight: 600;
206+
cursor: pointer;
207+
white-space: nowrap;
208+
background: hsl(358, 84%, 42%);
209+
color: white;
210+
transition: background 0.15s;
211+
}
212+
213+
.signup-inline button:hover:not(:disabled) {
214+
background: hsl(358, 84%, 36%);
215+
}
216+
217+
.dark .signup-inline button {
218+
background: hsl(358, 84%, 52%);
219+
}
220+
221+
.dark .signup-inline button:hover:not(:disabled) {
222+
background: hsl(358, 84%, 58%);
223+
}
224+
225+
.signup-inline button:disabled {
226+
opacity: 0.7;
227+
cursor: default;
228+
}
229+
230+
.signup-inline button.success {
231+
background: hsl(145, 50%, 38%);
232+
}
233+
234+
.dark .signup-inline button.success {
235+
background: hsl(145, 50%, 45%);
236+
}
237+
238+
.signup-inline .signup-ok {
239+
margin-top: 0.5rem;
240+
font-size: 0.8rem;
241+
color: hsl(145, 50%, 38%);
242+
}
243+
244+
.dark .signup-inline .signup-ok {
245+
color: hsl(145, 50%, 55%);
246+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
"use client";
2+
3+
import { useState, type FormEvent } from "react";
4+
5+
const APPS_SCRIPT_URL =
6+
"https://script.google.com/macros/s/AKfycbw17ppbh2l-VjrIyFjAmI7aqFjJZSuB-ycN8iAOzyM8q1Eh07X9leKhvSsxbzfR7IY/exec";
7+
8+
export function SignupForm({ label = "Get Updates" }: { label?: string }) {
9+
const [email, setEmail] = useState("");
10+
const [status, setStatus] = useState<"idle" | "submitting" | "success">(
11+
"idle"
12+
);
13+
14+
const handleSubmit = (e: FormEvent) => {
15+
e.preventDefault();
16+
if (!email) return;
17+
18+
setStatus("submitting");
19+
20+
const iframe = document.createElement("iframe");
21+
iframe.name = "gitmem-signup-frame";
22+
iframe.style.display = "none";
23+
document.body.appendChild(iframe);
24+
25+
const form = document.createElement("form");
26+
form.method = "POST";
27+
form.action = APPS_SCRIPT_URL;
28+
form.target = "gitmem-signup-frame";
29+
30+
const input = document.createElement("input");
31+
input.type = "hidden";
32+
input.name = "email";
33+
input.value = email;
34+
form.appendChild(input);
35+
36+
document.body.appendChild(form);
37+
form.submit();
38+
39+
setTimeout(() => {
40+
form.remove();
41+
iframe.remove();
42+
setStatus("success");
43+
setEmail("");
44+
}, 1500);
45+
};
46+
47+
return (
48+
<form onSubmit={handleSubmit} className="signup-inline">
49+
<div className="signup-row">
50+
<input
51+
type="email"
52+
value={email}
53+
onChange={(e) => setEmail(e.target.value)}
54+
placeholder="you@example.com"
55+
disabled={status !== "idle"}
56+
required
57+
/>
58+
<button
59+
type="submit"
60+
disabled={status !== "idle"}
61+
className={status === "success" ? "success" : ""}
62+
>
63+
{status === "idle" && label}
64+
{status === "submitting" && "Joining..."}
65+
{status === "success" && "\u2713 Subscribed"}
66+
</button>
67+
</div>
68+
{status === "success" && (
69+
<p className="signup-ok">You're in. Updates only when they matter.</p>
70+
)}
71+
</form>
72+
);
73+
}

apps/docs/content/docs/concepts/tiers.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Tiers
33
description: GitMem's tier system and how it affects available features.
44
---
55

6+
import { SignupForm } from '@/components/signup-form'
7+
68
# Tiers
79

810
GitMem has three tiers that control which tools and storage backends are available.
@@ -24,7 +26,9 @@ Set via: `GITMEM_TIER=free` (default)
2426
- **Tools:** 29 tools (adds batch, transcripts, cache management)
2527
- **Best for:** Teams, multi-machine workflows, production use
2628

27-
Pro is currently in development. [Join the mailing list](https://gitmem.ai) to get notified when it launches.
29+
Pro is currently in development. Join the mailing list to get notified when it launches:
30+
31+
<SignupForm label="Notify Me" />
2832

2933
## Additional Tools (Pro)
3034

apps/docs/content/docs/getting-started/configuration.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Configuration
33
description: Configure GitMem with environment variables and config files.
44
---
55

6+
import { SignupForm } from '@/components/signup-form'
7+
68
# Configuration
79

810
GitMem works out of the box with zero configuration on the free tier. For Pro tier features (Supabase storage, semantic search), you'll need environment variables.
@@ -34,7 +36,9 @@ Add `.gitmem/` to your `.gitignore` — session data is machine-specific.
3436

3537
### Pro Tier (Coming Soon)
3638

37-
Pro will add Supabase PostgreSQL with pgvector for semantic search, cross-machine sync, and shared team memory. [Join the mailing list](https://gitmem.ai) to get notified.
39+
Pro will add Supabase PostgreSQL with pgvector for semantic search, cross-machine sync, and shared team memory. Sign up to get notified:
40+
41+
<SignupForm label="Notify Me" />
3842

3943
## Project Namespaces
4044

apps/docs/content/docs/getting-started/free-vs-pro.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ title: Free vs Pro
33
description: What you get today with the free tier and what's coming with Pro.
44
---
55

6+
import { SignupForm } from '@/components/signup-form'
7+
68
# Free vs Pro
79

810
GitMem ships with a fully functional free tier — everything you need to give your AI agents institutional memory. Pro will add cloud storage and team features.
@@ -43,4 +45,6 @@ Pro adds cloud-powered features for teams and power users:
4345
- You need session transcript storage
4446
- You're running multi-agent workflows across environments
4547

46-
[Join the mailing list](https://gitmem.ai) to get notified when Pro launches.
48+
Join the mailing list to get notified when Pro launches:
49+
50+
<SignupForm label="Notify Me" />

0 commit comments

Comments
 (0)