Skip to content

Commit

Permalink
Move welcome outside overview section
Browse files Browse the repository at this point in the history
  • Loading branch information
benjagm committed Jun 1, 2024
1 parent 46e4dcd commit 1f56a4a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const MainNavigation = () => {
/>
<MainNavLink
className='hidden lg:block hover:underline'
uri='/overview/welcome'
uri='/docs'
label='Docs'
isActive={section === 'docs'}
/>
Expand Down
2 changes: 0 additions & 2 deletions components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ const SegmentSubtitle = ({ label }: { label: string }) => {
);
};
const getDocsPath = [
'/overview/welcome',
'/overview/what-is-jsonschema',
'/overview/sponsors',
'/overview/case-studies',
Expand Down Expand Up @@ -341,7 +340,6 @@ export const DocsNav = ({
className={classnames('ml-6', { hidden: !active.getDocs })}
id='overview'
>
<DocLink uri='/overview/welcome' label='Welcome' setOpen={setOpen} />
<DocLink
uri='/overview/what-is-jsonschema'
label='What is JSON Schema?'
Expand Down
2 changes: 0 additions & 2 deletions pages/community/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import { GetStaticProps } from 'next';
import Card from '~/components/Card';
import Image from 'next/image';

/* eslint-disable */
import axios from 'axios';
import ical from 'node-ical';
import moment from 'moment-timezone';

/* eslint-enable */
export const getStaticProps: GetStaticProps = async () => {
const files = fs.readdirSync(PATH);
const blogPosts = files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ 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 = 'Welcome';
return (
<SectionContext.Provider value='docs'>
Expand Down Expand Up @@ -57,6 +60,7 @@ export default function Welcome() {
link='/specification'
/>
</div>
<DocsHelp markdownFile={markdownFile} />
</SectionContext.Provider>
);
}
Expand Down
2 changes: 1 addition & 1 deletion pages/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ const Home = (props: any) => {
Start learning JSON Schema
</h2>
<button className='w-[170px] h-[45px] mx-auto hover:bg-blue-700 transition-all duration-300 ease-in-out rounded border-2 bg-primary text-white font-semibold dark:border-none'>
<a href='/learn/getting-started-step-by-step '>Read the docs</a>
<a href='/docs '>Read the docs</a>
</button>
</div>
</section>
Expand Down
4 changes: 4 additions & 0 deletions pages/overview/case-studies/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import { Headline1 } from '~/components/Headlines';
import { SectionContext } from '~/context';
import data from 'data/case-studies.json';
import Card from '~/components/Card';
import { DocsHelp } from '~/components/DocsHelp';

export default function ContentExample() {
const newTitle = 'Case Studies';
const markdownFile = '_indexPage';

return (
<SectionContext.Provider value='docs'>
<Head>
Expand All @@ -32,6 +35,7 @@ export default function ContentExample() {
/>
))}
</div>
<DocsHelp markdownFile={markdownFile} />
</SectionContext.Provider>
);
}
Expand Down
9 changes: 6 additions & 3 deletions pages/overview/use-cases/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import { SectionContext } from '~/context';
import { Headline1 } from '~/components/Headlines';
import Card from '~/components/Card';
import data from '~/data/use-cases.json';
import { DocsHelp } from '~/components/DocsHelp';

export default function Content() {
const newTitle = 'Use Cases';
const markdownFile = '_indexPage';

return (
<SectionContext.Provider value='docs'>
Expand All @@ -17,10 +19,10 @@ export default function Content() {
<Headline1>{newTitle}</Headline1>
<p>
Discover everything you can do with JSON Schema. This section presents
the most common use cases for JSON Schema, but the possibilities are
endless.
the most common use cases for JSON Schema, but but there may be many
more applications waiting to be discovered.
</p>
<div className='w-full lg:w-full grid grid-cols-1 sm:grid-cols-1 gap-6 my-[10px] mx-auto mt-8'>
<div className='w-full lg:w-full grid grid-cols-2 sm:grid-cols-2 gap-6 my-[10px] mx-auto mt-8'>
{data.map((element, index) => (
<Card
key={index}
Expand All @@ -33,6 +35,7 @@ export default function Content() {
/>
))}
</div>
<DocsHelp markdownFile={markdownFile} />
</SectionContext.Provider>
);
}
Expand Down

0 comments on commit 1f56a4a

Please sign in to comment.