From 4f6941cf7c6732a4eb0fe1f5f5c76deac4742bef Mon Sep 17 00:00:00 2001 From: johnmhoran Date: Fri, 20 Feb 2026 15:34:46 -0800 Subject: [PATCH] Simplify releases table #85 Reference: https://github.com/aboutcode-org/www.aboutcode.org/issues/85 Signed-off-by: johnmhoran --- website/docs/about/about-releases.mdx | 5 +- website/docusaurus.config.js | 23 +--- website/src/components/ReleasesTable/index.js | 14 ++- .../ReleasesTable/styles.module.css | 102 ++---------------- 4 files changed, 18 insertions(+), 126 deletions(-) diff --git a/website/docs/about/about-releases.mdx b/website/docs/about/about-releases.mdx index edfd5dd..1d053d6 100644 --- a/website/docs/about/about-releases.mdx +++ b/website/docs/about/about-releases.mdx @@ -6,7 +6,8 @@ import ReleasesTable from '@site/src/components/ReleasesTable'; # Latest Releases -Find information here about the latest releases for ScanCode, VulnerableCode, -and other AboutCode projects. +This table lists the latest releases for each AboutCode project, including +ScanCode and VulnerableCode, with the most recent project release listed at +the top. diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index cddf09b..51fb0fa 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -31,8 +31,6 @@ const siteConfig = { }, }; -// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...) - /** @type {import('@docusaurus/types').Config} */ const config = { title: 'AboutCode.org', @@ -51,28 +49,13 @@ const config = { v4: true, // Improve compatibility with the upcoming Docusaurus v4 }, - // // Set the production url of your site here - // url: 'https://your-docusaurus-site.example.com', - // // Set the // pathname under which your site is served - // // For GitHub pages deployment, it is often '//' - // baseUrl: '/', - - // url: 'https://aboutcode-org.github.io', - // baseUrl: '/www.aboutcode.org/', - // trailingSlash: false, - - // 2026-02-19 Thursday 18:06:22. Adapt the www.packageurl.org approach for the GH Pages vs. DreamHost baseUrl adjustment. + // Adapt the www.packageurl.org approach for the GH Pages vs. DreamHost baseUrl adjustment. url: siteConfig[deployTarget].url, baseUrl: siteConfig[deployTarget].baseUrl, trailingSlash: false, - // 2026-02-20 Friday 11:02:52.No longer needed? - // For GitHub pages deployment: - // organizationName: 'aboutcode-org', - // projectName: 'www.aboutcode.org', - onBrokenLinks: 'throw', - // 2026-02-11 Wednesday 10:26:31. The following is deprecated, to be removed in v4, replaced with similar structure above under 'markdown:'. + // The following is deprecated, to be removed in v4, replaced with similar structure above under 'markdown:'. // (New config was introduced in 3.9 -- https://docusaurus.io/blog/releases/3.9#:~:text=In%20%2311283%2C%20we%20added%20siteConfig,to%20make%20Docusaurus%20build%20faster.) // onBrokenMarkdownLinks: 'warn', @@ -99,8 +82,6 @@ const config = { // TODO We can include a map here as in packageurl.org. // Otherwise, provide a default (so “Edit this page” still works) return `https://github.com/aboutcode-org/www.aboutcode.org/blob/main/website/docs/${docPath}`; - // fork: - // return `https://github.com/johnmhoran/www.aboutcode.org/blob/main/website/docs/${docPath}`; }, }, blog: { diff --git a/website/src/components/ReleasesTable/index.js b/website/src/components/ReleasesTable/index.js index dfbfd8b..70cdae2 100644 --- a/website/src/components/ReleasesTable/index.js +++ b/website/src/components/ReleasesTable/index.js @@ -21,13 +21,13 @@ export default function ReleasesTable() { return (
+
- @@ -35,22 +35,20 @@ export default function ReleasesTable() { - - {/* */} - {/* */} - + ))}
Repo Tag PublishedReleases Page
- {info.repo_url.replace("https://github.com/", "")} + {info.repo_url.replace("https://github.com/", "").split("/").pop()} {info.tag}{new Date(info.published_at).toLocaleDateString()}{new Date(info.published_at).toISOString().replace('T', ' ').replace('.000Z', ' UTC')}{info.published_at ? new Date(info.published_at).toISOString().replace('T', ' ').replace('.000Z', ' UTC') : 'N/A'} - - Releases + + {info.tag} {info.published_at ? new Date(info.published_at).toISOString().replace('T', ' ').replace('.000Z', ' UTC') : 'N/A'}
+
); } diff --git a/website/src/components/ReleasesTable/styles.module.css b/website/src/components/ReleasesTable/styles.module.css index 1e93b27..ce3f93c 100644 --- a/website/src/components/ReleasesTable/styles.module.css +++ b/website/src/components/ReleasesTable/styles.module.css @@ -1,7 +1,6 @@ .container { max-width: 900px; margin: 0 auto; - padding: 2rem; } .card { @@ -39,11 +38,6 @@ font-size: 0.75rem; } -/* 2026-02-16 Monday 18:58:36. For the updated .json. */ -.container { - margin-top: 2rem; -} - .generated { font-size: 0.9rem; color: var(--ifm-color-emphasis-700); @@ -51,74 +45,10 @@ margin-bottom: 1rem; } -/* .table { - width: 100%; - border-collapse: collapse; -} */ - -.table { - width: 100%; - border-collapse: collapse; - table-layout: fixed; -} - -/* .th { - text-align: left; - padding: 8px; - border-bottom: 2px solid var(--ifm-color-emphasis-300); - font-weight: 600; -} - -.td { - padding: 8px; - border-bottom: 1px solid var(--ifm-color-emphasis-200); - vertical-align: top; -} */ - -.th { - text-align: left; - padding: 6px 8px; - border-bottom: 2px solid var(--ifm-color-emphasis-300); - font-weight: 600; - font-size: 0.9rem; -} - -.td { - padding: 6px 8px; - border-bottom: 1px solid var(--ifm-color-emphasis-200); - vertical-align: top; - font-size: 0.88rem; - line-height: 1.2; -} - -/* .repo { - font-weight: 500; -} */ - .tag { font-family: var(--ifm-font-family-monospace); } -/* .body { - max-width: 420px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - color: var(--ifm-color-emphasis-700); -} */ - -/* .body { - max-width: 480px; - white-space: normal; - overflow-wrap: anywhere; - word-break: break-word; - line-height: 1.4; - color: var(--ifm-color-emphasis-700); - - max-height: 4.2em; - overflow: hidden; -} */ - .body { display: -webkit-box; -webkit-line-clamp: 3; /* number of lines */ @@ -140,25 +70,6 @@ width: 40%; } -/* 2026-02-16 Monday 19:14:52.Zebra striping? */ -/* tbody tr:nth-child(even) { - background-color: var(--ifm-color-emphasis-100); -} */ - -/* 2026-02-17 Tuesday 09:21:06. */ -table td { - color: var(--ifm-table-cell-color); - color: #000000; -} - -/* ========================================== */ -/* 2026-02-19 Thursday 08:42:41. cl */ -.container { - max-width: 900px; - margin: 2rem auto; - padding: 0 1rem; -} - .table { width: 100%; border-collapse: collapse; @@ -167,7 +78,8 @@ table td { .table th, .table td { - padding: 0.75rem 1rem; + padding: 0.25rem 1rem; + text-align: left; border-bottom: 1px solid var(--ifm-color-emphasis-300); white-space: nowrap; @@ -178,11 +90,11 @@ table td { background-color: var(--ifm-color-emphasis-100); } -.table tr:hover { - background-color: var(--ifm-color-emphasis-50); +table td { + color: var(--ifm-table-cell-color); + color: #000000; } -.table td:first-child { - font-family: monospace; - font-size: 0.9rem; +.table tr:hover { + background-color: var(--ifm-color-emphasis-50); }