@@ -5,7 +5,7 @@ import { getHostname } from 'helpers'
55import humanizeUrl from 'humanize-url'
66import { Plus } from 'react-feather'
77import { navigate } from 'gatsby'
8- import { get } from 'lodash'
8+ import { capitalize , get } from 'lodash'
99import React from 'react'
1010
1111import {
@@ -118,19 +118,21 @@ const Hero = ({ humanizedUrl, brand, data }) => {
118118
119119 const logoProvider = ( ( ) => {
120120 const LogoProvider = Logo [ brand ]
121- if ( LogoProvider ) return < LogoProvider size = '72px' state = 'hover' />
121+ if ( LogoProvider ) {
122+ return < LogoProvider size = { [ '36px' , '72px' ] } state = 'hover' />
123+ }
122124
123125 const logoUrl = get ( data , 'logo.url' )
124126
125127 if ( logoUrl && ! logoUrl . endsWith ( 'ico' ) ) {
126- return < Image size = ' 72px' src = { logoUrl } />
128+ return < Image size = { [ '36px' , ' 72px'] } src = { logoUrl } />
127129 }
128130 } ) ( )
129131
130132 const title = (
131133 < Box >
132134 < Flex alignItems = 'center' justifyContent = 'center' >
133- < Logo . Microlink width = ' 72px' />
135+ < Logo . Microlink width = { [ '36px' , ' 72px'] } />
134136 { logoProvider && (
135137 < Box ml = { 3 } mr = { 3 } >
136138 < Plus color = { colors . gray5 } />
@@ -167,6 +169,7 @@ const Sdk = ({ humanizedUrl, data }) => (
167169 borderTop = { `${ borders [ 1 ] } ${ colors . pinkest } ` }
168170 borderBottom = { `${ borders [ 1 ] } ${ colors . pinkest } ` }
169171 bg = 'pinky'
172+ pb = { [ 0 , 5 ] }
170173 >
171174 < Flex
172175 flexDirection = 'column'
@@ -176,7 +179,7 @@ const Sdk = ({ humanizedUrl, data }) => (
176179 >
177180 < Subheader children = { [ 'Microlink SDK' , 'Make your content attractive' ] } />
178181
179- < Box pb = { 5 } px = { 4 } textAlign = { [ 'inherit' , 'center' ] } >
182+ < Box pb = { [ 0 , 5 ] } px = { 4 } textAlign = { [ 'inherit' , 'center' ] } >
180183 < Box pt = { 4 } >
181184 < Text mb = { [ 4 , 4 , 4 , 0 ] } maxWidth = { 8 } >
182185 < Link href = '/docs/sdk/getting-started/overview/' >
@@ -189,7 +192,7 @@ const Sdk = ({ humanizedUrl, data }) => (
189192 links into beautiful previews, engaging better your links.
190193 </ Text >
191194 </ Box >
192- < Box pt = { 4 } >
195+ < Box pt = { [ 0 , 4 ] } textAlign = 'center' >
193196 < ButtonSecondary
194197 onClick = { ( ) => navigate ( '/docs/sdk/getting-started/overview/' ) }
195198 >
@@ -203,7 +206,7 @@ const Sdk = ({ humanizedUrl, data }) => (
203206 </ Box >
204207 </ Flex >
205208
206- < Container maxWidth = { 16 } pt = { 0 } pb = { 0 } >
209+ < Container maxWidth = { 16 } pt = { 0 } pb = { [ 4 , 0 ] } >
207210 { [ { size : 'large' } , { size : 'normal' } , { size : 'small' } ] . map (
208211 ( { docLink, ...props } , index ) => (
209212 < Flex
@@ -213,18 +216,22 @@ const Sdk = ({ humanizedUrl, data }) => (
213216 key = { JSON . stringify ( props ) }
214217 mr = 'auto'
215218 ml = 'auto'
216- pb = { index === 1 ? 5 : 0 }
219+ py = { index === 1 ? [ 3 , 3 , 5 , 5 ] : 0 }
217220 >
218- < Box width = { 500 } >
219- < Text mb = { 1 } color = 'gray8' fontSize = { 0 } >
220- { props . size }
221- </ Text >
221+ < Box width = { 500 } p = { [ 4 , 4 , 0 ] } >
222+ < Heading
223+ variant = { null }
224+ pb = { [ 4 , 3 ] }
225+ textAlign = 'left'
226+ fontSize = { [ 2 , 3 ] }
227+ children = { capitalize ( props . size ) }
228+ />
222229 < Microlink
223230 setData = { { ...data , logo : data . logo || DEFAULT_LOGO } }
224231 { ...props }
225232 />
226233 </ Box >
227- < Box mt = { [ 3 , 3 , 3 , 0 ] } width = { 500 } >
234+ < Box width = { 500 } px = { 4 } >
228235 < MultiCodeEditor
229236 languages = { generateLanguages ( { ...props , url : data . url } ) }
230237 />
@@ -239,7 +246,7 @@ const Sdk = ({ humanizedUrl, data }) => (
239246const Features = ( { children } ) => (
240247 < Container id = 'features' >
241248 < Header title = 'Features' caption = 'Capabilities under the hood.' />
242- < Box as = 'section' pt = { 4 } >
249+ < Box as = 'section' pt = { [ 3 , 4 ] } >
243250 < Hide breakpoints = { [ 0 , 1 ] } >
244251 < Grid children = { children } itemsPerRow = { 3 } />
245252 </ Hide >
@@ -258,6 +265,7 @@ const Api = ({ data }) => {
258265 borderTop = { `${ borders [ 1 ] } ${ colors . pinkest } ` }
259266 borderBottom = { `${ borders [ 1 ] } ${ colors . pinkest } ` }
260267 bg = 'pinky'
268+ pb = { [ 0 , 5 ] }
261269 >
262270 < Flex
263271 flexDirection = 'column'
@@ -267,15 +275,15 @@ const Api = ({ data }) => {
267275 >
268276 < Subheader children = { [ 'Microlink API' , 'Build APIs from websites' ] } />
269277
270- < Box pb = { 5 } px = { 4 } textAlign = { [ 'inherit' , 'center' ] } >
278+ < Box pb = { [ 0 , 5 ] } px = { 4 } textAlign = { [ 'inherit' , 'center' ] } >
271279 < Box pt = { 4 } >
272280 < Text mb = { [ 4 , 4 , 4 , 0 ] } maxWidth = { 8 } >
273281 Microlink Query Language (
274282 < Link href = '/docs/mql/getting-started/overview' > MQL</ Link > ) is a
275283 programmatic way to getting content from any URL.
276284 </ Text >
277285 </ Box >
278- < Box pt = { 4 } >
286+ < Box pt = { [ 0 , 4 ] } textAlign = 'center' >
279287 < ButtonSecondary
280288 onClick = { ( ) => navigate ( '/docs/mql/getting-started/overview' ) }
281289 >
@@ -297,21 +305,31 @@ const Api = ({ data }) => {
297305 flexDirection = { [ 'column' , 'column' , 'column' , 'row' ] }
298306 alignItems = { [ 'center' , 'center' , 'center' , 'baseline' ] }
299307 >
300- < Box width = { 500 } >
301- < Text mb = { 1 } color = 'gray8' fontSize = { 1 } >
302- using MQL (
308+ < Box width = { 500 } p = { [ 4 , 4 , 0 ] } >
309+ < Heading
310+ variant = { null }
311+ pb = { [ 4 , 3 ] }
312+ textAlign = 'left'
313+ fontSize = { [ 2 , 3 ] }
314+ >
315+ Using MQL (
303316 < Link href = '/docs/mql/getting-started/overview' > docs</ Link > )
304- </ Text >
317+ </ Heading >
305318 < CodeEditor
306319 language = 'javascript'
307320 children = { generateMqlCode ( data ) }
308321 />
309322 </ Box >
310- < Box mt = { [ 3 , 3 , 3 , 0 ] } width = { 500 } >
311- < Text mb = { 1 } color = 'gray8' fontSize = { 1 } >
312- using Microlink CLI (
323+ < Box width = { 500 } p = { [ 4 , 4 , 0 ] } pt = { 0 } >
324+ < Heading
325+ variant = { null }
326+ pb = { [ 4 , 3 ] }
327+ textAlign = 'left'
328+ fontSize = { [ 2 , 3 ] }
329+ >
330+ Using Microlink CLI (
313331 < Link href = '/docs/api/getting-started/cli' > docs</ Link > )
314- </ Text >
332+ </ Heading >
315333 < Box mb = { 3 } >
316334 < CodeEditor
317335 language = 'bash'
0 commit comments