Skip to content

Commit 49a3e42

Browse files
gilgardoshardatan
andauthored
Run mesh everywhere on landing page (#4639)
* Run mesh everywhere on landing page * Update website/src/components/index-page.tsx Co-authored-by: Arda TANRIKULU <[email protected]> * Update website/src/components/index-page.tsx Co-authored-by: Arda TANRIKULU <[email protected]> * Update website/src/components/index-page.tsx Co-authored-by: Arda TANRIKULU <[email protected]> * Update website/src/components/index-page.tsx Co-authored-by: Arda TANRIKULU <[email protected]> * color variant enhancement Co-authored-by: Arda TANRIKULU <[email protected]>
1 parent cb3deb0 commit 49a3e42

File tree

1 file changed

+46
-19
lines changed

1 file changed

+46
-19
lines changed

website/src/components/index-page.tsx

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Anchor } from '@theguild/components';
22
import Image, { StaticImageData } from 'next/image';
33
import { PropsWithChildren, ReactElement } from 'react';
4-
import { FiGithub } from 'react-icons/fi';
4+
import { FiCheckCircle, FiFastForward, FiGithub } from 'react-icons/fi';
55

66
import GraphQLLogo from '../../public/assets/GraphQL_Logo.svg';
77
import MeshExampleLogo from '../../public/assets/mesh-example.png';
@@ -143,21 +143,24 @@ function Feature(
143143
}
144144

145145
function FeatureHighlights(props: {
146+
textColor?: string;
146147
highlights?: Array<{
147148
title: string;
148149
description: React.ReactNode;
149150
icon?: React.ReactNode;
150151
}>;
151152
}) {
152-
const { highlights } = props;
153+
const { highlights, textColor } = props;
153154

154155
return Array.isArray(highlights) && highlights.length > 0 ? (
155156
<>
156157
{highlights.map(({ title, description, icon }, i) => (
157158
<div className={Highlight.Root} key={i}>
158159
{icon && <div className={Highlight.Icon}>{icon}</div>}
159160
<div className={Highlight.Content}>
160-
<h3 className={Highlight.Title + (icon ? '' : ' text-lg')}>{title}</h3>
161+
<h3 className={Highlight.Title + (icon ? '' : ' text-lg')} style={textColor ? { color: textColor } : {}}>
162+
{title}
163+
</h3>
161164
<p className={Highlight.Description + (icon ? '' : ' text-sm')}>{description}</p>
162165
</div>
163166
</div>
@@ -181,6 +184,21 @@ const datasources: Array<string> = [
181184
'& More...',
182185
];
183186

187+
const deployableEnvs: Array<string> = [
188+
'Node.js',
189+
'Vercel',
190+
'AWS Lambda',
191+
'Cloudflare Workers',
192+
'Apache OpenWhisk',
193+
'Express',
194+
'Fastify',
195+
'Koa',
196+
'Sveltekit',
197+
'Docker',
198+
'Even as a frontend app',
199+
'& More...',
200+
];
201+
184202
export function IndexPage(): ReactElement {
185203
return (
186204
<div className="flex flex-col">
@@ -259,26 +277,15 @@ export function IndexPage(): ReactElement {
259277
{datasources.map((datasource, i) => (
260278
<div className="p-2 sm:w-1/2 md:w-1/3 w-full" key={i}>
261279
<div className="bg-gray-100 dark:bg-gray-800 rounded flex p-4 h-full items-center">
262-
<svg
263-
fill="none"
264-
stroke="currentColor"
265-
strokeLinecap="round"
266-
strokeLinejoin="round"
267-
strokeWidth="3"
268-
className="text-indigo-500 w-6 h-6 flex-shrink-0 mr-4"
269-
viewBox="0 0 24 24"
270-
>
271-
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"></path>
272-
<path d="M22 4L12 14.01l-3-3"></path>
273-
</svg>
280+
<FiCheckCircle className="text-indigo-500 w-6 h-6 flex-shrink-0 mr-4" />
274281
<span className="title-font font-medium text-black dark:text-white">{datasource}</span>
275282
</div>
276283
</div>
277284
))}
278285
</div>
279286
</Feature>
280287
<Feature
281-
title="Connecting datasources"
288+
title="Connect datasources"
282289
description={
283290
<div className="flex flex-col gap-y-12">
284291
<div>
@@ -322,6 +329,7 @@ export function IndexPage(): ReactElement {
322329
</div>
323330
<div className="max-w-screen-lg px-6 box-border mx-auto grid grid-cols-2 gap-12">
324331
<FeatureHighlights
332+
textColor={gradients[3][0]}
325333
highlights={[
326334
{
327335
title: 'Naming conventions',
@@ -345,7 +353,7 @@ export function IndexPage(): ReactElement {
345353
</div>
346354
</div>
347355
<Feature
348-
title="Plugins"
356+
title="Extend with plugins"
349357
description={
350358
<div className="flex flex-col gap-y-12">
351359
<div>
@@ -372,10 +380,29 @@ export function IndexPage(): ReactElement {
372380
</div>
373381
}
374382
image={PluginLogo}
375-
gradient={3}
383+
gradient={4}
376384
flipped
377385
/>
378-
{/* FEATURE: run everywhere */}
386+
<Feature
387+
title="Run everywhere"
388+
description={
389+
<div className="space-y-2">
390+
<p>Supported environments</p>
391+
</div>
392+
}
393+
gradient={0}
394+
>
395+
<div className="flex flex-wrap lg:w-4/5 sm:mx-auto sm:mb-2 -mx-2">
396+
{deployableEnvs.map((env, i) => (
397+
<div className="p-2 sm:w-1/2 md:w-1/3 w-full" key={i}>
398+
<div className="bg-gray-100 dark:bg-gray-800 rounded flex p-4 h-full items-center gap-2">
399+
<FiFastForward className="w-6 h-6 flex-shrink-0 mr-4" style={{ stroke: pickGradient(0)[0] }} />
400+
<span className="title-font font-medium text-black dark:text-white">{env}</span>
401+
</div>
402+
</div>
403+
))}
404+
</div>
405+
</Feature>
379406
</div>
380407
);
381408
}

0 commit comments

Comments
 (0)