From f447b2f4e78e8d9f57efa27948fa297fd5337b3d Mon Sep 17 00:00:00 2001 From: WhiteMind Date: Thu, 17 Aug 2023 16:45:52 +0800 Subject: [PATCH] feat: implement home page --- packages/app/src/components/Header/index.tsx | 4 +- packages/app/src/components/Page/index.tsx | 11 +- packages/app/src/pages/home/bottom-shadow.svg | 22 +++ packages/app/src/pages/home/easy.png | Bin 0 -> 707285 bytes packages/app/src/pages/home/github.svg | 3 + packages/app/src/pages/home/index.module.scss | 169 ++++++++++++++++++ packages/app/src/pages/home/index.page.tsx | 136 ++++++++++++++ packages/app/src/pages/home/neuron-logo.png | Bin 0 -> 44122 bytes .../app/src/pages/home/neuron-overview-en.png | Bin 0 -> 357263 bytes .../app/src/pages/home/neuron-overview-zh.png | Bin 0 -> 357263 bytes packages/app/src/pages/home/oval.svg | 3 + packages/app/src/pages/home/private.png | Bin 0 -> 918394 bytes packages/app/src/pages/home/reliable.png | Bin 0 -> 628162 bytes packages/app/src/pages/home/top-shadow.svg | 22 +++ 14 files changed, 367 insertions(+), 3 deletions(-) create mode 100644 packages/app/src/pages/home/bottom-shadow.svg create mode 100644 packages/app/src/pages/home/easy.png create mode 100644 packages/app/src/pages/home/github.svg create mode 100644 packages/app/src/pages/home/index.module.scss create mode 100644 packages/app/src/pages/home/index.page.tsx create mode 100644 packages/app/src/pages/home/neuron-logo.png create mode 100644 packages/app/src/pages/home/neuron-overview-en.png create mode 100644 packages/app/src/pages/home/neuron-overview-zh.png create mode 100644 packages/app/src/pages/home/oval.svg create mode 100644 packages/app/src/pages/home/private.png create mode 100644 packages/app/src/pages/home/reliable.png create mode 100644 packages/app/src/pages/home/top-shadow.svg diff --git a/packages/app/src/components/Header/index.tsx b/packages/app/src/components/Header/index.tsx index 18a836c2..1a82e411 100644 --- a/packages/app/src/components/Header/index.tsx +++ b/packages/app/src/components/Header/index.tsx @@ -23,7 +23,9 @@ export const Header: FC = props => {
- + + +
diff --git a/packages/app/src/components/Page/index.tsx b/packages/app/src/components/Page/index.tsx index 803b86e0..411920dd 100644 --- a/packages/app/src/components/Page/index.tsx +++ b/packages/app/src/components/Page/index.tsx @@ -11,11 +11,12 @@ type PageProps = Omit, 'children'> & { renderHeader: (props?: HeaderProps) => ReactNode renderFooter: (props?: FooterProps) => ReactNode }) => JSX.Element | undefined) - contentWrapper?: boolean + contentWrapper?: boolean | ComponentProps<'div'> } export const Page = forwardRef(function Page(props, ref) { const { children, contentWrapper = true, className, ...divProps } = props + const contentWrapperProps = typeof contentWrapper === 'object' ? contentWrapper : {} const finalChildren = typeof children === 'function' ? ( @@ -26,7 +27,13 @@ export const Page = forwardRef(function Page(props, r ) : ( <>
- {contentWrapper ?
{children}
: children} + {contentWrapper ? ( +
+ {children} +
+ ) : ( + children + )}