From b049b2ef1a869acfd93a9ed75bbb5ceab553e12c Mon Sep 17 00:00:00 2001 From: VivekJaiswal18 <96608169+VivekJaiswal18@users.noreply.github.com> Date: Sat, 23 Mar 2024 20:13:18 +0530 Subject: [PATCH 1/3] added use-cases page, modified card component --- components/Card.tsx | 25 ++++++-- components/Sidebar.tsx | 5 ++ data/use-cases.json | 77 +++++++++++++++++++++++++ pages/overview/use-cases/index.page.tsx | 36 ++++++++++++ 4 files changed, 137 insertions(+), 6 deletions(-) create mode 100644 data/use-cases.json create mode 100644 pages/overview/use-cases/index.page.tsx diff --git a/components/Card.tsx b/components/Card.tsx index 129f029d2..46cf24db5 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -7,9 +7,22 @@ interface CardProps { icon?: string; link?: string; image?: string; + headerSize?: 'small' | 'medium' | 'large'; + bodyTextSize?: 'small' | 'medium' | 'large'; } -const CardBody = ({ title, body, icon, link, image }: CardProps) => { +const CardBody = ({ title, body, icon, link, image, headerSize, bodyTextSize }: CardProps) => { + + const headerSizeClasses: Record = { + small: 'text-[.9rem]', + medium: 'text-[1.3rem]', + large: 'text-[2rem]', + }; + const bodyTextSizeClasses: Record = { + small: 'text-[.85rem]', + medium: 'text-[1rem]', + large: 'text-[1.5rem]', + }; return (
@@ -21,12 +34,12 @@ const CardBody = ({ title, body, icon, link, image }: CardProps) => { {title} )} -

+

{title}


-

+

{link && ( @@ -38,15 +51,15 @@ const CardBody = ({ title, body, icon, link, image }: CardProps) => { ); }; -const Card: React.FC = ({ title, body, icon, link, image }) => { +const Card: React.FC = ({ title, body, icon, link, image, headerSize, bodyTextSize }) => { return ( <> {link ? ( - + ) : ( - + )} ); diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index df210bd8b..e1a83270c 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -77,6 +77,7 @@ const getDocsPath = [ '/overview/sponsors', '/overview/casestudies', '/overview/similar-technologies', + '/overview/use-cases', '/overview/code-of-conduct', '/overview/FAQ', ]; @@ -341,6 +342,10 @@ export const DocsNav = () => { uri='/overview/similar-technologies' label='Similar Technologies' /> +
diff --git a/data/use-cases.json b/data/use-cases.json new file mode 100644 index 000000000..3a2ac7717 --- /dev/null +++ b/data/use-cases.json @@ -0,0 +1,77 @@ +[ + { + "title":"JSON Schema oihgfewrnrnvon ", + "summary":"At GitHub's Docs Engineering team, while shipping releases to production 20 times per day.", + "links": + { + "lang": "URL1", + "url": "/blog/posts/github-case-study" + } + }, + { + "title":"How JSON Schema", + "summary":"Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", + "logo": "/img/logos/6river-logo.svg", + "links": + { + "lang": "URL1", + "url": "/blog/posts/6-river-systems-case-study" + } + + }, + { + "title":"Transform the Schema", + "summary":"Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", + "logo": "/img/logos/manfred-color.svg", + "links": + { + "lang": "URL1", + "url": "/blog/posts/manfred-case-study" + } + + }, + { + "title":"How Postman uses JSON Schema", + "summary":"Learn how JSON Schema continues to be a crucial component of the Postman API Platform and the API ecosystem.", + "logo": "/img/logos/sponsors/Postman_logo-orange.svg", + "links": + { + "lang": "URL1", + "url": "/blog/posts/postman-case-study" + } + + }, + { + "title":"Using JSON Schema at Remote to", + "summary":"Using JSON Schema at Remote was the first step to solving data validation and form generation problems across all levels at Remote.", + "logo": "/img/logos/remote-logo.png", + "links": + { + "lang": "URL1", + "url": "/blog/posts/remote-case-study" + } + + }, + { + "title":"How Tyler Technologies reduced ", + "summary":"Using JSON Schema at Tyler Technologies meant showing added value to clients could take minutes rather than days or in some cases weeks.", + "logo": "/img/logos/tyler-tech-logo.svg", + "links": + { + "lang": "URL1", + "url": "/blog/posts/tyler-technologies-case-study" + } + + }, + { + "title":"How the W3C Web of Things brings JSON Schema to the Internet of Things", + "summary":"Using JSON Schema at the W3C Web of Things to create an interoperability layer so that different IoT platforms, protocols and standards can operate together", + "logo": "/img/logos/wot-logo.png", + "links": + { + "lang": "URL1", + "url": "/blog/posts/w3c-wot-case-study" + } + + } + ] \ No newline at end of file diff --git a/pages/overview/use-cases/index.page.tsx b/pages/overview/use-cases/index.page.tsx new file mode 100644 index 000000000..8f1561db7 --- /dev/null +++ b/pages/overview/use-cases/index.page.tsx @@ -0,0 +1,36 @@ +import React from 'react'; +import { getLayout } from '~/components/Sidebar'; +import Head from 'next/head'; +import { SectionContext } from '~/context'; +import { Headline1 } from '~/components/Headlines'; +import Card from '~/components/Card' +import data from '~/data/use-cases.json' + +export default function Content() { + const newTitle = 'Use Cases'; + + return ( + + + {newTitle} + + {newTitle} +

+ Welcome to the land of streamlined data! JSON Schema unlocks incredible potential for all your projects. Explore real-world applications showcasing how this powerful tool simplifies data management, ensures consistency, and fosters seamless data exchange across applications. See how JSON Schema empowers you to build robust data structures, saving time and minimizing errors. +

+
+ {data.map((element, index) => ( + + ))} +
+
+ ); +} +Content.getLayout = getLayout; \ No newline at end of file From 7059ebf651785ef4417ac540fe0a5970a46c185d Mon Sep 17 00:00:00 2001 From: VivekJaiswal18 <96608169+VivekJaiswal18@users.noreply.github.com> Date: Sat, 23 Mar 2024 21:38:36 +0530 Subject: [PATCH 2/3] fix --- components/Card.tsx | 45 ++++++-- components/Sidebar.tsx | 5 +- data/use-cases.json | 139 +++++++++++------------- pages/overview/use-cases/index.page.tsx | 17 ++- 4 files changed, 109 insertions(+), 97 deletions(-) diff --git a/components/Card.tsx b/components/Card.tsx index 46cf24db5..8d03d8e0d 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -11,15 +11,22 @@ interface CardProps { bodyTextSize?: 'small' | 'medium' | 'large'; } -const CardBody = ({ title, body, icon, link, image, headerSize, bodyTextSize }: CardProps) => { - - const headerSizeClasses: Record = { - small: 'text-[.9rem]', +const CardBody = ({ + title, + body, + icon, + link, + image, + headerSize, + bodyTextSize, +}: CardProps) => { + const headerSizeClasses: Record = { + small: 'text-[0.9rem]', medium: 'text-[1.3rem]', large: 'text-[2rem]', }; - const bodyTextSizeClasses: Record = { - small: 'text-[.85rem]', + const bodyTextSizeClasses: Record = { + small: 'text-[0.85rem]', medium: 'text-[1rem]', large: 'text-[1.5rem]', }; @@ -34,12 +41,16 @@ const CardBody = ({ title, body, icon, link, image, headerSize, bodyTextSize }: {title} )} -

+

{title}


-

+

{link && ( @@ -51,15 +62,27 @@ const CardBody = ({ title, body, icon, link, image, headerSize, bodyTextSize }: ); }; -const Card: React.FC = ({ title, body, icon, link, image, headerSize, bodyTextSize }) => { +const Card: React.FC = ({ + title, + body, + icon, + link, + image, + headerSize, + bodyTextSize, +}) => { return ( <> {link ? ( - + ) : ( - + )} ); diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index e1a83270c..6d660b996 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -342,10 +342,7 @@ export const DocsNav = () => { uri='/overview/similar-technologies' label='Similar Technologies' /> - + diff --git a/data/use-cases.json b/data/use-cases.json index 3a2ac7717..ccb44a14b 100644 --- a/data/use-cases.json +++ b/data/use-cases.json @@ -1,77 +1,64 @@ [ - { - "title":"JSON Schema oihgfewrnrnvon ", - "summary":"At GitHub's Docs Engineering team, while shipping releases to production 20 times per day.", - "links": - { - "lang": "URL1", - "url": "/blog/posts/github-case-study" - } - }, - { - "title":"How JSON Schema", - "summary":"Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", - "logo": "/img/logos/6river-logo.svg", - "links": - { - "lang": "URL1", - "url": "/blog/posts/6-river-systems-case-study" - } - - }, - { - "title":"Transform the Schema", - "summary":"Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", - "logo": "/img/logos/manfred-color.svg", - "links": - { - "lang": "URL1", - "url": "/blog/posts/manfred-case-study" - } - - }, - { - "title":"How Postman uses JSON Schema", - "summary":"Learn how JSON Schema continues to be a crucial component of the Postman API Platform and the API ecosystem.", - "logo": "/img/logos/sponsors/Postman_logo-orange.svg", - "links": - { - "lang": "URL1", - "url": "/blog/posts/postman-case-study" - } - - }, - { - "title":"Using JSON Schema at Remote to", - "summary":"Using JSON Schema at Remote was the first step to solving data validation and form generation problems across all levels at Remote.", - "logo": "/img/logos/remote-logo.png", - "links": - { - "lang": "URL1", - "url": "/blog/posts/remote-case-study" - } - - }, - { - "title":"How Tyler Technologies reduced ", - "summary":"Using JSON Schema at Tyler Technologies meant showing added value to clients could take minutes rather than days or in some cases weeks.", - "logo": "/img/logos/tyler-tech-logo.svg", - "links": - { - "lang": "URL1", - "url": "/blog/posts/tyler-technologies-case-study" - } - - }, - { - "title":"How the W3C Web of Things brings JSON Schema to the Internet of Things", - "summary":"Using JSON Schema at the W3C Web of Things to create an interoperability layer so that different IoT platforms, protocols and standards can operate together", - "logo": "/img/logos/wot-logo.png", - "links": - { - "lang": "URL1", - "url": "/blog/posts/w3c-wot-case-study" - } - - } - ] \ No newline at end of file + { + "title": "JSON Schema oihgfewrnrnvon ", + "summary": "At GitHub's Docs Engineering team, while shipping releases to production 20 times per day.", + "links": { + "lang": "URL1", + "url": "/blog/posts/github-case-study" + } + }, + { + "title": "How JSON Schema", + "summary": "Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", + "logo": "/img/logos/6river-logo.svg", + "links": { + "lang": "URL1", + "url": "/blog/posts/6-river-systems-case-study" + } + }, + { + "title": "Transform the Schema", + "summary": "Explore the powerful impact of JSON Schema on 6 River Systems' fulfillment operations.", + "logo": "/img/logos/manfred-color.svg", + "links": { + "lang": "URL1", + "url": "/blog/posts/manfred-case-study" + } + }, + { + "title": "How Postman uses JSON Schema", + "summary": "Learn how JSON Schema continues to be a crucial component of the Postman API Platform and the API ecosystem.", + "logo": "/img/logos/sponsors/Postman_logo-orange.svg", + "links": { + "lang": "URL1", + "url": "/blog/posts/postman-case-study" + } + }, + { + "title": "Using JSON Schema at Remote to", + "summary": "Using JSON Schema at Remote was the first step to solving data validation and form generation problems across all levels at Remote.", + "logo": "/img/logos/remote-logo.png", + "links": { + "lang": "URL1", + "url": "/blog/posts/remote-case-study" + } + }, + { + "title": "How Tyler Technologies reduced ", + "summary": "Using JSON Schema at Tyler Technologies meant showing added value to clients could take minutes rather than days or in some cases weeks.", + "logo": "/img/logos/tyler-tech-logo.svg", + "links": { + "lang": "URL1", + "url": "/blog/posts/tyler-technologies-case-study" + } + }, + { + "title": "How the W3C Web of Things brings JSON Schema to the Internet of Things", + "summary": "Using JSON Schema at the W3C Web of Things to create an interoperability layer so that different IoT platforms, protocols and standards can operate together", + "logo": "/img/logos/wot-logo.png", + "links": { + "lang": "URL1", + "url": "/blog/posts/w3c-wot-case-study" + } + } +] diff --git a/pages/overview/use-cases/index.page.tsx b/pages/overview/use-cases/index.page.tsx index 8f1561db7..2deda6f78 100644 --- a/pages/overview/use-cases/index.page.tsx +++ b/pages/overview/use-cases/index.page.tsx @@ -3,8 +3,8 @@ import { getLayout } from '~/components/Sidebar'; import Head from 'next/head'; import { SectionContext } from '~/context'; import { Headline1 } from '~/components/Headlines'; -import Card from '~/components/Card' -import data from '~/data/use-cases.json' +import Card from '~/components/Card'; +import data from '~/data/use-cases.json'; export default function Content() { const newTitle = 'Use Cases'; @@ -16,7 +16,12 @@ export default function Content() { {newTitle}

- Welcome to the land of streamlined data! JSON Schema unlocks incredible potential for all your projects. Explore real-world applications showcasing how this powerful tool simplifies data management, ensures consistency, and fosters seamless data exchange across applications. See how JSON Schema empowers you to build robust data structures, saving time and minimizing errors. + Welcome to the land of streamlined data! JSON Schema unlocks incredible + potential for all your projects. Explore real-world applications + showcasing how this powerful tool simplifies data management, ensures + consistency, and fosters seamless data exchange across applications. See + how JSON Schema empowers you to build robust data structures, saving + time and minimizing errors.

{data.map((element, index) => ( @@ -25,12 +30,12 @@ export default function Content() { title={element.title} body={element.summary} link={element.links.url} - headerSize={"medium"} - bodyTextSize={"small"} + headerSize={'medium'} + bodyTextSize={'small'} /> ))}
); } -Content.getLayout = getLayout; \ No newline at end of file +Content.getLayout = getLayout; From 98623e4a6bf5e5e776b8a7231e3e234ac0ca5394 Mon Sep 17 00:00:00 2001 From: Benjamin Granados Date: Mon, 8 Apr 2024 12:28:17 +0200 Subject: [PATCH 3/3] Added some changes to better merge with the dev branch. --- components/Sidebar.tsx | 18 ++++---- data/{casestudies.json => case-studies.json} | 0 data/use-cases.json | 42 ++++--------------- .../index.page.tsx | 2 +- pages/overview/use-cases/index.page.tsx | 1 - pages/overview/welcome/index.page.tsx | 10 +++++ pages/resources/[slug].page.tsx | 4 +- 7 files changed, 29 insertions(+), 48 deletions(-) rename data/{casestudies.json => case-studies.json} (100%) rename pages/overview/{casestudies => case-studies}/index.page.tsx (96%) diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx index 6d660b996..0c04965f2 100644 --- a/components/Sidebar.tsx +++ b/components/Sidebar.tsx @@ -75,7 +75,7 @@ const getDocsPath = [ '/overview/welcome', '/overview/what-is-jsonschema', '/overview/sponsors', - '/overview/casestudies', + '/overview/case-studies', '/overview/similar-technologies', '/overview/use-cases', '/overview/code-of-conduct', @@ -336,15 +336,19 @@ export const DocsNav = () => { id='overview' > + - + + + - - {/* Get Started */} @@ -379,10 +383,6 @@ export const DocsNav = () => { className={classnames('ml-6', { hidden: !active.getStarted })} id='getStarted' > - { alt='eye icon' className='mr-2 w-6' /> - + diff --git a/pages/overview/welcome/index.page.tsx b/pages/overview/welcome/index.page.tsx index 2a769d450..b334f0030 100644 --- a/pages/overview/welcome/index.page.tsx +++ b/pages/overview/welcome/index.page.tsx @@ -48,6 +48,16 @@ export default function Welcome() { url: '/specification', }, }, + { + title: 'Other Resources', + summary: + 'Deserunt et fugiat do adipisicing enim in nostrud Lorem anim ut amet enim.', + logo: '/icons/bookshelf.svg', + links: { + lang: 'URL1', + url: '/resources/books', + }, + }, ]; return ( diff --git a/pages/resources/[slug].page.tsx b/pages/resources/[slug].page.tsx index 723c95271..0ee77241f 100644 --- a/pages/resources/[slug].page.tsx +++ b/pages/resources/[slug].page.tsx @@ -87,11 +87,11 @@ export default function ResourcePageComponent({ data }: { data: DataProps }) { href={item.url} target='_blank' rel='noreferrer' - className='text-xl text-blue-500 underline mb-2' + className='text-[14px] text-blue-500 underline mb-2' > {item.title} -

{item.summary}

+

{item.summary}

))}