continuwuity/theme/index.tsx
Jade Ellis 57b21c1b32
All checks were successful
Documentation / Build and Deploy Documentation (push) Successful in 1m34s
Checks / Prek / Pre-commit & Formatting (push) Successful in 6m21s
Checks / Prek / Clippy and Cargo Tests (push) Successful in 22m27s
Release Docker Image / Build linux-arm64 (release) (push) Successful in 17m49s
Release Docker Image / Build linux-amd64 (release) (push) Successful in 19m34s
Release Docker Image / Create Multi-arch Release Manifest (push) Successful in 1m1s
Release Docker Image / Build linux-amd64 (max-perf) (push) Successful in 31m52s
Release Docker Image / Build linux-arm64 (max-perf) (push) Successful in 30m53s
Release Docker Image / Create Max-Perf Manifest (push) Successful in 18s
docs: Add links to matrix guides
2026-02-14 19:29:07 +00:00

46 lines
1.7 KiB
TypeScript

import { HomeLayout as BasicHomeLayout, DocContent } from "@rspress/core/theme-original";
import { useFrontmatter } from '@rspress/core/runtime';
interface HomeLayoutProps {
components?: Record<string, React.FC>;
}
function HomeLayout(props: HomeLayoutProps) {
console.log(props)
const { frontmatter } = useFrontmatter();
return (
<BasicHomeLayout
beforeFeatures={
frontmatter.beforeFeatures ? (
<section className="custom-section">
<div className="rp-container">
<div className="custom-cards">
{frontmatter.beforeFeatures.map((item: any, index: number) => (
<a key={index} href={item.link} className="custom-card" target="_blank" rel="noopener noreferrer">
<h3>{item.title}</h3>
<p>{item.details}</p>
<span className="custom-card-button">{item.buttonText || 'Learn More'} </span>
</a>
))}
</div>
</div>
</section>
) : <></>
}
afterFeatures={
(frontmatter.doc) ?
<main className="rp-doc-layout__doc-container">
<div className="rp-doc rspress-doc">
<DocContent components={props.components} />
</div>
</main>
: <></>
}
/>
);
}
export { HomeLayout };
export * from "@rspress/core/theme-original";
import "./index.css";