Skip to content

Commit

Permalink
docs: Better home page
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenQuim committed Jan 25, 2024
1 parent 6ed22a0 commit 710e568
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 11 deletions.
18 changes: 17 additions & 1 deletion documentation/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
import clsx from "clsx";
import styles from "./styles.module.css";

export default function HomepageFeatures(): JSX.Element {
return (
<></>
<div className={styles.features} style={{}}>
<div id="simple" className={clsx(styles.block, styles.block_odd)}>
<h2 className="">Serialisation</h2>
<p>Simple serialisation of data structures to JSON and back.</p>
</div>
<div id="openapi" className={clsx(styles.block)}>
<h2 className="">OpenAPI generation</h2>
<p>Generate OpenAPI 3.0 specifications from your data structures.</p>
</div>
<div id="validation" className={clsx(styles.block, styles.block_odd)}>
<h2 className="">Validation</h2>
<p>Easily validate data structures against your own rules.</p>
</div>
</div>
);
}
17 changes: 16 additions & 1 deletion documentation/src/components/HomepageFeatures/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
.features {
display: flex;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
}

.block {
min-width: 200px;
display: flex;
flex-direction: column;
align-items: center;
padding: 2rem 0;
justify-content: center;
padding: 1rem;
width: 100%;
}

.block_odd {
background-color: #953a09;
color: #fff;
}

.featureSvg {
height: 200px;
width: 200px;
Expand Down
15 changes: 6 additions & 9 deletions documentation/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ import styles from "./index.module.css";
function HomepageHeader() {
const { siteConfig } = useDocusaurusContext();
return (
<header className={clsx("hero hero--primary", styles.heroBanner)}>
<header className={clsx(styles.heroBanner)}>
<div className="container">
<img src="/fuego/img/logo.svg" alt="" width={200} height={200} />

<Heading as="h1" className="hero__title">
{siteConfig.title}
</Heading>
<p className="hero__subtitle">{siteConfig.tagline}</p>
<div className={styles.buttons}>
<Link className="button button--secondary button--lg" to="/docs/">
Fuego Tutorial - 5min ⏱️
Tutorial - 5 min ⏱️
</Link>
</div>
</div>
Expand All @@ -29,14 +31,9 @@ function HomepageHeader() {
export default function Home(): JSX.Element {
const { siteConfig } = useDocusaurusContext();
return (
<Layout
title={`Hello from ${siteConfig.title}`}
description="Description will go into a meta tag in <head />"
>
<Layout title={siteConfig.title} description={siteConfig.tagline}>
<HomepageHeader />
<main>
<HomepageFeatures />
</main>
<main>{/* <HomepageFeatures /> */}</main>
</Layout>
);
}

0 comments on commit 710e568

Please sign in to comment.