diff --git a/src/account.el b/src/account.el index e1268d1..dc1592f 100644 --- a/src/account.el +++ b/src/account.el @@ -800,11 +800,17 @@ fn account_download_card() -> String { el_div( "class=\"card-dark\" style=\"border-top:3px solid var(--navy)\"", el_p("class=\"card-label\"", "Download") + - el_p("class=\"download-status\" style=\"color:var(--navy)\"", "Shipping within 30 days") + - el_p("class=\"download-title\"", "Neuron for Mac & Windows") + - el_p("class=\"download-body\"", "macOS and Windows simultaneously. You'll receive a download link and license key by email the moment it ships. Nothing to do right now.") + - el_button("type=\"button\" class=\"download-btn-disabled\" disabled aria-disabled=\"true\"", - account_signin_svg_download() + " Download arriving soon" + el_p("class=\"download-status\" style=\"color:var(--navy)\"", "Available now — macOS") + + el_p("class=\"download-title\"", "Neuron for Mac") + + el_p("class=\"download-body\"", "The macOS build (Apple Silicon) is ready to download now. Windows and Linux are coming soon. Your license key is in your launch email.") + + el_div( + "style=\"display:flex;gap:.75rem;flex-wrap:wrap;align-items:center\"", + el_a( + "https://downloads.neurontechnologies.ai/installers/Neuron-1.1.0-macos-arm64.dmg", + "class=\"btn-primary\" download", + account_signin_svg_download() + " Download for macOS" + ) + + el_a("/downloads", "class=\"btn-ghost\"", "All platforms →") ) ) } diff --git a/src/downloads.el b/src/downloads.el new file mode 100644 index 0000000..c36a337 --- /dev/null +++ b/src/downloads.el @@ -0,0 +1,148 @@ +// components/downloads.el - Public downloads page. +// +// Landing-styled inner page (page_open_seo + nav + content + footer + +// page_close, assembled by main.el). Client-side OS detection via +// navigator.platform highlights the visitor's platform and updates the +// detected-OS banner. macOS is the shipping build; Windows and Linux are +// linked but clearly marked "coming soon" per the current product state +// (Windows chat not yet enabled, Linux soul backend not yet complete). + +from nav import { nav } +from footer import { footer } + +extern fn el_section(attrs: String, children: String) -> String +extern fn el_div(attrs: String, children: String) -> String +extern fn el_span(attrs: String, children: String) -> String +extern fn el_h1(attrs: String, text: String) -> String +extern fn el_p(attrs: String, children: String) -> String +extern fn el_a(href: String, attrs: String, children: String) -> String + +// Scoped presentation. Uses the landing stylesheet's CSS variables +// (--navy, --head, --body, --t2, --t3) so it inherits the site palette. +// No # colors or quoted font names inline — routed through vars to stay +// clear of the elc CSS tokenizer edge cases. +fn dl_style() -> String { + "" +} + +fn dl_header() -> String { + el_p("class=\"label reveal\"", "Download") + + el_h1("class=\"display-lg reveal\" style=\"margin-top:.75rem\"", "Get Neuron.") + + el_div("class=\"navy-line-left reveal\" style=\"width:4rem;margin:1.5rem 0 2rem\"", "") + + el_p( + "class=\"dl-sub reveal\" style=\"max-width:34rem;font-size:1rem\"", + "Your AI that remembers you, running on your own machine. macOS is available to download today. Windows and Linux are on the way." + ) + + el_p("id=\"os-detected\" class=\"dl-detected reveal\"", "Detecting your platform…") +} + +fn dl_mac_card() -> String { + el_div( + "id=\"card-mac\" class=\"card-dark dl-card dl-featured reveal\"", + el_span("class=\"dl-badge dl-badge-ready\"", "Available now") + + el_p("class=\"dl-title\"", "Neuron for macOS") + + el_p("class=\"dl-sub\"", "Apple Silicon (M1–M4). macOS 13 Ventura or later.") + + el_div( + "class=\"dl-btnrow\"", + el_a( + "https://downloads.neurontechnologies.ai/installers/Neuron-1.1.0-macos-arm64.dmg", + "class=\"btn-primary\" download", + "Download for macOS →" + ) + ) + + el_p("class=\"dl-note\"", "Version 1.1.0 · Apple Silicon · .dmg") + ) +} + +fn dl_windows_card() -> String { + el_div( + "id=\"card-windows\" class=\"card-dark dl-card reveal\"", + el_span("class=\"dl-badge dl-badge-soon\"", "Coming soon") + + el_p("class=\"dl-title\"", "Neuron for Windows") + + el_p("class=\"dl-sub\"", "Windows 10 and 11 (x64).") + + el_div( + "class=\"dl-btnrow\"", + el_a( + "https://downloads.neurontechnologies.ai/installers/Neuron-1.1.0-windows-x64.msi", + "class=\"btn-ghost\" download", + "Download .msi" + ) + ) + + el_p( + "class=\"dl-note\"", + "The Windows build is still landing — this link may not be live yet. Chat is not enabled on Windows in this release." + ) + ) +} + +fn dl_linux_card() -> String { + el_div( + "id=\"card-linux\" class=\"card-dark dl-card reveal\"", + el_span("class=\"dl-badge dl-badge-soon\"", "Coming soon") + + el_p("class=\"dl-title\"", "Neuron for Linux") + + el_p("class=\"dl-sub\"", "Debian / Ubuntu (.deb) or portable (.AppImage), x64.") + + el_div( + "class=\"dl-btnrow\"", + el_a( + "https://downloads.neurontechnologies.ai/installers/Neuron-1.1.0-linux-x64.deb", + "class=\"btn-ghost\" download", + "Download .deb" + ) + + el_a( + "https://downloads.neurontechnologies.ai/installers/Neuron-1.1.0-linux-x64.AppImage", + "class=\"btn-ghost\" download", + "Download .AppImage" + ) + ) + + el_p( + "class=\"dl-note\"", + "Linux packages install today, but the on-device soul backend is still being finished. Full support is coming soon." + ) + ) +} + +fn dl_fineprint() -> String { + el_p( + "class=\"dl-note reveal\" style=\"margin-top:2.5rem\"", + "All installers are served from downloads.neurontechnologies.ai. After checkout your license key arrives by email — manage it from your " + + el_a("/account", "style=\"color:var(--navy)\"", "account") + + "." + ) +} + +// Inline OS detection. CSP allows script-src 'unsafe-inline'. Single-quoted +// JS, ASCII only, no // comments — keeps the .el string simple and avoids +// tokenizer surprises. +fn dl_script() -> String { + "" +} + +fn downloads_content() -> String { + let grid: String = el_div("class=\"dl-grid\"", dl_windows_card() + dl_linux_card()) + el_section( + "id=\"downloads\" aria-label=\"Download Neuron\"", + el_div( + "class=\"container dl-wrap\"", + dl_header() + dl_mac_card() + grid + dl_fineprint() + ) + ) +} + +fn downloads_page() -> String { + return nav() + dl_style() + downloads_content() + footer() + dl_script() +} diff --git a/src/main.el b/src/main.el index 0287238..b19a72d 100644 --- a/src/main.el +++ b/src/main.el @@ -87,6 +87,7 @@ from checkout import { checkout_page } from safety import { safety } from gallery import { gallery_page } from account import { account_page } +from downloads import { downloads_page } // ── Share-card HTML allowlist ───────────────────────────────────────────────── // @@ -1971,6 +1972,15 @@ fn handle_request_inner(method: String, path: String, headers: Map, body: String ) + badge_css + success_body + page_close() } + // ── Downloads ───────────────────────────────────────────────────────────── + // Public installer page. macOS ships today; Windows/Linux linked but marked + // coming soon. Live-rendered like /about (page shell wraps downloads_page()). + if str_starts_with(path, "/downloads") { + let dl_title: String = "Download Neuron - macOS, Windows & Linux" + let dl_desc: String = "Download Neuron for macOS. Your AI that remembers you, running on your own machine. Windows and Linux support is on the way." + return page_open_seo(dl_title, dl_desc, "/downloads", dl_desc, "false") + downloads_page() + page_close() + } + // ── Account dashboard ───────────────────────────────────────────────────── // Use prefix match so OAuth/email-confirmation redirects with query strings still hit. if str_starts_with(path, "/account") {