From 7972e2c2df3af8dae9cc4f1a62ccd56026a3995a Mon Sep 17 00:00:00 2001 From: Samuel Alev Date: Thu, 8 Feb 2024 14:27:27 +0100 Subject: [PATCH] feat: add fondue logo to docs --- docs/index.html | 6 --- docs/src/assets/images/fondue_logo.png | Bin 0 -> 2309 bytes docs/{public => src/assets/images}/nook.svg | 0 docs/src/pages/+Head.tsx | 12 +++++ docs/src/pages/+Layout.tsx | 42 ++++++++++-------- docs/src/pages/+config.h.ts | 1 - docs/src/pages/components/+Layout.tsx | 34 ++++++++++++++ .../pages/{component => components}/+Page.tsx | 2 +- .../pages/{component => components}/+data.ts | 3 +- .../+onBeforePrerenderStart.ts | 2 +- .../pages/{component => components}/+route.ts | 0 docs/src/pages/getting-started/+Page.tsx | 9 ++++ docs/src/pages/icons/+Page.tsx | 9 ++++ docs/src/pages/index/+Page.tsx | 6 ++- docs/src/pages/tokens/+Page.tsx | 9 ++++ 15 files changed, 104 insertions(+), 31 deletions(-) create mode 100644 docs/src/assets/images/fondue_logo.png rename docs/{public => src/assets/images}/nook.svg (100%) create mode 100644 docs/src/pages/+Head.tsx create mode 100644 docs/src/pages/components/+Layout.tsx rename docs/src/pages/{component => components}/+Page.tsx (85%) rename docs/src/pages/{component => components}/+data.ts (84%) rename docs/src/pages/{component => components}/+onBeforePrerenderStart.ts (62%) rename docs/src/pages/{component => components}/+route.ts (100%) create mode 100644 docs/src/pages/getting-started/+Page.tsx create mode 100644 docs/src/pages/icons/+Page.tsx create mode 100644 docs/src/pages/tokens/+Page.tsx diff --git a/docs/index.html b/docs/index.html index 6ebf24c4be..b3da60e4cf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,11 +1,5 @@ - - - - - Documentation — Fondue -
diff --git a/docs/src/assets/images/fondue_logo.png b/docs/src/assets/images/fondue_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2dc4f8905302f093a9c695843d67b9694b9f374e GIT binary patch literal 2309 zcmV+g3HtVlP)X5`UJoeXfzLxkMG~V|G4z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bMyjAlg%6V{` zs6|XQ-B^WGm@ZKshr-52tap`5CE<7e9bL|dLge+Klp-5b>``e1aaob{M^j2;O)yb= z2OBDk#-#%9C}omFoSM>Ht5#!Au4#*y%;f&LULU!O3zmg<-7dBojaY(DjnF%eBlMe7 zN=LK#_O=;ZL3`V73w`G*QO9`_HR%eLg@3o(C|K6SS%WSwqgJgBC%$5w;4mV!^`&i3 z^f4g>S<}RuR!cckby~Xe+oPjUvn?n$Yyy^xMU*!;rR$K2!zeJE`M=n9WVCErdaH=v zXAps#B^}3!Of3$s*X`i{L9yVli z9T;}VEF!Jr$YjXf2ivwSTQF0XcXrJj>*?~nC*EN@(@gbpCl z1=xvqO-Zx8PZ(o~1n2oazA;TD(Wx#dmz?AKViBEgH}F>9=h;l`9_wV+`MwO3FKI zFs>@kOWEjLal1-F=jQ)Q3YLYJL?7CPN7YLyDU&F4eCJ(oAPeO|qOJrcR7y)u2yIUn6B zl06Ru?T$09w^{mnb@f{5$vY+pRIC`rCvGJ+7z|x@{r-daC#$S!BA3lhwDH{Y(0ARr z=8gnW<*z6m+2U+4m}{AVS10(VuJM0CV~ma3os`c;=o(EDQfZ@WG_ytvU9%8qp=%Zb zEp*L7poOkk2(-{O3xO88W+8aA1bn#fN@z6mWC{52_`iSt`PauwOaB7!!1DyxyTY>E<@KB00000NkvXXu0mjf1NCF* literal 0 HcmV?d00001 diff --git a/docs/public/nook.svg b/docs/src/assets/images/nook.svg similarity index 100% rename from docs/public/nook.svg rename to docs/src/assets/images/nook.svg diff --git a/docs/src/pages/+Head.tsx b/docs/src/pages/+Head.tsx new file mode 100644 index 0000000000..721241cb72 --- /dev/null +++ b/docs/src/pages/+Head.tsx @@ -0,0 +1,12 @@ +import nookFaviconUrl from '../assets/images/nook.svg'; + +export const Head = () => { + return ( + <> + + + + Documentation — Fondue + + ); +}; diff --git a/docs/src/pages/+Layout.tsx b/docs/src/pages/+Layout.tsx index 4b223edfe2..3938ef1259 100644 --- a/docs/src/pages/+Layout.tsx +++ b/docs/src/pages/+Layout.tsx @@ -3,31 +3,35 @@ import '../renderer/index.css'; import { type ReactNode } from 'react'; -import { allComponents } from '#contentlayer/generated'; +import fondueLogo from '../assets/images/fondue_logo.png'; export const Layout = ({ children }: { children: ReactNode }) => { return ( -
-
- - Fondue +
+
+ + Fondue Logo -
- + +
-
{children}
+
{children}
); }; diff --git a/docs/src/pages/+config.h.ts b/docs/src/pages/+config.h.ts index 40007f0f51..381cadffee 100644 --- a/docs/src/pages/+config.h.ts +++ b/docs/src/pages/+config.h.ts @@ -3,6 +3,5 @@ import vikeReact from 'vike-react/config'; export default { - title: 'Documentation — Fondue', extends: vikeReact, }; diff --git a/docs/src/pages/components/+Layout.tsx b/docs/src/pages/components/+Layout.tsx new file mode 100644 index 0000000000..5451226ccb --- /dev/null +++ b/docs/src/pages/components/+Layout.tsx @@ -0,0 +1,34 @@ +/* (c) Copyright Frontify Ltd., all rights reserved. */ + +import { type ReactNode } from 'react'; + +import { allComponents } from '#contentlayer/generated'; + +import { Layout as RootLayout } from '../+Layout'; + +export const Layout = ({ children }: { children: ReactNode }) => { + return ( + +
+ + +
+
{children}
+
+ + +
+
+ ); +}; diff --git a/docs/src/pages/component/+Page.tsx b/docs/src/pages/components/+Page.tsx similarity index 85% rename from docs/src/pages/component/+Page.tsx rename to docs/src/pages/components/+Page.tsx index 011b2d45b0..65ef3da061 100644 --- a/docs/src/pages/component/+Page.tsx +++ b/docs/src/pages/components/+Page.tsx @@ -8,7 +8,7 @@ export const Page = () => { const { data } = usePageContext(); if (!data) { - return null; + return

Components

; } return ( diff --git a/docs/src/pages/component/+data.ts b/docs/src/pages/components/+data.ts similarity index 84% rename from docs/src/pages/component/+data.ts rename to docs/src/pages/components/+data.ts index 335a4bf5a2..21fd9994ea 100644 --- a/docs/src/pages/component/+data.ts +++ b/docs/src/pages/components/+data.ts @@ -1,6 +1,5 @@ /* (c) Copyright Frontify Ltd., all rights reserved. */ -import { render } from 'vike/abort'; import { type PageContextServer } from 'vike/types'; import { allComponents } from '#contentlayer/generated'; @@ -15,7 +14,7 @@ export const data = (pageContext: PageContextServer) => { }); if (!component) { - throw render(404, "This component doesn't exist"); + return null; } return { component }; diff --git a/docs/src/pages/component/+onBeforePrerenderStart.ts b/docs/src/pages/components/+onBeforePrerenderStart.ts similarity index 62% rename from docs/src/pages/component/+onBeforePrerenderStart.ts rename to docs/src/pages/components/+onBeforePrerenderStart.ts index dc4b4ec892..c39469a27f 100644 --- a/docs/src/pages/component/+onBeforePrerenderStart.ts +++ b/docs/src/pages/components/+onBeforePrerenderStart.ts @@ -3,5 +3,5 @@ import { allComponents } from '#contentlayer/generated'; export const onBeforePrerenderStart = () => { - return allComponents.map((component) => `/component/${component.route}`); + return ['/components', ...allComponents.map((component) => `/components/${component.route}`)]; }; diff --git a/docs/src/pages/component/+route.ts b/docs/src/pages/components/+route.ts similarity index 100% rename from docs/src/pages/component/+route.ts rename to docs/src/pages/components/+route.ts diff --git a/docs/src/pages/getting-started/+Page.tsx b/docs/src/pages/getting-started/+Page.tsx new file mode 100644 index 0000000000..0721839deb --- /dev/null +++ b/docs/src/pages/getting-started/+Page.tsx @@ -0,0 +1,9 @@ +/* (c) Copyright Frontify Ltd., all rights reserved. */ + +export const Page = () => { + return ( +
+

Getting Started

+
+ ); +}; diff --git a/docs/src/pages/icons/+Page.tsx b/docs/src/pages/icons/+Page.tsx new file mode 100644 index 0000000000..6dded783ba --- /dev/null +++ b/docs/src/pages/icons/+Page.tsx @@ -0,0 +1,9 @@ +/* (c) Copyright Frontify Ltd., all rights reserved. */ + +export const Page = () => { + return ( +
+

Icons

+
+ ); +}; diff --git a/docs/src/pages/index/+Page.tsx b/docs/src/pages/index/+Page.tsx index ce5af74210..5439ee7ee0 100644 --- a/docs/src/pages/index/+Page.tsx +++ b/docs/src/pages/index/+Page.tsx @@ -1,5 +1,9 @@ /* (c) Copyright Frontify Ltd., all rights reserved. */ export const Page = () => { - return

Welcome to Fondue

; + return ( +
+

Welcome to Fondue

+
+ ); }; diff --git a/docs/src/pages/tokens/+Page.tsx b/docs/src/pages/tokens/+Page.tsx new file mode 100644 index 0000000000..d55481657e --- /dev/null +++ b/docs/src/pages/tokens/+Page.tsx @@ -0,0 +1,9 @@ +/* (c) Copyright Frontify Ltd., all rights reserved. */ + +export const Page = () => { + return ( +
+

Tokens

+
+ ); +};