From bc297e5e496d9f48ef77581b7fb41fdf328a62cf Mon Sep 17 00:00:00 2001 From: kj_sh604 Date: Sun, 15 Mar 2026 16:19:35 -0400 Subject: refactor: dev-docs/ --- dev-docs/src/components/Highlight.js | 15 +++++ dev-docs/src/components/Homepage/index.js | 62 +++++++++++++++++++ dev-docs/src/components/Homepage/index.tsx | 70 ++++++++++++++++++++++ dev-docs/src/components/Homepage/styles.module.css | 11 ++++ 4 files changed, 158 insertions(+) create mode 100644 dev-docs/src/components/Highlight.js create mode 100644 dev-docs/src/components/Homepage/index.js create mode 100644 dev-docs/src/components/Homepage/index.tsx create mode 100644 dev-docs/src/components/Homepage/styles.module.css (limited to 'dev-docs/src/components') diff --git a/dev-docs/src/components/Highlight.js b/dev-docs/src/components/Highlight.js new file mode 100644 index 0000000..6ef3041 --- /dev/null +++ b/dev-docs/src/components/Highlight.js @@ -0,0 +1,15 @@ +import React from "react"; +export default function Highlight({ children }) { + return ( + + {children} + + ); +} diff --git a/dev-docs/src/components/Homepage/index.js b/dev-docs/src/components/Homepage/index.js new file mode 100644 index 0000000..e350e03 --- /dev/null +++ b/dev-docs/src/components/Homepage/index.js @@ -0,0 +1,62 @@ +import React from "react"; +import clsx from "clsx"; +import styles from "./styles.module.css"; + +const FeatureList = [ + { + title: "Learn how Excalidraw works", + Svg: require("@site/static/img/undraw_innovative.svg").default, + description: ( + <>Want to contribute to Excalidraw but got lost in the codebase? + ), + }, + { + title: "Integrate Excalidraw", + Svg: require("@site/static/img/undraw_blank_canvas.svg").default, + description: ( + <> + Want to build your own app powered by Excalidraw but don't know where to + start? + + ), + }, + { + title: "Help us improve", + Svg: require("@site/static/img/undraw_add_files.svg").default, + description: ( + <> + Are the docs missing something? Anything you had trouble understanding + or needs an explanation? Come contribute to the docs to make them even + better! + + ), + }, +]; + +function Feature({ Svg, title, description }) { + return ( +
+
+ +
+
+

{title}

+

{description}

+
+
+ ); +} + +export default function HomepageFeatures() { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ); +} diff --git a/dev-docs/src/components/Homepage/index.tsx b/dev-docs/src/components/Homepage/index.tsx new file mode 100644 index 0000000..ee86e91 --- /dev/null +++ b/dev-docs/src/components/Homepage/index.tsx @@ -0,0 +1,70 @@ +import React from "react"; +import clsx from "clsx"; +import styles from "./styles.module.css"; + +type FeatureItem = { + title: string; + Svg: React.ComponentType>; + description: JSX.Element; +}; + +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(): JSX.Element { + return ( +
+
+
+ {FeatureList.map((props, idx) => ( + + ))} +
+
+
+ ); +} diff --git a/dev-docs/src/components/Homepage/styles.module.css b/dev-docs/src/components/Homepage/styles.module.css new file mode 100644 index 0000000..b248eb2 --- /dev/null +++ b/dev-docs/src/components/Homepage/styles.module.css @@ -0,0 +1,11 @@ +.features { + display: flex; + align-items: center; + padding: 2rem 0; + width: 100%; +} + +.featureSvg { + height: 200px; + width: 200px; +} -- cgit v1.2.3