diff --git a/website/src/components/HomepageContent/index.js b/website/src/components/HomepageContent/index.js
index ff14238..a4e4378 100644
--- a/website/src/components/HomepageContent/index.js
+++ b/website/src/components/HomepageContent/index.js
@@ -1,58 +1,56 @@
-import React from 'react';
-import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
-import HomeIntro from './HomeIntro.mdx';
-import ProjectOverview from './ProjectOverview.md';
-import Supporters from './Supporters.md';
-import ProjectGridTemplate from '@site/src/components/ProjectGridTemplate';
-import styles from './styles.module.css';
+import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
+import HomeIntro from "./HomeIntro.mdx";
+import ProjectOverview from "./ProjectOverview.md";
+import Supporters from "./Supporters.md";
+import ProjectGridTemplate from "@site/src/components/ProjectGridTemplate";
+import styles from "./styles.module.css";
export default function HomepageContent() {
- // Get baseUrl from Docusaurus context
- const { siteConfig } = useDocusaurusContext();
- const { baseUrl } = siteConfig;
+ // Get baseUrl from Docusaurus context
+ const { siteConfig } = useDocusaurusContext();
+ const { baseUrl } = siteConfig;
- return (
-
-
-
-
-
-
-
-
+ return (
+
+
+
+
+
+
+
-
-
-
AboutCode Projects Overview
-
+
+
+
AboutCode Projects Overview
+
-
-
-
+
+
+
-
-
+
+
-
-
-
Supporters
-
-
-
-
-
+
+
+
Supporters
+
+
+
+
+
- {/* temp dummy div to create space above footer */}
-
-
- );
+ {/* temp dummy div to create space above footer */}
+
+
+ );
}
diff --git a/website/src/components/HomepageHeader/index.js b/website/src/components/HomepageHeader/index.js
index 6a783d5..fa6a448 100644
--- a/website/src/components/HomepageHeader/index.js
+++ b/website/src/components/HomepageHeader/index.js
@@ -1,16 +1,11 @@
-import React from 'react';
-import styles from './styles.module.css';
+import styles from "./styles.module.css";
export default function HomepageHeader() {
return (
-
- Welcome to AboutCode.org
-
-
- FOSS for FOSS
-
+
Welcome to AboutCode.org
+
FOSS for FOSS
);
diff --git a/website/src/components/ProjectGridTemplate/index.js b/website/src/components/ProjectGridTemplate/index.js
index daa471e..214b7db 100644
--- a/website/src/components/ProjectGridTemplate/index.js
+++ b/website/src/components/ProjectGridTemplate/index.js
@@ -1,635 +1,487 @@
-import React, { useState, useEffect } from 'react';
-import styles from './styles.module.css';
-import projects_application from '@site/src/data/projects-application.json';
-import projects_scancode from '@site/src/data/projects-scancode.json';
-import projects_package_url from '@site/src/data/projects-package-url.json';
-import projects_inspectors from '@site/src/data/projects-inspectors.json';
-import projects_libraries from '@site/src/data/projects-libraries.json';
+import React, { useState, useEffect } from "react";
+import styles from "./styles.module.css";
+import projects_application from "@site/src/data/projects-application.json";
+import projects_scancode from "@site/src/data/projects-scancode.json";
+import projects_package_url from "@site/src/data/projects-package-url.json";
+import projects_inspectors from "@site/src/data/projects-inspectors.json";
+import projects_libraries from "@site/src/data/projects-libraries.json";
export default function ProjectGrids() {
- const [selectedProject, setSelectedProject] = useState(null);
- const [isModalOpen, setIsModalOpen] = useState(false);
- const [message, setMessage] = useState('');
- const [modalMessage, setModalMessage] = useState('');
-
- // list of data sources
- const projectSources = [
- {
- id: 'application-projects',
- title: 'Application Projects',
- data: projects_application,
- description:
- 'These projects offer an application that you can install in the cloud or a local environment.',
- },
- {
- id: 'scancode-projects',
- title: 'ScanCode projects',
- data: projects_scancode,
- description:
- 'These projects are components or extensions of ScanCode.',
- },
- {
- id: 'purl-projects',
- title: 'Package-URL (PURL) projects',
- data: projects_package_url,
- description:
- 'These projects provide tools and data to support the use of the PURL (Package-URL) or VERS (Version Range Specifier) specifications.',
- },
- {
- id: 'inspectors',
- title: 'Inspectors',
- data: projects_inspectors,
- description:
- 'AboutCode Inspectors are special-purpose analysis tools. You can run them as a ScanCode Toolkit plugin, as steps in a ScanCode.io pipeline, or from the command line.',
- },
- {
- id: 'libraries',
- title: 'Libraries',
- data: projects_libraries,
- description:
- 'AboutCode libraries are key building blocks for the AboutCode software and data stack - they have also been incorporated into other major FOSS projects and are available for use by anyone.',
- },
- ];
-
- const openModal = (project) => {
- setSelectedProject(project);
- setIsModalOpen(true);
- };
-
- const closeModal = () => {
+ const [selectedProject, setSelectedProject] = useState(null);
+ const [isModalOpen, setIsModalOpen] = useState(false);
+ const [message, setMessage] = useState("");
+ const [modalMessage, setModalMessage] = useState("");
+
+ // list of data sources
+ const projectSources = [
+ {
+ id: "application-projects",
+ title: "Application Projects",
+ data: projects_application,
+ description:
+ "These projects offer an application that you can install in the cloud or a local environment.",
+ },
+ {
+ id: "scancode-projects",
+ title: "ScanCode projects",
+ data: projects_scancode,
+ description: "These projects are components or extensions of ScanCode.",
+ },
+ {
+ id: "purl-projects",
+ title: "Package-URL (PURL) projects",
+ data: projects_package_url,
+ description:
+ "These projects provide tools and data to support the use of the PURL (Package-URL) or VERS (Version Range Specifier) specifications.",
+ },
+ {
+ id: "inspectors",
+ title: "Inspectors",
+ data: projects_inspectors,
+ description:
+ "AboutCode Inspectors are special-purpose analysis tools. You can run them as a ScanCode Toolkit plugin, as steps in a ScanCode.io pipeline, or from the command line.",
+ },
+ {
+ id: "libraries",
+ title: "Libraries",
+ data: projects_libraries,
+ description:
+ "AboutCode libraries are key building blocks for the AboutCode software and data stack - they have also been incorporated into other major FOSS projects and are available for use by anyone.",
+ },
+ ];
+
+ const openModal = (project) => {
+ setSelectedProject(project);
+ setIsModalOpen(true);
+ };
+
+ const closeModal = () => {
+ setSelectedProject(null);
+ setIsModalOpen(false);
+ };
+
+ // Close modal on Escape key
+ useEffect(() => {
+ function handleKeyDown(event) {
+ if (event.key === "Escape") {
setSelectedProject(null);
- setIsModalOpen(false);
+ }
+ }
+ if (selectedProject) {
+ window.addEventListener("keydown", handleKeyDown);
+ }
+ return () => {
+ window.removeEventListener("keydown", handleKeyDown);
};
-
- // Close modal on Escape key
- useEffect(() => {
- function handleKeyDown(event) {
- if (event.key === 'Escape') {
- setSelectedProject(null);
- }
- }
- if (selectedProject) {
- window.addEventListener('keydown', handleKeyDown);
- }
- return () => {
- window.removeEventListener('keydown', handleKeyDown);
- };
- }, [selectedProject]);
-
- // Add tooltip to card and modal.
- function DescriptionWithTooltip({ text }) {
- const descRef = React.useRef(null);
- const [showTooltip, setShowTooltip] = React.useState(false);
-
- React.useEffect(() => {
- const el = descRef.current;
- if (el) {
- // check if content is overflowing its container
- setShowTooltip(
- el.scrollHeight > el.clientHeight ||
- el.scrollWidth > el.clientWidth,
- );
- }
- }, [text]);
-
- return (
-
-
- {text}
-
- {showTooltip &&
{text}
}
-
+ }, [selectedProject]);
+
+ // Add tooltip to card and modal.
+ function DescriptionWithTooltip({ text }) {
+ const descRef = React.useRef(null);
+ const [showTooltip, setShowTooltip] = React.useState(false);
+
+ React.useEffect(() => {
+ const el = descRef.current;
+ if (el) {
+ // check if content is overflowing its container
+ setShowTooltip(
+ el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth,
);
- }
+ }
+ }, [text]);
- function normalizeToArray(value) {
- const INVALID_VALUES = new Set(['Not available', 'Not applicable']);
+ return (
+