From 107c80b8491beb9d33240cd11fa2a358b3e1b2d5 Mon Sep 17 00:00:00 2001 From: LynithDev <61880709+LynithDev@users.noreply.github.com> Date: Mon, 1 Jan 2024 18:49:26 +0100 Subject: Changed mods page a little + fix padding on index --- apps/website/config.ts | 19 ++++++++----------- .../src/components/base/navbar/NavbarElement.astro | 2 +- apps/website/src/pages/index.astro | 16 +++++++--------- apps/website/src/types/Config.d.ts | 5 +++-- 4 files changed, 19 insertions(+), 23 deletions(-) (limited to 'apps') diff --git a/apps/website/config.ts b/apps/website/config.ts index eaffaf3..1d1daef 100644 --- a/apps/website/config.ts +++ b/apps/website/config.ts @@ -28,7 +28,9 @@ export const configConst = { { text: 'Projects', dropdown: getProjects().map((project) => { - (project as any).path = `/projects/${project.name.toLowerCase()}`; + if (project.hasPage) + (project as any).path = `/projects/${project.name.toLowerCase()}`; + return project; }) as unknown as NavbarDropdown[], }, @@ -41,16 +43,10 @@ export const configConst = { footer: [ { header: 'Products', - links: [ - { - text: 'OneConfig', - url: '/projects/oneconfig', - }, - { - text: 'OneLauncher', - url: '/projects/onelauncher', - }, - ], + links: getProjects().filter(project => project.hasPage === true).map(project => ({ + text: project.name, + url: `/projects/${project.name.toLowerCase()}`, + })), }, { header: 'Organization', @@ -100,6 +96,7 @@ function getProjects(): Project[] { description: 'The next-generation config library for Forge and Fabric', logo: 'oneconfig.minimal', tag: 'BETA', + hasPage: true, }, { name: 'OneLauncher', diff --git a/apps/website/src/components/base/navbar/NavbarElement.astro b/apps/website/src/components/base/navbar/NavbarElement.astro index 3033bf1..c2c76b3 100644 --- a/apps/website/src/components/base/navbar/NavbarElement.astro +++ b/apps/website/src/components/base/navbar/NavbarElement.astro @@ -35,7 +35,7 @@ function isCurrentPage(url: string): boolean { : (