1
1
import { Anchor } from '@theguild/components' ;
2
2
import Image , { StaticImageData } from 'next/image' ;
3
3
import { PropsWithChildren , ReactElement } from 'react' ;
4
- import { FiGithub } from 'react-icons/fi' ;
4
+ import { FiCheckCircle , FiFastForward , FiGithub } from 'react-icons/fi' ;
5
5
6
6
import GraphQLLogo from '../../public/assets/GraphQL_Logo.svg' ;
7
7
import MeshExampleLogo from '../../public/assets/mesh-example.png' ;
@@ -143,21 +143,24 @@ function Feature(
143
143
}
144
144
145
145
function FeatureHighlights ( props : {
146
+ textColor ?: string ;
146
147
highlights ?: Array < {
147
148
title : string ;
148
149
description : React . ReactNode ;
149
150
icon ?: React . ReactNode ;
150
151
} > ;
151
152
} ) {
152
- const { highlights } = props ;
153
+ const { highlights, textColor } = props ;
153
154
154
155
return Array . isArray ( highlights ) && highlights . length > 0 ? (
155
156
< >
156
157
{ highlights . map ( ( { title, description, icon } , i ) => (
157
158
< div className = { Highlight . Root } key = { i } >
158
159
{ icon && < div className = { Highlight . Icon } > { icon } </ div > }
159
160
< 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 >
161
164
< p className = { Highlight . Description + ( icon ? '' : ' text-sm' ) } > { description } </ p >
162
165
</ div >
163
166
</ div >
@@ -181,6 +184,21 @@ const datasources: Array<string> = [
181
184
'& More...' ,
182
185
] ;
183
186
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
+
184
202
export function IndexPage ( ) : ReactElement {
185
203
return (
186
204
< div className = "flex flex-col" >
@@ -259,26 +277,15 @@ export function IndexPage(): ReactElement {
259
277
{ datasources . map ( ( datasource , i ) => (
260
278
< div className = "p-2 sm:w-1/2 md:w-1/3 w-full" key = { i } >
261
279
< 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" />
274
281
< span className = "title-font font-medium text-black dark:text-white" > { datasource } </ span >
275
282
</ div >
276
283
</ div >
277
284
) ) }
278
285
</ div >
279
286
</ Feature >
280
287
< Feature
281
- title = "Connecting datasources"
288
+ title = "Connect datasources"
282
289
description = {
283
290
< div className = "flex flex-col gap-y-12" >
284
291
< div >
@@ -322,6 +329,7 @@ export function IndexPage(): ReactElement {
322
329
</ div >
323
330
< div className = "max-w-screen-lg px-6 box-border mx-auto grid grid-cols-2 gap-12" >
324
331
< FeatureHighlights
332
+ textColor = { gradients [ 3 ] [ 0 ] }
325
333
highlights = { [
326
334
{
327
335
title : 'Naming conventions' ,
@@ -345,7 +353,7 @@ export function IndexPage(): ReactElement {
345
353
</ div >
346
354
</ div >
347
355
< Feature
348
- title = "Plugins "
356
+ title = "Extend with plugins "
349
357
description = {
350
358
< div className = "flex flex-col gap-y-12" >
351
359
< div >
@@ -372,10 +380,29 @@ export function IndexPage(): ReactElement {
372
380
</ div >
373
381
}
374
382
image = { PluginLogo }
375
- gradient = { 3 }
383
+ gradient = { 4 }
376
384
flipped
377
385
/>
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 >
379
406
</ div >
380
407
) ;
381
408
}
0 commit comments