From 734647090cb6f8882756b7cb830f7e7a0d5864c5 Mon Sep 17 00:00:00 2001 From: Kamil Kisiela Date: Thu, 24 Aug 2023 11:07:33 +0200 Subject: [PATCH] Landing page improvements --- packages/web/docs/src/components/hero.tsx | 10 +- .../web/docs/src/components/highlights.tsx | 20 +- .../web/docs/src/components/landing-page.tsx | 496 ++++++++++-------- packages/web/docs/src/components/stats.tsx | 6 +- 4 files changed, 299 insertions(+), 233 deletions(-) diff --git a/packages/web/docs/src/components/hero.tsx b/packages/web/docs/src/components/hero.tsx index 47cbb8e73..0092d5178 100644 --- a/packages/web/docs/src/components/hero.tsx +++ b/packages/web/docs/src/components/hero.tsx @@ -2,7 +2,7 @@ import { ReactNode } from 'react'; export function HeroTitle(props: { children: ReactNode }) { return ( -

+

{props.children}

); @@ -10,7 +10,7 @@ export function HeroTitle(props: { children: ReactNode }) { export function HeroSubtitle(props: { children: ReactNode }) { return ( -

+

{props.children}

); @@ -26,8 +26,10 @@ export function HeroLinks(props: { children: ReactNode }) { export function Hero(props: { children: ReactNode }) { return ( -
-
{props.children}
+
+
+
{props.children}
+
); } diff --git a/packages/web/docs/src/components/highlights.tsx b/packages/web/docs/src/components/highlights.tsx index 551ea647c..321d7b533 100644 --- a/packages/web/docs/src/components/highlights.tsx +++ b/packages/web/docs/src/components/highlights.tsx @@ -1,20 +1,12 @@ import { ReactNode } from 'react'; import Link from 'next/link'; -import clsx from 'clsx'; import { BookIcon } from './book-icon'; -const classes = { - root: clsx('flex flex-1 flex-row gap-6 md:flex-col lg:flex-row'), - content: clsx('flex flex-col text-black dark:text-white'), - title: clsx('text-xl font-semibold'), - description: clsx('text-gray-600 dark:text-gray-400'), -}; - export function HighlightTextLink(props: { href: string; children: ReactNode }) { return ( {props.children} @@ -32,11 +24,11 @@ export function Highlights(props: { return (
{props.items.map(({ title, description, icon, documentationLink }, i) => ( -
-
{icon}
-
-

{title}

-

{description}

+
+
{icon}
+
+

{title}

+

{description}

)} -
-

{props.title}

+
+

+ {props.title} +

-

-
-
-

- {title} -

-
- {description} +
+
+
+
+
+
+
+
+
+

+ {title} +

+
{description}
+ {documentationLink ? ( +
+ +
+ +
+
Learn more
+ +
+ ) : null}
- {documentationLink ? ( -
- -
- -
-
Learn more
- + {imagelessHighlights ? ( +
+ {imagelessHighlights.map((highlight, i) => ( + + ))}
) : null} -
- {imagelessHighlights ? ( -
- {imagelessHighlights.map((highlight, i) => ( - - ))} -
- ) : null} - {highlights ? ( -
-
-
- {highlights ? ( -
- {highlights.map((highlight, i) => ( - - ))} -
- ) : null} -
-
-
-
- {highlights.map((highlight, i) => ( -
-
-

- {highlight.description} -

-
-
-
-
- {title} +
+
+ {highlights ? ( +
+ {highlights.map((highlight, i) => ( + + ))} +
+ ) : null} +
+
+
+
+ {highlights.map((highlight, i) => ( +
+
+

+ {highlight.description} +

+
+
+
+
+ {title} +
-
- ))} + ))} +
-
- ) : null} + ) : null} +
@@ -270,7 +303,6 @@ export function IndexPage(): ReactElement { className={cn( 'inline-block rounded-lg px-6 py-3 font-medium text-white shadow-sm', 'bg-yellow-500 hover:bg-yellow-500/75', - 'dark:bg-yellow-600 dark:hover:bg-yellow-500/100', )} > Start for free @@ -287,7 +319,10 @@ export function IndexPage(): ReactElement { -
+
+
+
+
@@ -327,48 +362,55 @@ export function IndexPage(): ReactElement { ]} gradient={0} /> -
-

- Perfect fit for your GraphQL Gateway -

- - Connect to{' '} - - Apollo Federation - - ,{' '} - - GraphQL Mesh - - ,{' '} - - Stitching - {' '} - and more. - - ), - icon: , - documentationLink: '/docs/get-started/apollo-federation', - }, - { - title: 'Global Edge Network', - description: 'Access the registry from any place on earth within milliseconds.', - icon: , - documentationLink: '/docs/features/high-availability-cdn', - }, - { - title: 'Apollo GraphOS alternative', - description: 'GraphQL Hive is a drop-in replacement for Apollo GraphOS Studio.', - icon: , - documentationLink: '/docs/get-started/apollo-federation', - }, - ]} - /> +
+
+
+
+
+
+
+

+ Perfect fit for your GraphQL Gateway +

+ + Connect to{' '} + + Apollo Federation + + ,{' '} + + GraphQL Mesh + + ,{' '} + + Stitching + {' '} + and more. + + ), + icon: , + documentationLink: '/docs/get-started/apollo-federation', + }, + { + title: 'Global Edge Network', + description: 'Access the registry from any place on earth within milliseconds.', + icon: , + documentationLink: '/docs/features/high-availability-cdn', + }, + { + title: 'Apollo GraphOS alternative', + description: 'GraphQL Hive is a drop-in replacement for Apollo GraphOS Studio.', + icon: , + documentationLink: '/docs/get-started/apollo-federation', + }, + ]} + /> +
-
-

- Get started today -

-

- Start with a free Hobby plan that fits perfectly most side projects or try our Pro - plan with 30 days trial period. -

- - Enter Hive - +
+
+
+
+
+

+ Get started today +

+

+ Start with a free Hobby plan that fits perfectly most side projects or try our Pro + plan with 30 days trial period. +

+ + Enter Hive + +
-
-

- Fits your infrastructure -

- , - documentationLink: '/docs/integrations/ci-cd#github-check-suites', - }, - { - title: 'Works with every CI/CD', - description: 'Connect GraphQL Hive CLI to CI/CD of your choice.', - icon: , - documentationLink: '/docs/integrations/ci-cd', - }, - { - title: 'On-premise or Cloud', - description: - 'GraphQL Hive is MIT licensed, you can host it on your own infrastructure.', - icon: , - documentationLink: '/docs/self-hosting/get-started', - }, - ]} - /> +
+
+
+
+
+
+
+

