Fix about page voice, wire founding badge and dynamic counter
About: rewritten in memoir register — flowing connected sentences, no staccato, no resignation mention, no employer mention. Founding counter: polls /api/founding-count every 90s, updates DOM in place with flash animation on new claims. Webhook now increments the sold counter when a founding purchase completes. Badge: founding_badge.el component with guilloché SVG background, corner rosettes, member number, glow animation. Rendered on success page. Pricing: "at cost" removed, parent onboarding callout added.
This commit is contained in:
+16
-4
@@ -37,6 +37,7 @@ from viral import { viral }
|
||||
from footer import { footer }
|
||||
from styles import { page_open, page_close }
|
||||
from about import { about_page }
|
||||
from founding_badge import { founding_badge, founding_badge_css }
|
||||
from terms import { terms_page }
|
||||
from enterprise_terms import { enterprise_terms_page }
|
||||
|
||||
@@ -202,6 +203,14 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
// ── Stripe webhook ────────────────────────────────────────────────────────
|
||||
if str_eq(path, "/api/webhooks/stripe") {
|
||||
if str_contains(body, "checkout.session.completed") {
|
||||
// Increment founding counter when a founding purchase completes.
|
||||
if str_contains(body, "\"founding\"") {
|
||||
let current_sold: Int = get_sold()
|
||||
let new_sold: Int = current_sold + 1
|
||||
state_set("__founding_sold__", int_to_str(new_sold))
|
||||
println("[webhook] founding sold: " + int_to_str(new_sold))
|
||||
}
|
||||
// Forward to license API for key provisioning.
|
||||
let license_api: String = state_get("__license_api_url__")
|
||||
if !str_eq(license_api, "") {
|
||||
let resp: String = http_post(license_api + "/api/v1/webhooks/stripe", body)
|
||||
@@ -213,13 +222,16 @@ fn handle_request(method: String, path: String, body: String) -> String {
|
||||
|
||||
// ── Checkout success ──────────────────────────────────────────────────────
|
||||
if str_eq(path, "/marketplace/success") {
|
||||
return page_open() + "
|
||||
let badge_html: String = founding_badge(get_sold())
|
||||
let badge_css: String = founding_badge_css()
|
||||
return page_open() + badge_css + "
|
||||
<div style=\"min-height:80vh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:4rem 2rem\">
|
||||
<p class=\"label\" style=\"margin-bottom:1.5rem\">Purchase complete</p>
|
||||
<p class=\"label\" style=\"margin-bottom:1.5rem\">You're in.</p>
|
||||
<h1 class=\"display-lg\" style=\"margin-bottom:1.25rem\">Welcome to Neuron.</h1>
|
||||
<p style=\"font-family:var(--body);font-weight:300;font-size:1.1rem;color:var(--t2);max-width:28rem;line-height:1.7;margin-bottom:2.5rem\">
|
||||
Your license is being provisioned. Check your email in the next few minutes — your license key and download instructions will be waiting.
|
||||
<p style=\"font-family:var(--body);font-weight:300;font-size:1.1rem;color:var(--t2);max-width:28rem;line-height:1.7;margin-bottom:3rem\">
|
||||
Your license is being provisioned. Check your email — your license key and download instructions will be there in the next few minutes.
|
||||
</p>
|
||||
<div style=\"margin-bottom:3rem\">" + badge_html + "</div>
|
||||
<a href=\"/\" class=\"btn-primary\">Back to home →</a>
|
||||
</div>
|
||||
" + page_close()
|
||||
|
||||
Reference in New Issue
Block a user