aboutsummaryrefslogtreecommitdiffstats
path: root/dev-docs/src/components
diff options
context:
space:
mode:
authorkj_sh6042026-03-15 16:19:35 -0400
committerkj_sh6042026-03-15 16:19:35 -0400
commitbc297e5e496d9f48ef77581b7fb41fdf328a62cf (patch)
tree66192466eef76ee4c5cf71a9788ae9fe947514d4 /dev-docs/src/components
parentf6538b8f1a78a7d72a41916ac79376f8c2d30193 (diff)
refactor: dev-docs/
Diffstat (limited to 'dev-docs/src/components')
-rw-r--r--dev-docs/src/components/Highlight.js15
-rw-r--r--dev-docs/src/components/Homepage/index.js62
-rw-r--r--dev-docs/src/components/Homepage/index.tsx70
-rw-r--r--dev-docs/src/components/Homepage/styles.module.css11
4 files changed, 158 insertions, 0 deletions
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 (
+ <span
+ style={{
+ backgroundColor: "#7874e8",
+ borderRadius: "2px",
+ color: "#fff",
+ padding: "0.2rem",
+ }}
+ >
+ {children}
+ </span>
+ );
+}
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 (
+ <div className={clsx("col col--4")}>
+ <div className="text--center">
+ <Svg className={styles.featureSvg} role="img" />
+ </div>
+ <div className="text--center padding-horiz--md">
+ <h3>{title}</h3>
+ <p>{description}</p>
+ </div>
+ </div>
+ );
+}
+
+export default function HomepageFeatures() {
+ return (
+ <section className={styles.features}>
+ <div className="container">
+ <div className="row">
+ {FeatureList.map((props, idx) => (
+ <Feature key={idx} {...props} />
+ ))}
+ </div>
+ </div>
+ </section>
+ );
+}
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<React.ComponentProps<"svg">>;
+ 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&apos;ll do the chores. Go
+ ahead and move your docs into the <code>docs</code> 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 (
+ <div className={clsx("col col--4")}>
+ <div className="text--center">
+ <Svg className={styles.featureSvg} role="img" />
+ </div>
+ <div className="text--center padding-horiz--md">
+ <h3>{title}</h3>
+ <p>{description}</p>
+ </div>
+ </div>
+ );
+}
+
+export default function HomepageFeatures(): JSX.Element {
+ return (
+ <section className={styles.features}>
+ <div className="container">
+ <div className="row">
+ {FeatureList.map((props, idx) => (
+ <Feature key={idx} {...props} />
+ ))}
+ </div>
+ </div>
+ </section>
+ );
+}
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;
+}