+ Fits your infrastructure +

+ , + documentationLink: '/docs/integrations/ci-cd#github-check-suites', + }, + { + title: 'Works with every CI/CD', + description: 'Connect GraphQL Hive CLI to CI/CD of your choice.', + icon: , + documentationLink: '/docs/integrations/ci-cd', + }, + { + title: 'On-premise or Cloud', + description: + 'GraphQL Hive is MIT licensed, you can host it on your own infrastructure.', + icon: , + documentationLink: '/docs/self-hosting/get-started', + }, + ]} + /> +
-
-
-
-

- Open-Source -

-

- Built entirely in public. -

-
-
- {[ - { - title: 'Public roadmap', - description: 'Influence the future of GraphQL Hive.', - }, - { - title: 'Cloud and Self-Hosted', - description: 'MIT licensed, host it on your own infrastructure.', - }, - { - title: 'Available for free', - description: 'Free Hobby plan that fits perfectly for most side projects.', - }, - { - title: 'Community', - description: 'Implement your own features with our help.', - }, - ].map(renderFeatures)} +
+
+
+
+
+
+
+
+
+

+ Open-Source +

+

Built entirely in public.

+
+
+ {[ + { + title: 'Public roadmap', + description: 'Influence the future of GraphQL Hive.', + }, + { + title: 'Cloud and Self-Hosted', + description: 'MIT licensed, host it on your own infrastructure.', + }, + { + title: 'Available for free', + description: 'Free Hobby plan that fits perfectly for most side projects.', + }, + { + title: 'Community', + description: 'Implement your own features with our help.', + }, + ].map(renderFeatures)} +
diff --git a/packages/web/docs/src/components/stats.tsx b/packages/web/docs/src/components/stats.tsx index a2cded36b..78066b437 100644 --- a/packages/web/docs/src/components/stats.tsx +++ b/packages/web/docs/src/components/stats.tsx @@ -9,7 +9,7 @@ export function StatsItem(props: { }) { return (
-
+
{props.suffix}+
-
- {props.label} -
+
{props.label}
); }