docs: Add links to matrix guides

This commit is contained in:
Jade Ellis 2026-02-11 18:25:11 +00:00 committed by Ellis Git
parent 8d66500c99
commit 57b21c1b32
3 changed files with 92 additions and 0 deletions

View file

@ -19,6 +19,16 @@ hero:
src: /assets/logo.svg src: /assets/logo.svg
alt: continuwuity logo alt: continuwuity logo
beforeFeatures:
- title: Matrix for Discord users
details: New to Matrix? Learn how Matrix compares to Discord
link: https://joinmatrix.org/guide/matrix-vs-discord/
buttonText: Find Out the Difference
- title: How Matrix Works
details: Learn how Matrix works under the hood, and what that means
link: https://matrix.org/docs/matrix-concepts/elements-of-matrix/
buttonText: Read the Guide
features: features:
- title: 🚀 High Performance - title: 🚀 High Performance
details: Built with Rust for exceptional speed and efficiency. Designed to run smoothly even on modest hardware. details: Built with Rust for exceptional speed and efficiency. Designed to run smoothly even on modest hardware.

View file

@ -105,3 +105,68 @@ body:not(.notTopArrived) header.rp-nav {
.rspress-logo { .rspress-logo {
height: 32px; height: 32px;
} }
/* pre-hero */
.custom-section {
padding: 4rem 1.5rem;
background: var(--rp-c-bg);
}
.custom-cards {
display: flex;
gap: 2rem;
max-width: 800px;
margin: 0 auto;
justify-content: center;
flex-wrap: wrap;
}
.custom-card {
padding: 2rem;
border: 1px solid var(--rp-c-divider-light);
border-radius: 12px;
background: var(--rp-c-bg-soft);
text-decoration: none;
color: var(--rp-c-text-1);
transition: all 0.3s ease;
display: flex;
flex-direction: column;
flex: 1;
min-width: 280px;
max-width: 350px;
}
.custom-card:hover {
border-color: var(--rp-c-brand);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
transform: translateY(-2px);
}
.custom-card h3 {
margin: 0 0 1rem 0;
font-size: 1.25rem;
font-weight: 600;
color: var(--rp-c-text-0);
}
.custom-card p {
margin: 0 0 1.5rem 0;
color: var(--rp-c-text-2);
line-height: 1.6;
flex: 1;
}
.custom-card-button {
display: inline-block;
padding: 0.5rem 1.5rem;
background: var(--rp-c-brand);
color: white;
border-radius: 6px;
font-weight: 500;
text-align: center;
transition: background 0.2s ease;
}
.custom-card:hover .custom-card-button {
background: var(--rp-c-brand-light);
}

View file

@ -12,6 +12,23 @@ function HomeLayout(props: HomeLayoutProps) {
return ( return (
<BasicHomeLayout <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={ afterFeatures={
(frontmatter.doc) ? (frontmatter.doc) ?
<main className="rp-doc-layout__doc-container"> <main className="rp-doc-layout__doc-container">