Skip to content

Commit 96305fb

Browse files
Adding Tour of JSON Schema to the website (#859)
* Adding Tour of JSON Schema * Update pages/learn/index.page.tsx Co-authored-by: Zeel Rajodiya <[email protected]> --------- Co-authored-by: Zeel Rajodiya <[email protected]>
1 parent 9b639ad commit 96305fb

File tree

4 files changed

+55
-2
lines changed

4 files changed

+55
-2
lines changed

components/Sidebar.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ const getDocsPath = [
9898
'/overview/faq',
9999
];
100100
const getStartedPath = [
101+
'/learn',
101102
'/learn/json-schema-examples',
102103
'/learn/file-system',
103104
'/learn/miscellaneous-examples',
@@ -414,11 +415,17 @@ export const DocsNav = ({
414415
className={classnames('ml-6', { hidden: !active.getStarted })}
415416
id='getStarted'
416417
>
418+
<DocLink uri='/learn' label='Overview' setOpen={setOpen} />
417419
<DocLink
418420
uri='/learn/getting-started-step-by-step'
419421
label='Creating your first schema'
420422
setOpen={setOpen}
421423
/>
424+
<DocLinkBlank
425+
uri='https://tour.json-schema.org/'
426+
label='Tour of JSON Schema'
427+
setOpen={setOpen}
428+
/>
422429
<SegmentSubtitle label='Examples' />
423430
<div className='pl-4 pb-1 pt-1'>
424431
<DocLink

pages/docs/index.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default function Welcome() {
3939
body='Our Getting Started guide walks you through the basics of JSON Schema.'
4040
headerSize='medium'
4141
bodyTextSize='small'
42-
link='/learn/getting-started-step-by-step'
42+
link='/learn'
4343
/>
4444
<Card
4545
icon='/icons/book.svg'

pages/index.page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ const Home = (props: any) => {
257257

258258
<div className='lg:w-[650px] mx-auto my-10 grid grid-cols-1 lg:grid-cols-3 gap-8 justify-items-center '>
259259
<Link
260-
href='/learn/getting-started-step-by-step'
260+
href='/learn'
261261
className='flex items-center justify-center rounded border-2 border-white dark:border-none hover:bg-blue-700 transition-all duration-300 ease-in-out text-white w-[194px] h-[40px] font-semibold bg-primary dark:shadow-2xl'
262262
>
263263
Getting started

pages/learn/index.page.tsx

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import React from 'react';
2+
import { getLayout } from '~/components/Sidebar';
3+
import Head from 'next/head';
4+
import { Headline1 } from '~/components/Headlines';
5+
import { SectionContext } from '~/context';
6+
import Card from '~/components/Card';
7+
import { DocsHelp } from '~/components/DocsHelp';
8+
9+
export default function Welcome() {
10+
const markdownFile = '_indexPage';
11+
12+
const newTitle = 'Getting Started';
13+
return (
14+
<SectionContext.Provider value='learn'>
15+
<Head>
16+
<title>{newTitle}</title>
17+
</Head>
18+
<Headline1>{newTitle}</Headline1>
19+
<p>
20+
New to JSON Schema and don't know where to start?
21+
<br />
22+
<br />
23+
</p>
24+
<div className='w-full lg:w-full grid grid-cols-1 sm:grid-cols-2 gap-6 my-[10px] mx-auto mt-8'>
25+
<Card
26+
title='Creating your first Schema'
27+
body='Our Getting Started guide walks you through the basics of JSON Schema.'
28+
headerSize='medium'
29+
bodyTextSize='small'
30+
extended={true}
31+
link='/learn/getting-started-step-by-step'
32+
/>
33+
<Card
34+
title='Tour of JSON Schema'
35+
body='An interactive introduction to JSON Schema. Each lesson concludes with an exercise, so you can practice what you have learned.'
36+
headerSize='medium'
37+
bodyTextSize='small'
38+
extended={true}
39+
link='https://tour.json-schema.org/'
40+
/>
41+
</div>
42+
<DocsHelp markdownFile={markdownFile} />
43+
</SectionContext.Provider>
44+
);
45+
}
46+
Welcome.getLayout = getLayout;

0 commit comments

Comments
 (0)