/* Shared blog article shell: used by every blog post.
Pass `meta` (header info) and `children` (the prose).
Renders: hero, sticky aside (meta), prose column, sticky TOC, related strip. */
function BlogArticle({ meta, toc, children, related }) {
useReveal();
return (
<>
{/* Hero */}
{meta.category}
{meta.title}{meta.italic && <> {meta.italic} >}
{meta.lead}
By {meta.author || "Auctera"}
{meta.date}
{meta.readTime}
{/* Body */}
{/* LEFT: meta sidebar */}
Filed under
{meta.category}
{meta.tags && (
Topics
{meta.tags.map((t,i)=>(
{t}
))}
)}
{/* CENTER: prose */}
{children}
{/* RIGHT - TOC */}
In this article
{toc.map((t,i)=>(
{t.label}
))}
{/* Related */}
{related && related.length > 0 && (
Keep Reading
Related articles.
)}
{/* CTA */}
>
);
}
function ShareLink({ kind }) {
const icons = {
x: ,
li: ,
link:
};
const [copied, setCopied] = React.useState(false);
const handleClick = (e) => {
e.preventDefault();
const url = window.location.href;
if (kind === "x") {
window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(url)}`, "_blank");
} else if (kind === "li") {
window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(url)}`, "_blank");
} else if (kind === "link") {
navigator.clipboard.writeText(url);
setCopied(true);
setTimeout(() => setCopied(false), 2000);
}
};
return (
{e.currentTarget.style.background="var(--ink)"; e.currentTarget.style.color="var(--paper)"; e.currentTarget.style.borderColor="var(--ink)";}}
onMouseLeave={e=>{e.currentTarget.style.background="transparent"; e.currentTarget.style.color=copied ? "var(--ochre)" : "var(--ink-2)"; e.currentTarget.style.borderColor="var(--line-strong)";}}>
{icons[kind]}
);
}
/* Helpers: small components for prose convenience */
function H2({ id, children }) { return
{children} ; }
function H3({ id, children }) { return {children} ; }
function Tldr({ items }) {
return (
TL;DR
{items.map((it,i)=>{it} )}
);
}
function Quote({ children }) { return {children} ; }
/* Internal link to another Auctera page (resolved relative to /pages) */
function L({ to, children }) {
// Map "/platform/foo" → "platform-foo"; "/capabilities/foo" → "capabilities-foo"
const mapped = to.replace(/^\//, "").replace(/^([^/]+)\/(.+)$/, (m, a, b) => `${a}-${b}`).replace(/\//g, "-");
return {children} ;
}
Object.assign(window, { BlogArticle, H2, H3, Tldr, Quote, L });