-
-
Notifications
You must be signed in to change notification settings - Fork 722
/
index.tsx
482 lines (442 loc) · 12.3 KB
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
import { graphql, useStaticQuery } from "gatsby";
import Img, { FluidObject } from "gatsby-image";
import React, { FunctionComponent } from "react";
import { Carousel } from "react-responsive-carousel";
import styled from "styled-components";
import { GetIndexPageDataQuery } from "../../graphql-types";
import { BananaCakePop } from "../components/images/banana-cake-pop";
import { BlogPostEFMeetsGraphQL } from "../components/images/blog-post-ef-meets-graphql";
import { BlogPostStrawberryShake } from "../components/images/blog-post-strawberry-shake";
import { BlogPostVersion11 } from "../components/images/blog-post-version-11";
import { Link } from "../components/misc/link";
import {
ContentContainer,
EnvelopeIcon,
ImageContainer,
Section,
SectionRow,
SectionTitle,
SlackIcon,
} from "../components/misc/marketing-elements";
import { Hero, Intro } from "../components/misc/page-elements";
import { SEO } from "../components/misc/seo";
import { Layout } from "../components/structure/layout";
import AeiLogoSvg from "../images/companies/aei.svg";
import AtminaLogoSvg from "../images/companies/atmina.svg";
import AutoguruLogoSvg from "../images/companies/autoguru.svg";
import CarmmunityLogoSvg from "../images/companies/carmmunity.svg";
import GiaLogoSvg from "../images/companies/gia.svg";
import MotiviewLogoSvg from "../images/companies/motiview.svg";
import PushpayLogoSvg from "../images/companies/pushpay.svg";
import Seven2OneLogoSvg from "../images/companies/seven-2-one.svg";
import SwissLifeLogoSvg from "../images/companies/swiss-life.svg";
import ContactUsSvg from "../images/contact-us.svg";
import DashboardSvg from "../images/dashboard.svg";
import GetStartedSvg from "../images/get-started.svg";
const IndexPage: FunctionComponent = () => {
const data = useStaticQuery<GetIndexPageDataQuery>(graphql`
query getIndexPageData {
site {
siteMetadata {
tools {
slack
}
}
}
allMarkdownRemark(
limit: 3
filter: { frontmatter: { path: { glob: "/blog/**/*" } } }
sort: { fields: [frontmatter___date], order: DESC }
) {
edges {
node {
id
fields {
readingTime {
text
}
}
frontmatter {
featuredImage {
childImageSharp {
fluid(maxWidth: 800) {
...GatsbyImageSharpFluid
}
}
}
path
title
date(formatString: "MMMM DD, YYYY")
}
}
}
}
}
`);
const {
allMarkdownRemark: { edges },
} = data;
return (
<Layout>
<SEO title="Home" />
<Intro>
<Hero>The Ultimate GraphQL Platform</Hero>
<Slideshow
autoPlay
infiniteLoop
swipeable
interval={15000}
showStatus={false}
showThumbs={false}
>
<Slide>
<Link to="/docs/bananacakepop">
<BananaCakePop />
<SlideContent>
<SlideTitle>Banana Cake Pop</SlideTitle>
<SlideDescription>
Our GraphQL IDE to explore schemas, execute operations and get
deep performance insights.
</SlideDescription>
</SlideContent>
</Link>
</Slide>
<Slide>
<Link to="/blog/2020/03/18/entity-framework">
<BlogPostEFMeetsGraphQL />
<SlideContent>
<SlideTitle>Entity Framework meets GraphQL</SlideTitle>
<SlideDescription>
Get started with Hot Chocolate and Entity Framework
</SlideDescription>
</SlideContent>
</Link>
</Slide>
<Slide>
<Link to="/blog/2020/07/16/version-11">
<BlogPostVersion11 />
</Link>
</Slide>
<Slide>
<Link to="/blog/2019/11/25/strawberry-shake_2">
<BlogPostStrawberryShake />
</Link>
</Slide>
</Slideshow>
</Intro>
<Section>
<SectionRow>
<ImageContainer>
<DashboardSvg />
</ImageContainer>
<ContentContainer>
<SectionTitle>
What is the ChilliCream GraphQL platform?
</SectionTitle>
<p>
It's a new way of defining modern APIs which are strongly typed
from server to client. Fetch once with no more under- or
over-fetching, just the right amount.
</p>
<Link to="/platform">Learn more</Link>
</ContentContainer>
</SectionRow>
</Section>
<Section>
<SectionRow>
<ImageContainer>
<GetStartedSvg />
</ImageContainer>
<ContentContainer>
<SectionTitle>Get Started</SectionTitle>
<p>
Creating a GraphQL API with Hot Chocolate is very easy. Check out
our startup guide and see how simple it is to create your first
API.
</p>
<Link to="/docs/hotchocolate/v10/">Learn more</Link>
</ContentContainer>
</SectionRow>
</Section>
<Section>
<SectionRow>
<ContentContainer noImage>
<SectionTitle centerAlways>From our Blog</SectionTitle>
<Articles>
{edges.map(({ node }) => {
const featuredImage = node?.frontmatter!.featuredImage
?.childImageSharp?.fluid as FluidObject;
return (
<Article key={`article-${node.id}`}>
<Link to={node.frontmatter!.path!}>
{featuredImage && <Img fluid={featuredImage} />}
<ArticleMetadata>
{node.frontmatter!.date!} ・{" "}
{node.fields!.readingTime!.text!}
</ArticleMetadata>
<ArticleTitle>{node.frontmatter!.title}</ArticleTitle>
</Link>
</Article>
);
})}
</Articles>
</ContentContainer>
</SectionRow>
</Section>
<Section>
<SectionRow>
<ContentContainer noImage>
<SectionTitle centerAlways>Companies who trust us</SectionTitle>
<Logos>
<Logo width={160}>
<Link to="https://aeieng.com">
<AeiLogoSvg />
</Link>
</Logo>
<Logo width={100}>
<Link to="https://atmina.de">
<AtminaLogoSvg />
</Link>
</Logo>
<Logo width={180}>
<Link to="https://www.autoguru.com.au">
<AutoguruLogoSvg />
</Link>
</Logo>
<Logo width={180}>
<Link to="https://carmmunity.io">
<CarmmunityLogoSvg />
</Link>
</Logo>
<Logo width={120}>
<Link to="https://gia.ch">
<GiaLogoSvg />
</Link>
</Logo>
<Logo width={160}>
<Link to="https://motitech.co.uk">
<MotiviewLogoSvg />
</Link>
</Logo>
<Logo width={180}>
<Link to="https://pushpay.com">
<PushpayLogoSvg />
</Link>
</Logo>
<Logo width={120}>
<Link to="https://www.seven2one.de">
<Seven2OneLogoSvg />
</Link>
</Logo>
<Logo width={110}>
<Link to="https://www.swisslife.ch">
<SwissLifeLogoSvg />
</Link>
</Logo>
</Logos>
</ContentContainer>
</SectionRow>
</Section>
<Section>
<SectionRow>
<ImageContainer>
<ContactUsSvg />
</ImageContainer>
<ContentContainer>
<SectionTitle>What's your story?</SectionTitle>
<p>
We would be thrilled to hear your customer success story with Hot
Chocolate! Write us an{" "}
<a href="mailto:contact@chillicream.com">
<EnvelopeIcon />
</a>{" "}
or chat with us on{" "}
<a href={data.site!.siteMetadata!.tools!.slack!}>
<SlackIcon />
</a>{" "}
to get in touch with us!
</p>
</ContentContainer>
</SectionRow>
</Section>
</Layout>
);
};
export default IndexPage;
const Slideshow = styled(Carousel)`
flex: 0 0 auto;
width: 100%;
ul,
li {
margin: 0;
padding: 0;
}
> .carousel {
position: relative;
> .control-next,
> .control-prev {
display: none;
}
.control-dots {
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 20px;
list-style: none;
> .dot {
flex: 0 0 26px;
margin: 0 5px;
border-radius: 2px;
height: 6px;
background-color: #fff;
opacity: 0.5;
cursor: pointer;
transition: background-color 0.2s ease-in-out, opacity 0.2s ease-in-out;
&.selected {
background-color: #fff;
opacity: 1;
&:hover {
opacity: 1;
}
}
&:hover {
opacity: 0.85;
}
}
}
.slider {
position: relative;
display: flex;
list-style: none;
> .slide {
position: relative;
display: flex;
align-items: center;
justify-content: center;
min-width: 100%;
}
}
}
`;
const Slide = styled.div`
margin: 0 auto;
width: 100%;
.gatsby-image-wrapper {
display: flex;
align-items: center;
justify-content: center;
}
@media only screen and (min-width: 992px) {
width: 800px;
}
@media only screen and (min-width: 1200px) {
width: 1000px;
}
`;
const SlideContent = styled.div`
display: flex;
flex-direction: column;
@media only screen and (min-width: 768px) {
position: absolute;
right: 20%;
bottom: 20%;
left: 20%;
display: flex;
flex-direction: column;
border-radius: 5px;
padding: 20px;
background-color: rgba(0, 0, 0, 0.6);
}
@media only screen and (min-width: 992px) {
right: 25%;
left: 25%;
}
@media only screen and (min-width: 1200px) {
right: 30%;
left: 30%;
margin: 0 auto;
max-width: 700px;
}
`;
const SlideTitle = styled.h2`
flex: 0 0 auto;
margin-top: 10px;
font-size: 1em;
text-align: center;
@media only screen and (min-width: 768px) {
margin-top: 0;
margin-bottom: 10px;
font-size: 1.667em;
text-align: initial;
color: #fff;
}
`;
const SlideDescription = styled.p`
display: none;
flex: 0 0 auto;
margin-bottom: 0;
font-size: 1.111em;
color: #fff;
@media only screen and (min-width: 768px) {
display: initial;
}
`;
const Articles = styled.ul`
display: flex;
flex-direction: column;
align-items: stretch;
justify-content: space-around;
margin: 0 0 20px;
list-style-type: none;
@media only screen and (min-width: 820px) {
flex-direction: row;
flex-wrap: wrap;
}
`;
const Article = styled.li`
display: flex;
margin: 20px 0 0;
width: 100%;
border-radius: 4px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
> a {
flex: 1 1 auto;
}
> a > .gatsby-image-wrapper {
border-radius: 4px 4px 0 0;
}
@media only screen and (min-width: 820px) {
width: 30%;
}
`;
const ArticleMetadata = styled.div`
display: flex;
flex-direction: row;
align-items: center;
margin: 15px 20px 7px;
font-size: 0.778em;
color: #667;
`;
const ArticleTitle = styled.h1`
margin: 0 20px 15px;
font-size: 1em;
`;
const Logos = styled.div`
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
`;
const Logo = styled.div<{ width?: number }>`
flex: 0 0 auto;
margin: 30px;
width: ${({ width }) => width || 160}px;
> a > svg {
fill: #667;
transition: fill 0.2s ease-in-out;
&:hover {
fill: #333;
}
}
`;