From 2089604dbec76c429c3d43014b70e32f8098885e Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Fri, 8 Aug 2025 00:15:29 +0300 Subject: [PATCH 1/5] adapt to shad cn --- pages/index.page.tsx | 491 +++++++++++++++++++++++-------------------- 1 file changed, 267 insertions(+), 224 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 95fb51ddd..82fa84d55 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -1,3 +1,4 @@ +/* eslint-disable linebreak-style */ import React, { useEffect, useState } from 'react'; import { getLayout } from '../components/SiteLayout'; import { DocSearch } from '@docsearch/react'; @@ -14,6 +15,8 @@ import { } from '../lib/calendarUtils'; import { Headline4 } from '~/components/Headlines'; import { GetStaticProps } from 'next'; +import { Button } from '~/components/ui/button'; +import { Card, CardContent, CardTitle } from '~/components/ui/card'; /* eslint-disable */ import ical from 'node-ical'; @@ -23,7 +26,8 @@ import { useTheme } from 'next-themes'; const algoliaAppId: string = process.env.NEXT_PUBLIC_ALGOLIA_APP_ID as string; const algoliaApiKey: string = process.env.NEXT_PUBLIC_ALGOLIA_API_KEY as string; -/* eslint-enable */ + + export const getStaticProps: GetStaticProps = async () => { const files = fs.readdirSync(PATH); const blogPosts = files @@ -171,18 +175,18 @@ const Home = (props: any) => {
- - Getting started - - Getting started + +
@@ -251,49 +255,57 @@ const Home = (props: any) => { {/* Feature 4 section*/}
-
-

- Streamline testing and validation -

-

- Simplify your validation logic to reduce your code’s complexity - and save time on development. Define constraints for your data - structures to catch and prevent errors, inconsistencies, and - invalid data. -

-
-
-

- Exchange data seamlessly -

-

- Establish a common language for data exchange, no matter the - scale or complexity of your project. Define precise validation - rules for your data structures to create shared understanding - and increase interoperability across different systems and - platforms. -

-
-
-

- Document your data -

-

- Create a clear, standardized representation of your data to - improve understanding and collaboration among developers, - stakeholders, and collaborators. -

-
-
-

- Vibrant tooling ecosystem -

-

- Adopt JSON Schema with an expansive range of community-driven - tools, libraries, and frameworks across many programming - languages. -

-
+ + + + Streamline testing and validation + +

+ Simplify your validation logic to reduce your code's + complexity and save time on development. Define constraints + for your data structures to catch and prevent errors, + inconsistencies, and invalid data. +

+
+
+ + + + Exchange data seamlessly + +

+ Establish a common language for data exchange, no matter the + scale or complexity of your project. Define precise validation + rules for your data structures to create shared understanding + and increase interoperability across different systems and + platforms. +

+
+
+ + + + Document your data + +

+ Create a clear, standardized representation of your data to + improve understanding and collaboration among developers, + stakeholders, and collaborators. +

+
+
+ + + + Vibrant tooling ecosystem + +

+ Adopt JSON Schema with an expansive range of community-driven + tools, libraries, and frameworks across many programming + languages. +

+
+
@@ -302,13 +314,14 @@ const Home = (props: any) => {

Start learning JSON Schema

- - Read the docs - + + Read the docs + + @@ -336,13 +349,14 @@ const Home = (props: any) => { Generators, Linters, and other JSON Schema Utilities made by this amazing Community.

- - Explore - + + Explore + + @@ -363,173 +377,194 @@ const Home = (props: any) => {

-
- -

- Join the JSON Schema Slack Workspace! + + + + + Join the JSON Schema Slack Workspace! + {isClient && ( + <> + slack + + )} + {isClient && ( <> slack )} -

- {isClient && ( - <> - slack-json-schema - - )} - {/*

Event

*/} -

- Join our Slack to ask questions, get feedback on your - projects, and connect with +5000 practitioners and experts. -

- - + + + {/* BlogPost Data */} + + + + + The JSON Schema Blog + {isClient && ( <> slack )} - Join Slack - - -
- {/* BlogPost Data */} -
- -

- The JSON Schema Blog -

- {isClient && ( - <> - blog + {' '} + {blogPosts[0].frontmatter.title} + +
+ - - )} -

- {' '} - {blogPosts[0].frontmatter.title} -

-
- -
+
-
- {(blogPosts[0].frontmatter.authors || []).map( - (author: any, index: number) => { - return ( -
- ); - }, - )} -
-

- {blogPosts[0].frontmatter.authors.length > 2 ? ( - <> - {blogPosts[0].frontmatter.authors - .slice(0, 2) - .map((author: any, index: number) => ( - - {author.name} - {index === 0 && ' & '} - - ))} - {'...'} - - ) : ( - blogPosts[0].frontmatter.authors.map((author: any) => ( - {author.name} - )) - )} -

- -
- - {blogPosts[0].frontmatter.date} · {timeToRead}{' '} - min read - +
+ {(blogPosts[0].frontmatter.authors || []).map( + (author: any, index: number) => { + return ( +
+ ); + }, + )} +
+

+ {blogPosts[0].frontmatter.authors.length > 2 ? ( + <> + {blogPosts[0].frontmatter.authors + .slice(0, 2) + .map((author: any, index: number) => ( + + {author.name} + {index === 0 && ' & '} + + ))} + {'...'} + + ) : ( + blogPosts[0].frontmatter.authors.map( + (author: any) => ( + {author.name} + ), + ) + )} +

+ +
+ + {blogPosts[0].frontmatter.date} · {timeToRead}{' '} + min read + +
-
- - -
- - Read more{' '} -
-
-
-
-

- JSON Schema Community Meetings & Events -

-

- We hold monthly Office Hours and Open Community Working - Meetings. Office Hours are every first Tuesday of the month - and by appointment. Open Community Working Meetings are every - third Monday of the month at 12:00 PT. -

- -
+ + +
+ + + + JSON Schema Community Meetings & Events + +

+ We hold monthly Office Hours and Open Community Working + Meetings. Office Hours are every first Tuesday of the month + and by appointment. Open Community Working Meetings are + every third Monday of the month at 12:00 PT. +

+ +
+
Upcoming events @@ -554,14 +589,18 @@ const Home = (props: any) => {
- - View Calendar - + + View Calendar + +
@@ -574,13 +613,17 @@ const Home = (props: any) => {

Start contributing to JSON Schema

- - Contribute - + + Contribute + +
From b4d0a849dc947b5309619801310eab4b710ea95a Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Fri, 8 Aug 2025 10:50:12 +0300 Subject: [PATCH 2/5] adjusting hover effects for the cards --- pages/index.page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 82fa84d55..cc0d2e133 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -255,7 +255,7 @@ const Home = (props: any) => {
{/* Feature 4 section*/}
- + Streamline testing and validation @@ -268,7 +268,7 @@ const Home = (props: any) => {

- + Exchange data seamlessly @@ -282,7 +282,7 @@ const Home = (props: any) => {

- + Document your data @@ -294,7 +294,7 @@ const Home = (props: any) => {

- + Vibrant tooling ecosystem From d3aba1357119c89d1c1e037b398afa9576edc155 Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Fri, 8 Aug 2025 10:54:42 +0300 Subject: [PATCH 3/5] fixing button positioning --- pages/index.page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index cc0d2e133..906ebbfa6 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -538,10 +538,10 @@ const Home = (props: any) => { and by appointment. Open Community Working Meetings are every third Monday of the month at 12:00 PT.

-
+ -
- - - - - Join the JSON Schema Slack Workspace! - {isClient && ( - <> - slack - - )} - - {isClient && ( - <> - slack-json-schema - + {/* Community Section - Improved Layout */} +
+
+ {/* Upcoming Events - Calendar Section */} + + + {/* Blog Card */} + + + + + The JSON Schema Blog + + {isClient && ( - <> +
slack - +
)} - Join Slack - - -
-
- {/* BlogPost Data */} - - - - - The JSON Schema Blog - - {isClient && ( - <> - blog + {blogPosts[0].frontmatter.title} + + +
+ - - )} -

- {' '} - {blogPosts[0].frontmatter.title} -

-
- -
- -
- {(blogPosts[0].frontmatter.authors || []).map( - (author: any, index: number) => { - return ( -
- ); - }, - )} -
-

- {blogPosts[0].frontmatter.authors.length > 2 ? ( - <> - {blogPosts[0].frontmatter.authors - .slice(0, 2) - .map((author: any, index: number) => ( - - {author.name} - {index === 0 && ' & '} - - ))} - {'...'} - - ) : ( - blogPosts[0].frontmatter.authors.map( - (author: any) => ( - {author.name} - ), - ) - )} -

+
-
- - {blogPosts[0].frontmatter.date} · {timeToRead}{' '} - min read - + {/* Author Info */} +
+
+ {(blogPosts[0].frontmatter.authors || []).slice(0, 3).map( + (author: any, index: number) => ( +
+ ), + )} +
+
+

+ {blogPosts[0].frontmatter.authors.length > 2 ? ( + <> + {blogPosts[0].frontmatter.authors + .slice(0, 2) + .map((author: any, index: number) => ( + + {author.name} + {index === 0 && ' & '} + + ))} + {'...'} + + ) : ( + blogPosts[0].frontmatter.authors.map( + (author: any) => ( + {author.name} + ), + ) + )} +

+

+ {blogPosts[0].frontmatter.date} · {timeToRead} min read +

-
- + -
-
- - -
- - - - JSON Schema Community Meetings & Events - -

- We hold monthly Office Hours and Open Community Working - Meetings. Office Hours are every first Tuesday of the month - and by appointment. Open Community Working Meetings are - every third Monday of the month at 12:00 PT. -

-
+ + + + {/* Slack Card - Third Column with Community Meetings Below */} +
+ + +
+ {isClient && ( + slack + )} + + Join the JSON Schema Slack Workspace! + +
+ + + {isClient && ( +
+ slack-json-schema +
+ )} + +

+ Join our Slack to ask questions, get feedback on your + projects, and connect with +5000 practitioners and experts. +

+ + +
+
- -
- - -
-
- Upcoming events -
-
    - {props.datesInfo.map((event: any, index: any) => ( -
  • -
    -

    - {event.day} -

    -
    -

    {event.title}

    -

    - {event.time} ({event.timezone}) -

    -
    -
    -
  • - ))} -
-
-
+ + Open Community Working Meetings + + - + +
+ +
From 21199431e2905c674bf9d028ccbff8f3e090501b Mon Sep 17 00:00:00 2001 From: Idan Levi <29idan29@gmail.com> Date: Fri, 8 Aug 2025 20:27:25 +0300 Subject: [PATCH 5/5] adjusting the block --- pages/index.page.tsx | 401 ++++++++++++++++++++++--------------------- 1 file changed, 202 insertions(+), 199 deletions(-) diff --git a/pages/index.page.tsx b/pages/index.page.tsx index 2424b2aa7..165bf47e3 100644 --- a/pages/index.page.tsx +++ b/pages/index.page.tsx @@ -378,12 +378,207 @@ const Home = (props: any) => {
{/* Community Section - Improved Layout */}
-
- {/* Upcoming Events - Calendar Section */} -
- - Upcoming Events - +
+ {/* Slack Card - First Column with Community Meetings Below */} +
+ + +
+ {isClient && ( + slack + )} + + Join the JSON Schema Slack Workspace! + +
+ + + {isClient && ( +
+ slack-json-schema +
+ )} + +

+ Join our Slack to ask questions, get feedback on your + projects, and connect with +5000 practitioners and experts. +

+ + + +
+
+ + {/* Community Meetings & Events - Now Below Slack */} + + + + Community Meetings & Events + + +

+ We hold monthly Office Hours and Open Community Working + Meetings. Office Hours are every first Tuesday of the month + and by appointment. Open Community Working Meetings are + every third Monday of the month at 12:00 PT. +

+ + +
+
+
+ + {/* Blog Card */} + + + + + The JSON Schema Blog + + + {isClient && ( +
+ blog +
+ )} + +

+ {blogPosts[0].frontmatter.title} +

+ +
+ +
+ + {/* Author Info */} +
+
+ {(blogPosts[0].frontmatter.authors || []).slice(0, 3).map( + (author: any, index: number) => ( +
+ ), + )} +
+
+

+ {blogPosts[0].frontmatter.authors.length > 2 ? ( + <> + {blogPosts[0].frontmatter.authors + .slice(0, 2) + .map((author: any, index: number) => ( + + {author.name} + {index === 0 && ' & '} + + ))} + {'...'} + + ) : ( + blogPosts[0].frontmatter.authors.map( + (author: any) => ( + {author.name} + ), + ) + )} +

+

+ {blogPosts[0].frontmatter.date} · {timeToRead} min read +

+
+
+ + + + + + + {/* Upcoming Events - Calendar Section - Now Third Column */} +
+
+ + Upcoming Events + +
{props.datesInfo.length > 0 ? ( @@ -391,7 +586,7 @@ const Home = (props: any) => { {props.datesInfo.slice(0, 5).map((event: any, index: any) => (
  • -
    +
    {event.day}
    @@ -433,198 +628,6 @@ const Home = (props: any) => {
    - - {/* Blog Card */} - - - - - The JSON Schema Blog - - - {isClient && ( -
    - blog -
    - )} - -

    - {blogPosts[0].frontmatter.title} -

    - -
    - -
    - - {/* Author Info */} -
    -
    - {(blogPosts[0].frontmatter.authors || []).slice(0, 3).map( - (author: any, index: number) => ( -
    - ), - )} -
    -
    -

    - {blogPosts[0].frontmatter.authors.length > 2 ? ( - <> - {blogPosts[0].frontmatter.authors - .slice(0, 2) - .map((author: any, index: number) => ( - - {author.name} - {index === 0 && ' & '} - - ))} - {'...'} - - ) : ( - blogPosts[0].frontmatter.authors.map( - (author: any) => ( - {author.name} - ), - ) - )} -

    -

    - {blogPosts[0].frontmatter.date} · {timeToRead} min read -

    -
    -
    - - - - - - - {/* Slack Card - Third Column with Community Meetings Below */} -
    - - -
    - {isClient && ( - slack - )} - - Join the JSON Schema Slack Workspace! - -
    - - - {isClient && ( -
    - slack-json-schema -
    - )} - -

    - Join our Slack to ask questions, get feedback on your - projects, and connect with +5000 practitioners and experts. -

    - - - -
    -
    - - {/* Community Meetings & Events - Now Below Slack */} - - - - Community Meetings & Events - - -

    - We hold monthly Office Hours and Open Community Working - Meetings. Office Hours are every first Tuesday of the month - and by appointment. Open Community Working Meetings are - every third Monday of the month at 12:00 PT. -

    - - -
    -
    -