From 6030350ffab4354544eece61a59472cd31844c6d Mon Sep 17 00:00:00 2001 From: "yongen.loong" Date: Fri, 30 Aug 2024 16:13:35 +0800 Subject: [PATCH] feat: build time export of images --- app/layout.tsx | 16 +- components/Header/index.tsx | 35 +- components/blocks/image.tsx | 11 +- components/customImage.tsx | 12 +- components/{footer.tsx => footer/index.tsx} | 25 +- components/logo/index.tsx | 36 ++ components/logo/ssr-logo.tsx | 17 + components/logo/theme.tsx | 19 + export-images.config.cjs | 24 + lib/getConfig.ts | 4 +- next.config.mjs | 17 +- package-lock.json | 654 +++++++++++++++++++- package.json | 3 +- services/get-link.ts | 10 + services/larkServices.ts | 2 +- 15 files changed, 797 insertions(+), 88 deletions(-) rename components/{footer.tsx => footer/index.tsx} (80%) create mode 100644 components/logo/index.tsx create mode 100644 components/logo/ssr-logo.tsx create mode 100644 components/logo/theme.tsx create mode 100644 export-images.config.cjs create mode 100644 services/get-link.ts diff --git a/app/layout.tsx b/app/layout.tsx index 63ab6d7..da94379 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -4,6 +4,7 @@ import { cn, getConfigContent, getMenu } from "@/lib/utils"; import { Poppins as FontSans } from "next/font/google"; import { Footer } from "@/components/footer"; import Header from "@/components/Header"; +import { Logo } from "@/components/logo"; import { Suspense } from "react"; import Loading from "./loading"; import { getNodeToken, NodesItem } from "../services/larkServices"; @@ -44,9 +45,20 @@ export default async function RootLayout({ disableTransitionOnChange > -
+
} + drawerLogo={ + + } + /> }>{children} -