-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.js
267 lines (257 loc) 路 8.46 KB
/
index.js
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
import React from 'react';
import { useStaticQuery, graphql } from 'gatsby';
import { css } from '@emotion/core';
import styled from '@emotion/styled';
import pkg from '../../package.json';
import {
SEO,
Link,
ThemeProvider,
useSiteData,
} from '@commercetools-docs/gatsby-theme-docs';
import { designSystem } from '@commercetools-docs/ui-kit';
import Card from '@commercetools-uikit/card';
import SpacingsStack from '@commercetools-uikit/spacings-stack';
import LayoutMarketing from '../layouts/marketing';
import LinksCard from '../components/links-card';
import LandingPageRocket from '../icons/landing-page-rocket.svg';
import ScreenCogIcon from '../icons/screen-cog-icon.svg';
import ScreenDesignToolIcon from '../icons/screen-design-tool-icon.svg';
import ScreenBulbIcon from '../icons/screen-bulb-icon.svg';
const SectionTitle = styled.div`
color: ${designSystem.colors.light.primary};
font-size: ${designSystem.typography.fontSizes.h4};
letter-spacing: 4px;
`;
const SectionBody = styled.div`
color: ${designSystem.colors.light.textPrimary};
font-size: ${designSystem.typography.fontSizes.small};
line-height: 1.5;
`;
const PageContainer = styled.div`
width: 100%;
max-width: ${designSystem.dimensions.widths.marketingContent};
margin: 0 auto;
`;
const ButtonLink = styled(Link)`
display: inline-block;
padding: ${designSystem.dimensions.spacings.m}
${designSystem.dimensions.spacings.l};
text-decoration: none;
font-size: ${designSystem.typography.fontSizes.body};
color: ${designSystem.colors.light.textPrimary} !important;
background-color: ${designSystem.colors.light.surfacePrimary};
border: 1px solid ${designSystem.colors.light.surfacePrimary};
border-radius: ${designSystem.tokens.borderRadius6};
:hover {
background-color: ${designSystem.colors.light.surfaceQuote};
color: ${designSystem.colors.light.linkNavigation} !important;
}
`;
const GridContainer = styled.div`
display: grid;
grid-gap: ${designSystem.dimensions.spacings.l};
grid-auto-columns: 1fr;
grid-template-columns: repeat(
auto-fit,
minmax(${designSystem.dimensions.widths.pageNavigation}, 1fr)
);
`;
const PageMarketingContent = () => {
const siteData = useSiteData();
const data = useStaticQuery(graphql`
query GetMainResourcesLinks {
allNavigationYaml {
nodes {
chapterTitle
pages {
path
}
}
}
}
`);
return (
<>
<PageContainer>
<div
css={css`
padding: 0;
@media screen and (${designSystem.dimensions.viewports
.largeTablet}) {
padding: 0;
}
`}
>
<div
css={css`
display: grid;
grid-gap: ${designSystem.dimensions.spacings.xl};
grid-template-rows: auto;
grid-template-columns: 1fr;
@media screen and (${designSystem.dimensions.viewports
.largeTablet}) {
grid-template-columns: 2fr 1fr;
}
`}
>
<div
css={css`
display: flex;
flex-direction: column;
justify-content: center;
> * + * {
margin: ${designSystem.dimensions.spacings.xl} 0 0;
}
`}
>
<div
css={css`
font-size: ${designSystem.typography.fontSizes.h1};
color: ${designSystem.colors.light.textInverted};
`}
>
{'Develop applications for the Merchant Center'}
</div>
<div>
<ButtonLink href="/getting-started/what-is-a-custom-application">
{'Learn about custom applications'}
</ButtonLink>
</div>
</div>
<div
css={css`
justify-self: center;
@media screen and (${designSystem.dimensions.viewports
.mobile}) {
svg {
height: 100%;
width: 100%;
}
}
`}
>
<LandingPageRocket height={300} />
</div>
</div>
</div>
</PageContainer>
<PageContainer>
<Card
css={css`
> div {
padding: ${designSystem.dimensions.spacings.xl}
${designSystem.dimensions.spacings.l};
@media screen and (${designSystem.dimensions.viewports.tablet}) {
padding: calc(${designSystem.dimensions.spacings.l} * 2)
calc(${designSystem.dimensions.spacings.xl} * 2);
}
}
`}
>
<GridContainer>
<SpacingsStack scale="m">
<SpacingsStack scale="s">
<ScreenCogIcon />
<SectionTitle>{'Built on modern technologies'}</SectionTitle>
</SpacingsStack>
<SectionBody>
{
'Develop JavaScript applications with React, GraphQL, Webpack and other modern technologies.'
}
</SectionBody>
</SpacingsStack>
<SpacingsStack scale="m">
<SpacingsStack scale="s">
<ScreenDesignToolIcon />
<SectionTitle>{'Based on a solid Design System'}</SectionTitle>
</SpacingsStack>
<SectionBody>
{
'Merchant Center custom applications are built and designed according to our Design System. It provides rules, patterns and best practices to ease development and focus on the business logic.'
}
</SectionBody>
</SpacingsStack>
<SpacingsStack scale="m">
<SpacingsStack scale="s">
<ScreenBulbIcon />
<SectionTitle>{'Zero config development tools'}</SectionTitle>
</SpacingsStack>
<SectionBody>
{
'Focus more on implementing the right features instead of configuration. Our open source packages provide all the necessary tools and components to get started seamlessly.'
}
</SectionBody>
</SpacingsStack>
</GridContainer>
</Card>
</PageContainer>
<PageContainer>
<LinksCard
linksData={[
{
title: 'Documentation',
links: data.allNavigationYaml.nodes
.filter(node => node.pages && node.pages.length > 0)
.map(node => {
const firstChapterPage = node.pages[0];
return {
to: firstChapterPage.path,
label: node.chapterTitle,
};
}),
},
{
title: 'Resources',
links: [
{
to: siteData.siteMetadata.repositoryUrl,
label: 'App-Kit',
},
{
to: 'https://github.com/commercetools/ui-kit',
label: 'UI-Kit',
},
{
to: 'https://docs.commercetools.com',
label: 'commercetools platform',
},
],
},
{
title: 'Releases',
links: [
{
to: `${siteData.siteMetadata.repositoryUrl}/releases/tag/v${siteData.siteMetadata.currentVersion}`,
label: `v${siteData.siteMetadata.currentVersion}`,
},
{
to: `${siteData.siteMetadata.repositoryUrl}/blob/master/CONTRIBUTING.md`,
label: 'Contributing',
},
{
to: `${siteData.siteMetadata.repositoryUrl}/blob/master/LICENSE`,
label: 'MIT license',
},
],
},
]}
/>
</PageContainer>
</>
);
};
PageMarketingContent.displayName = 'PageMarketingContent';
const PageMarketingTemplate = () => (
<ThemeProvider>
<LayoutMarketing>
<SEO
title="Develop applications for the Merchant Center"
keywords={pkg.keywords}
excludeFromSearchIndex={true}
/>
<PageMarketingContent />
</LayoutMarketing>
</ThemeProvider>
);
export default PageMarketingTemplate;