diff --git a/components/TableOfContents.jsx b/components/TableOfContents.jsx new file mode 100644 index 00000000..3a5710b1 --- /dev/null +++ b/components/TableOfContents.jsx @@ -0,0 +1,101 @@ +import React from "react"; +import "../src/css/toc.css"; + +/** + * A Table of Contents for the Honeycomb Docs page + * + * @param {*} param0 + * @returns + */ +export default function TableOfContents() { + return ( +
+

Table of Contents

+
+
+ +
+
+ +
+
+
+ ); +} diff --git a/src/css/toc.css b/src/css/toc.css new file mode 100644 index 00000000..46585db8 --- /dev/null +++ b/src/css/toc.css @@ -0,0 +1,48 @@ +/** +* For table of contents items +*/ +.TOC-container { + display: flex; + flex-direction: column; + justify-content: center; +} + +.TOC-content { + display: flex; + flex-direction: row; + align-items: top; + justify-self: center; + margin: 1.5vh 0; + gap: 5.5vw; + padding: 0; +} + +.TOC-col { + display: flex; + flex-direction: column; + align-items: center; + justify-self: center; + margin: 1.5vh 0; + padding: 0; +} + +.TOC-col > ul { + display: inline-block; + text-align: center; + list-style: none; + padding: 0; + margin: 0; +} + +.TOC-col > ul > li { + margin-bottom: 1.5vh; + font-size: large; +} + +.TOC-col > ul > li > ul { + text-align: center; + list-style: none; + padding: 0; + margin: 0; + font-size: smaller; +} diff --git a/src/pages/index.js b/src/pages/index.js index 7352b0fd..544caec8 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,50 +1,51 @@ -import React from 'react'; -import clsx from 'clsx'; -import Layout from '@theme/Layout'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; -import useBaseUrl from '@docusaurus/useBaseUrl'; +import React from "react"; +import clsx from "clsx"; +import Layout from "@theme/Layout"; +import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; +import useBaseUrl from "@docusaurus/useBaseUrl"; +import TableOfContents from "../../components/TableOfContents.jsx"; -import styles from './styles.module.css'; +import styles from "./styles.module.css"; const features = [ { - title: 'Modular and Configurable', - imageUrl: 'img/undraw_Content_creator_re_pt5b.svg', + title: "Modular and Configurable", + imageUrl: "img/undraw_Content_creator_re_pt5b.svg", description: ( <> - Honeycomb was designed to be modular, composable, easily configured to deploy to Linux, Mac, - - Windows, Browsers, PsiTurk, and more - + Honeycomb was designed to be modular, composable, easily configured to + deploy to Linux, Mac, Windows, Browsers, PsiTurk, and more ), }, { - title: 'Packed with automation', - imageUrl: 'img/undraw_User_flow_re_bvfx.svg', + title: "Packed with automation", + imageUrl: "img/undraw_User_flow_re_bvfx.svg", description: ( - <>Honeycomb includes GitHub Actions that build the executables/deployments for you. + <> + Honeycomb includes GitHub Actions that build the executables/deployments + for you. + ), }, { - title: 'Based on trusted and mature libraries', - imageUrl: 'img/undraw_Code_review_re_woeb.svg', - description: <>Honeycomb relies on mature libraries such as JSPsych, React and Electron, + title: "Based on trusted and mature libraries", + imageUrl: "img/undraw_Code_review_re_woeb.svg", + description: ( + <> + Honeycomb relies on mature libraries such as JSPsych, React and Electron + + ), }, ]; function Feature({ imageUrl, title, description }) { const imgUrl = useBaseUrl(imageUrl); return ( -
+
{imgUrl && ( -
- {title} +
+ {title}
)}

{title}

@@ -59,35 +60,24 @@ function Home() { return ( -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

-
- - Read the Docs - -
+
+
+

{siteConfig.title}

+

{siteConfig.tagline}

+ +
+
{features && features.length > 0 && (
-
-
+
+
{features.map((props, idx) => ( - + ))}
diff --git a/src/pages/styles.module.css b/src/pages/styles.module.css index c1aa8512..244507cf 100644 --- a/src/pages/styles.module.css +++ b/src/pages/styles.module.css @@ -10,6 +10,8 @@ text-align: center; position: relative; overflow: hidden; + display: flex; + flex-direction: column; } @media screen and (max-width: 966px) {