feat(site): link the live demo + serve the gerber demo from the versioned CDN
Refer to demo.pcbjam.com from the landing: an accent "Live demo" link in the header nav, an "Open the live editor" hero link, a note in the gerber section, and a "Try the live demo now" line in the final CTA. Rework the embedded gerber viewer (public/gerber-demo/boot.js) to source the WASM from the deploy pipeline's versioned CDN instead of the hand-synced assets.pcbjam.com bucket: resolve gerbview's content-addressed folder at runtime from the release manifest (manifest-latest -> tag -> manifest-<tag> -> gerbview), load all assets (glue + wasm + images.tar.gz) from cdn.pcbjam.com, and load the cross-origin pthread worker via a same-origin blob importScripts shim (mirrors web/standalone/src/wasm/boot.ts). Bump the config-seed KICAD_VERSION_DIR 9.99 -> 10.0 to match the deployed build. Drop the now-obsolete committed glue mirror and the old assets.pcbjam.com sync/r2-deploy scripts. Collapse the header nav to the hamburger below 1025px — the added demo link no longer fits the 1024px-capped bar on a single row. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
13551f4f22
commit
9b41d7321f
15 changed files with 407 additions and 17539 deletions
|
|
@ -11,6 +11,9 @@ const links = [
|
|||
label: 'Built by Emergence Engineering',
|
||||
external: true,
|
||||
},
|
||||
// Highlighted (accent) link to the public editor demo. A compact text link, not
|
||||
// a button — the header container caps at 1024px and a second button overflows it.
|
||||
{ href: 'https://demo.pcbjam.com', label: 'Live demo', external: true, highlight: true },
|
||||
];
|
||||
|
||||
const path = Astro.url.pathname;
|
||||
|
|
@ -36,6 +39,7 @@ const isActive = (href: string, external?: boolean) =>
|
|||
links.map((l) => (
|
||||
<a
|
||||
href={l.href}
|
||||
class:list={[{ 'nav-cta': l.highlight }]}
|
||||
aria-current={isActive(l.href, l.external) ? 'page' : undefined}
|
||||
rel={l.external ? 'noopener' : undefined}
|
||||
target={l.external ? '_blank' : undefined}
|
||||
|
|
@ -87,11 +91,12 @@ const isActive = (href: string, external?: boolean) =>
|
|||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.1rem;
|
||||
gap: 1rem;
|
||||
}
|
||||
.nav > a {
|
||||
color: var(--fg-muted);
|
||||
font-size: 0.95rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.nav > a:hover {
|
||||
color: var(--fg);
|
||||
|
|
@ -100,6 +105,15 @@ const isActive = (href: string, external?: boolean) =>
|
|||
.nav > a[aria-current='page'] {
|
||||
color: var(--fg);
|
||||
}
|
||||
/* Highlighted demo link — accent-colored so it stands out among the neutral
|
||||
nav links without needing a second button (which would overflow the bar). */
|
||||
.nav > a.nav-cta {
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
.nav > a.nav-cta:hover {
|
||||
filter: brightness(1.1);
|
||||
}
|
||||
.cta-join {
|
||||
padding-block: 0.5rem;
|
||||
font-size: 0.95rem;
|
||||
|
|
@ -120,7 +134,10 @@ const isActive = (href: string, external?: boolean) =>
|
|||
border-radius: 2px;
|
||||
}
|
||||
|
||||
@media (max-width: 820px) {
|
||||
/* Collapse to the hamburger menu once the full one-line nav no longer fits the
|
||||
1024px-capped bar (adding the demo link pushed the crowded desktop nav past
|
||||
the point where it stays on a single row). */
|
||||
@media (max-width: 1024px) {
|
||||
.brand-chip {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,13 @@ import WaitlistForm from '../components/WaitlistForm.astro';
|
|||
microcopy="Get early-access invites and product updates. No spam, unsubscribe anytime."
|
||||
/>
|
||||
|
||||
<p class="final-demo">
|
||||
Don’t want to wait? <a
|
||||
href="https://demo.pcbjam.com"
|
||||
target="_blank"
|
||||
rel="noopener">Try the live demo now →</a>
|
||||
</p>
|
||||
|
||||
<ul class="final-trust">
|
||||
<li>Open source</li>
|
||||
<li>Built on KiCad</li>
|
||||
|
|
@ -37,6 +44,15 @@ import WaitlistForm from '../components/WaitlistForm.astro';
|
|||
margin-top: 1.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
.final-demo {
|
||||
margin: 1rem 0 0;
|
||||
font-size: 0.95rem;
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
.final-demo a {
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
.final-trust {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ import SectionBand from '../components/SectionBand.astro';
|
|||
// in a new tab so the landing page itself never needs isolation.
|
||||
const DEMO_HREF = '/gerber-demo/index.html';
|
||||
const poster = '/gerber-demo/poster.png';
|
||||
// The full in-browser editor (not just the viewer) — the public demo.
|
||||
const EDITOR_URL = 'https://demo.pcbjam.com';
|
||||
---
|
||||
|
||||
<SectionBand id="demo" labelledby="gerber-demo-h2">
|
||||
|
|
@ -40,6 +42,12 @@ const poster = '/gerber-demo/poster.png';
|
|||
<span class="gerber-launch__cta">Launch the live Gerber viewer</span>
|
||||
<span class="gerber-launch__sub">Opens in a new tab · streams ~22 MB on demand</span>
|
||||
</a>
|
||||
|
||||
<p class="demo-note">
|
||||
Want to do more than look? Open a board in the full editor at
|
||||
<a href={EDITOR_URL} target="_blank" rel="noopener">demo.pcbjam.com</a> — edit
|
||||
the PCB or schematic in your browser, no install, no account.
|
||||
</p>
|
||||
</SectionBand>
|
||||
|
||||
<style>
|
||||
|
|
@ -99,6 +107,16 @@ const poster = '/gerber-demo/poster.png';
|
|||
text-align: center;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
.demo-note {
|
||||
margin: 1rem 0 0;
|
||||
text-align: center;
|
||||
color: var(--fg-muted);
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.demo-note a {
|
||||
color: var(--accent);
|
||||
font-weight: 600;
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.gerber-launch {
|
||||
transition: none;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,15 @@ import Icon from '../components/Icon.astro';
|
|||
<WaitlistForm source="hero" id="waitlist" class="hero-form" />
|
||||
|
||||
<p class="hero-secondary">
|
||||
<a
|
||||
href="https://demo.pcbjam.com"
|
||||
class="try"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
Open the live editor →
|
||||
</a>
|
||||
<span class="dot" aria-hidden="true">·</span>
|
||||
<a href="#multiplayer" class="watch">
|
||||
<Icon name="icons/play.svg" size="1.1rem" alt="" /> Watch the 90-second demo →
|
||||
</a>
|
||||
|
|
@ -61,6 +70,19 @@ import Icon from '../components/Icon.astro';
|
|||
}
|
||||
.hero-secondary {
|
||||
margin: 1rem 0 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 0.4rem 0.75rem;
|
||||
}
|
||||
.try {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
font-weight: 600;
|
||||
color: var(--accent);
|
||||
}
|
||||
.dot {
|
||||
color: var(--fg-muted);
|
||||
}
|
||||
.watch {
|
||||
display: inline-flex;
|
||||
|
|
|
|||
Loading…
Reference in a new issue