From ce7b3a222263d27819f483579cba2fed1bd0e014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 5 Apr 2025 19:21:53 +0200 Subject: [PATCH] Add initial homepage --- src/components/HomepageFeatures/index.tsx | 71 +++++++++++++++++++ .../HomepageFeatures/styles.module.css | 11 +++ src/pages/index.module.css | 23 ++++++ src/pages/index.tsx | 44 ++++++++++++ src/pages/mentions-legales.mdx | 1 + 5 files changed, 150 insertions(+) create mode 100644 src/components/HomepageFeatures/index.tsx create mode 100644 src/components/HomepageFeatures/styles.module.css create mode 100644 src/pages/index.module.css create mode 100644 src/pages/index.tsx create mode 100644 src/pages/mentions-legales.mdx diff --git a/src/components/HomepageFeatures/index.tsx b/src/components/HomepageFeatures/index.tsx new file mode 100644 index 0000000..c2551fb --- /dev/null +++ b/src/components/HomepageFeatures/index.tsx @@ -0,0 +1,71 @@ +import type {ReactNode} from 'react'; +import clsx from 'clsx'; +import Heading from '@theme/Heading'; +import styles from './styles.module.css'; + +type FeatureItem = { + title: string; + Svg: React.ComponentType>; + description: ReactNode; +}; + +const FeatureList: FeatureItem[] = [ + { + title: 'Easy to Use', + Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + description: ( + <> + Docusaurus was designed from the ground up to be easily installed and + used to get your website up and running quickly. + + ), + }, + { + title: 'Focus on What Matters', + Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + description: ( + <> + Docusaurus lets you focus on your docs, and we'll do the chores. Go + ahead and move your docs into the docs directory. + + ), + }, + { + title: 'Powered by React', + Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + description: ( + <> + Extend or customize your website layout by reusing React. Docusaurus can + be extended while reusing the same header and footer. + + ), + }, +]; + +function Feature({title, Svg, description}: FeatureItem) { + return ( +
+
+ +
+
+ {title} +

{description}

+
+
+ ); +} + +export default function HomepageFeatures(): ReactNode { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ); +} diff --git a/src/components/HomepageFeatures/styles.module.css b/src/components/HomepageFeatures/styles.module.css new file mode 100644 index 0000000..b248eb2 --- /dev/null +++ b/src/components/HomepageFeatures/styles.module.css @@ -0,0 +1,11 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureSvg { + height: 200px; + width: 200px; +} diff --git a/src/pages/index.module.css b/src/pages/index.module.css new file mode 100644 index 0000000..9f71a5d --- /dev/null +++ b/src/pages/index.module.css @@ -0,0 +1,23 @@ +/** + * CSS files with the .module.css suffix will be treated as CSS modules + * and scoped locally. + */ + +.heroBanner { + padding: 4rem 0; + text-align: center; + position: relative; + overflow: hidden; +} + +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + +.buttons { + display: flex; + align-items: center; + justify-content: center; +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx new file mode 100644 index 0000000..3936625 --- /dev/null +++ b/src/pages/index.tsx @@ -0,0 +1,44 @@ +import type {ReactNode} from 'react'; +import clsx from 'clsx'; +import Link from '@docusaurus/Link'; +import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; +import Layout from '@theme/Layout'; +import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import Heading from '@theme/Heading'; + +import styles from './index.module.css'; + +function HomepageHeader() { + const {siteConfig} = useDocusaurusContext(); + return ( +
+
+ + {siteConfig.title} + +

{siteConfig.tagline}

+
+ + See the team + +
+
+
+ ); +} + +export default function Home(): ReactNode { + const {siteConfig} = useDocusaurusContext(); + return ( + + + {/*
+ +
*/} +
+ ); +} diff --git a/src/pages/mentions-legales.mdx b/src/pages/mentions-legales.mdx new file mode 100644 index 0000000..49b7b0f --- /dev/null +++ b/src/pages/mentions-legales.mdx @@ -0,0 +1 @@ +# pouet