From 52f8e0670c039dfe1d1a395701f7bcc6d3c9dc62 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Fri, 24 Mar 2023 06:02:00 +0100 Subject: [PATCH] feat(website): color scheme / dark and light mode improvements --- apps/guide/src/components/Navbar.tsx | 2 +- .../[package]/[version]/[item]/page.tsx | 4 +- .../packages/[package]/[version]/layout.tsx | 71 +----------------- .../src/app/docs/packages/[package]/page.tsx | 2 +- apps/website/src/app/docs/packages/page.tsx | 2 +- apps/website/src/app/global-error.tsx | 2 +- apps/website/src/app/layout.tsx | 2 +- apps/website/src/app/page.tsx | 4 +- apps/website/src/components/Footer.tsx | 74 +++++++++++++++++++ apps/website/src/components/Header.tsx | 2 +- apps/website/src/components/Nav.tsx | 6 +- .../src/components/OverloadSwitcher.tsx | 4 +- apps/website/src/components/PackageSelect.tsx | 4 +- apps/website/src/components/Sidebar.tsx | 3 +- apps/website/src/components/VersionSelect.tsx | 4 +- .../components/model/function/Function.tsx | 4 +- .../src/components/model/method/Method.tsx | 4 +- packages/ui/src/lib/components/Section.tsx | 2 +- 18 files changed, 104 insertions(+), 92 deletions(-) create mode 100644 apps/website/src/components/Footer.tsx diff --git a/apps/guide/src/components/Navbar.tsx b/apps/guide/src/components/Navbar.tsx index 76f16c043..7b1c9804b 100644 --- a/apps/guide/src/components/Navbar.tsx +++ b/apps/guide/src/components/Navbar.tsx @@ -18,7 +18,7 @@ export function Navbar({ pages }: { pages?: MDXPage[] | undefined }) { return ( <> -
+
); diff --git a/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx b/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx index 9857d2a66..aa7feeab8 100644 --- a/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx +++ b/apps/website/src/app/docs/packages/[package]/[version]/layout.tsx @@ -2,12 +2,10 @@ import { addPackageToModel } from '@discordjs/scripts'; import type { ApiFunction, ApiItem } from '@microsoft/api-extractor-model'; import { ApiModel } from '@microsoft/api-extractor-model'; import dynamic from 'next/dynamic'; -import Image from 'next/image'; import { notFound } from 'next/navigation'; import type { PropsWithChildren } from 'react'; import { Providers } from './providers'; import { fetchModelJSON, fetchVersions } from '~/app/docAPI'; -import vercelLogo from '~/assets/powered-by-vercel.svg'; import { CmdKDialog } from '~/components/CmdK'; import { Nav } from '~/components/Nav'; import type { SidebarSectionItemData } from '~/components/Sidebar'; @@ -15,6 +13,7 @@ import { resolveItemURI } from '~/components/documentation/util'; import { N_RECENT_VERSIONS, PACKAGES } from '~/util/constants'; const Header = dynamic(async () => import('~/components/Header')); +const Footer = dynamic(async () => import('~/components/Footer')); export interface VersionRouteParams { package: string; @@ -76,74 +75,8 @@ export default async function PackageLayout({ children, params }: PropsWithChild +