117 lines
4.4 KiB
TypeScript
117 lines
4.4 KiB
TypeScript
/**
|
|
* rCart demo page — server-rendered HTML body.
|
|
*
|
|
* Embeds the full <folk-cart-shop space="demo"> component for
|
|
* real interactivity (catalog browsing, order tracking, filtering)
|
|
* plus showcase sections explaining the rCart vision.
|
|
*/
|
|
|
|
const FEATURES = [
|
|
{
|
|
icon: "\u{1F30D}",
|
|
title: "Cosmolocal Fulfillment",
|
|
desc: "Orders are matched to the nearest capable print shop or makerspace. Design global, manufacture local.",
|
|
},
|
|
{
|
|
icon: "\u{1F6D2}",
|
|
title: "Group Shopping",
|
|
desc: "Communities pool resources and split costs. Transparent funding progress for every item in the cart.",
|
|
},
|
|
{
|
|
icon: "\u{1F4B0}",
|
|
title: "Revenue Splits",
|
|
desc: "Every order automatically splits revenue between provider, creator, and community fund via rFunds flows.",
|
|
},
|
|
{
|
|
icon: "\u{1F4E6}",
|
|
title: "Order Tracking",
|
|
desc: "Follow orders from pending through production to delivery. Real-time status updates across the community.",
|
|
},
|
|
];
|
|
|
|
const INTEGRATIONS = [
|
|
{ icon: "\u{1F30A}", name: "rFunds", desc: "Revenue from orders flows through TBFF budget funnels with enoughness thresholds." },
|
|
{ icon: "\u{1F3A8}", name: "rDesign", desc: "Design artifacts become print-ready catalog entries with one click." },
|
|
{ icon: "\u{1F465}", name: "rNetwork", desc: "Provider registry matches orders to the closest maker in your network." },
|
|
{ icon: "\u{1F5FA}", name: "rMaps", desc: "See provider locations and delivery zones on the map." },
|
|
{ icon: "\u{1F4DD}", name: "rNotes", desc: "Link product specs, sizing guides, and design notes to catalog items." },
|
|
{ icon: "\u2615\uFE0F", name: "rSpace", desc: "Each space has its own shop. Nest catalogs across spaces for cross-community commerce." },
|
|
];
|
|
|
|
export function renderDemo(): string {
|
|
return `
|
|
<div class="rd-root" style="--rd-accent-from:#10b981; --rd-accent-to:#2dd4bf;">
|
|
|
|
<!-- Hero -->
|
|
<section class="rd-hero">
|
|
<div style="display:inline-block;padding:0.375rem 1rem;background:rgba(16,185,129,0.1);border:1px solid rgba(16,185,129,0.2);border-radius:9999px;font-size:0.875rem;color:#6ee7b7;font-weight:500;margin-bottom:1.5rem;">
|
|
Cosmolocal Print-on-Demand
|
|
</div>
|
|
<h1>rCart Demo</h1>
|
|
<p class="rd-subtitle">Group shopping with cosmolocal fulfillment, revenue splits, and transparent funding</p>
|
|
<div class="rd-meta">
|
|
<span>\u{1F6D2} Catalog & Orders</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F30D} Local Fulfillment</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F4B0} Revenue Splits</span>
|
|
<span style="color:#475569">|</span>
|
|
<span>\u{1F4E6} Order Tracking</span>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Interactive Shop -->
|
|
<section class="rd-section rd-section--narrow">
|
|
<div class="rd-card" style="padding:0;overflow:hidden;">
|
|
<folk-cart-shop space="demo"></folk-cart-shop>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Core Concepts -->
|
|
<section class="rd-section">
|
|
<div class="rd-grid rd-grid--2">
|
|
${FEATURES.map(
|
|
(f) => `
|
|
<div class="rd-card" style="padding:1.5rem;">
|
|
<div style="font-size:1.75rem;margin-bottom:0.75rem;">${f.icon}</div>
|
|
<h3 style="font-size:1rem;font-weight:600;color:#e2e8f0;margin:0 0 0.5rem;">${f.title}</h3>
|
|
<p style="font-size:0.875rem;color:#94a3b8;margin:0;line-height:1.5;">${f.desc}</p>
|
|
</div>`,
|
|
).join("")}
|
|
</div>
|
|
</section>
|
|
|
|
<!-- Ecosystem Integrations -->
|
|
<section class="rd-section">
|
|
<h2 style="text-align:center;font-size:1.25rem;font-weight:700;color:#f1f5f9;margin:0 0 1.5rem;">
|
|
r* Ecosystem Integrations
|
|
</h2>
|
|
<div class="rd-grid rd-grid--3">
|
|
${INTEGRATIONS.map(
|
|
(i) => `
|
|
<div class="rd-card" style="padding:1.25rem;">
|
|
<div style="font-size:1.5rem;margin-bottom:0.5rem;">${i.icon}</div>
|
|
<h3 style="font-size:0.875rem;font-weight:600;color:#e2e8f0;margin:0 0 0.375rem;">${i.name}</h3>
|
|
<p style="font-size:0.8rem;color:#94a3b8;margin:0;line-height:1.4;">${i.desc}</p>
|
|
</div>`,
|
|
).join("")}
|
|
</div>
|
|
</section>
|
|
|
|
<!-- CTA -->
|
|
<section class="rd-section rd-section--narrow">
|
|
<div class="rd-cta">
|
|
<h2>Ready to shop together?</h2>
|
|
<p>
|
|
rCart gives your community a shared catalog with cosmolocal fulfillment,
|
|
transparent funding, and automatic revenue splits.
|
|
</p>
|
|
<a href="/create-space" style="background:linear-gradient(135deg,#10b981,#059669);box-shadow:0 8px 24px rgba(16,185,129,0.25);">
|
|
Create Your First Cart
|
|
</a>
|
|
</div>
|
|
</section>
|
|
|
|
</div>`;
|
|
}
|