Skip to content

Commit

Permalink
Adding Tour of JSON Schema to the website (#859)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
benjagm and JeelRajodiya authored Aug 14, 2024
1 parent 9b639ad commit 96305fb
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 2 deletions.
7 changes: 7 additions & 0 deletions components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const getDocsPath = [
'/overview/faq',
];
const getStartedPath = [
'/learn',
'/learn/json-schema-examples',
'/learn/file-system',
'/learn/miscellaneous-examples',
Expand Down Expand Up @@ -414,11 +415,17 @@ export const DocsNav = ({
className={classnames('ml-6', { hidden: !active.getStarted })}
id='getStarted'
>
<DocLink uri='/learn' label='Overview' setOpen={setOpen} />
<DocLink
uri='/learn/getting-started-step-by-step'
label='Creating your first schema'
setOpen={setOpen}
/>
<DocLinkBlank
uri='https://tour.json-schema.org/'
label='Tour of JSON Schema'
setOpen={setOpen}
/>
<SegmentSubtitle label='Examples' />
<div className='pl-4 pb-1 pt-1'>
<DocLink
Expand Down
2 changes: 1 addition & 1 deletion pages/docs/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function Welcome() {
body='Our Getting Started guide walks you through the basics of JSON Schema.'
headerSize='medium'
bodyTextSize='small'
link='/learn/getting-started-step-by-step'
link='/learn'
/>
<Card
icon='/icons/book.svg'
Expand Down
2 changes: 1 addition & 1 deletion pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ const Home = (props: any) => {

<div className='lg:w-[650px] mx-auto my-10 grid grid-cols-1 lg:grid-cols-3 gap-8 justify-items-center '>
<Link
href='/learn/getting-started-step-by-step'
href='/learn'
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'
>
Getting started
Expand Down
46 changes: 46 additions & 0 deletions pages/learn/index.page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import React from 'react';
import { getLayout } from '~/components/Sidebar';
import Head from 'next/head';
import { Headline1 } from '~/components/Headlines';
import { SectionContext } from '~/context';
import Card from '~/components/Card';
import { DocsHelp } from '~/components/DocsHelp';

export default function Welcome() {
const markdownFile = '_indexPage';

const newTitle = 'Getting Started';
return (
<SectionContext.Provider value='learn'>
<Head>
<title>{newTitle}</title>
</Head>
<Headline1>{newTitle}</Headline1>
<p>
New to JSON Schema and don't know where to start?
<br />
<br />
</p>
<div className='w-full lg:w-full grid grid-cols-1 sm:grid-cols-2 gap-6 my-[10px] mx-auto mt-8'>
<Card
title='Creating your first Schema'
body='Our Getting Started guide walks you through the basics of JSON Schema.'
headerSize='medium'
bodyTextSize='small'
extended={true}
link='/learn/getting-started-step-by-step'
/>
<Card
title='Tour of JSON Schema'
body='An interactive introduction to JSON Schema. Each lesson concludes with an exercise, so you can practice what you have learned.'
headerSize='medium'
bodyTextSize='small'
extended={true}
link='https://tour.json-schema.org/'
/>
</div>
<DocsHelp markdownFile={markdownFile} />
</SectionContext.Provider>
);
}
Welcome.getLayout = getLayout;

0 comments on commit 96305fb

Please sign in to comment.