landing: gated whitepaper, bigger logo, taller demo, footer socials#56
Merged
Conversation
…drop status Frontend (public/index.html) - Hero: drop the "ZeroAuth · Live in production" eyebrow; the serif headline leads directly now. - Brand mark: 32 → 44 px in header + footer (34 px on the smallest mobile breakpoint). - Live demo iframe height bumped from clamp(440, 64vh, 680) to clamp(600, 82vh, 880) so more of the simulation is visible without scrolling. - Remove the "Running locally · No real biometric collected" caption under the iframe. - Replace the direct whitepaper download buttons with an email-gate form: input + "Send PDF" → posts to /api/leads/whitepaper. - Drop the "All systems operational" link in the footer-bottom. - Add LinkedIn / GitHub / X social icon row in the footer-bottom, pointing at linkedin.com/company/zeroauth-dev, github.com/zeroauth-dev, and x.com/zeroauth-dev respectively. Backend - src/services/email.ts: extend SendMailInput with an optional `attachments` array (filename + path|content + contentType). Pass through to nodemailer's mail options. - src/services/email-templates.ts: add whitepaperEmail() returning the subject + html + text body for the gated-download mailer. - src/routes/leads.ts: after persisting the lead, resolve the PDF on disk across dev (website/static or docs) and prod (website/build) and fire-and-forget sendMail with the attachment. Response now reads "Whitepaper sent. Check your inbox in a minute." The downloadUrl is still returned for accessibility / fallback. - tests/leads.test.ts: assert the inbox-message wording and the new filename (ZeroAuth_Whitepaper.pdf). Trade-offs - The email is best-effort; if SMTP is unconfigured (dev) the call is a no-op but the request still 201s — the response is reflective of intent, not delivery guarantee. Tracking ACK comes later via a delivery webhook when one is wired.
There was a problem hiding this comment.
Pull request overview
This PR updates the landing page to gate whitepaper access behind an email form and adds backend email delivery for the whitepaper PDF.
Changes:
- Reworked landing page hero/demo/footer and replaced whitepaper download buttons with an email-gated form.
- Extended transactional email support to allow attachments and added a whitepaper email template.
- Updated the whitepaper lead route and tests for the new filename/message.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
public/index.html |
Adds the gated whitepaper form, footer socials, logo/demo layout updates, and client-side submission flow. |
src/routes/leads.ts |
Resolves the whitepaper PDF path and queues an email with the PDF attachment after lead submission. |
src/services/email.ts |
Adds attachment support to the shared sendMail interface. |
src/services/email-templates.ts |
Adds the whitepaper delivery email template. |
tests/leads.test.ts |
Updates whitepaper route expectations for the new response copy and filename. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+121
to
+133
| void sendMail({ | ||
| to: trimmedEmail, | ||
| subject, | ||
| html, | ||
| text, | ||
| attachments: [ | ||
| { | ||
| filename: 'ZeroAuth_Whitepaper.pdf', | ||
| path: pdfPath, | ||
| contentType: 'application/pdf', | ||
| }, | ||
| ], | ||
| }).then((result) => { |
Comment on lines
+1589
to
+1590
| form.classList.add('hidden'); | ||
| document.getElementById('wpSuccess').classList.remove('hidden'); |
| <path d="M12 .5C5.65.5.5 5.65.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.55v-2.13c-3.2.7-3.87-1.37-3.87-1.37-.52-1.33-1.28-1.68-1.28-1.68-1.05-.71.08-.7.08-.7 1.16.08 1.77 1.19 1.77 1.19 1.03 1.76 2.7 1.25 3.36.96.1-.75.4-1.25.73-1.54-2.55-.29-5.24-1.28-5.24-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.47.11-3.06 0 0 .97-.31 3.18 1.18a11.04 11.04 0 0 1 5.79 0c2.21-1.49 3.18-1.18 3.18-1.18.63 1.59.23 2.77.11 3.06.74.81 1.18 1.84 1.18 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.06.78 2.13v3.16c0 .31.21.67.8.55 4.56-1.52 7.85-5.83 7.85-10.91C23.5 5.65 18.35.5 12 .5z"/> | ||
| </svg> | ||
| </a> | ||
| <a href="https://x.com/zeroauth-dev" target="_blank" rel="noopener" aria-label="ZeroAuth on X"> |
Comment on lines
+44
to
+54
| export interface SendMailAttachment { | ||
| /** File name as the recipient will see it. */ | ||
| filename: string; | ||
| /** Absolute path on disk, OR provide `content` instead. */ | ||
| path?: string; | ||
| /** Raw bytes / string if path is unavailable. */ | ||
| content?: Buffer | string; | ||
| /** MIME type. Inferred when possible; pass explicitly for non-obvious files. */ | ||
| contentType?: string; | ||
| } | ||
|
|
| subject: input.subject, | ||
| text: input.text, | ||
| html: input.html, | ||
| attachments: input.attachments, |
| * is attached so the recipient never has to come back to a download page; | ||
| * the email itself is the delivery channel. | ||
| */ | ||
| export function whitepaperEmail(): { subject: string; html: string; text: string } { |
| filename: 'Pramaan_Whitepaper.pdf', | ||
| filename: 'ZeroAuth_Whitepaper.pdf', | ||
| }); | ||
| expect(res.body.message).toMatch(/inbox/i); |
| } | ||
| }); | ||
| } else { | ||
| logger.warn('Whitepaper PDF not found on disk — email will not include attachment'); |
Comment on lines
+160
to
+162
| <p style="font-size:15px;"> | ||
| If you have questions after reading, reply to this email or open an issue | ||
| at <a href="https://github.com/zeroauth-dev/ZeroAuth/issues" style="color:#0a0a0a;text-decoration:underline;">github.com/zeroauth-dev/ZeroAuth/issues</a>. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Seven changes you asked for, plus a small backend pipeline behind #5.
Frontend (`public/index.html`)
Backend
Test plan
🤖 Generated with Claude Code