From ee7f95ac8a64df19db15e36cdf18a417f9099e99 Mon Sep 17 00:00:00 2001 From: "deepanshu.bone" <123951725+29deepanshutyagi@users.noreply.github.com> Date: Sat, 18 Jan 2025 17:32:20 +0530 Subject: [PATCH] Fixed #824 - img tags replaced by Image (#1197) * img tags replace to Image * Refactor Card component to use Image component for displaying images * fix the prettier format * Refactor Card component to use Image component with updated width and className * Refactor image sizes and classNames in StyledMarkdown and index.page.tsx * Refactor image size in Sidebar component * Refactor image classNames in Layout and StyledMarkdown components * Refactor classNames in JsonEditor and StyledMarkdown components --- components/Card.tsx | 10 +- components/DarkModeToggle.tsx | 9 +- components/GettingStarted.tsx | 15 +- components/JsonEditor.tsx | 40 ++- components/Layout.tsx | 55 +++- components/Sidebar.tsx | 34 ++- components/StyledMarkdown.tsx | 46 ++- pages/blog/index.page.tsx | 13 +- pages/blog/posts/[slug].page.tsx | 9 +- pages/community/index.page.tsx | 5 +- pages/index.page.tsx | 271 +++++++++++++++--- pages/tools/components/ToolingDetailModal.tsx | 10 +- pages/tools/index.page.tsx | 15 +- 13 files changed, 434 insertions(+), 98 deletions(-) diff --git a/components/Card.tsx b/components/Card.tsx index 5900682d3..9d0477ced 100644 --- a/components/Card.tsx +++ b/components/Card.tsx @@ -1,6 +1,7 @@ import React from 'react'; import Link from 'next/link'; import TextTruncate from 'react-text-truncate'; +import Image from 'next/image'; export interface CardProps { title: string; body: string; @@ -36,8 +37,11 @@ const CardBody = ({
{details[0]}
{details[1] ? ( - +
@@ -287,10 +309,17 @@ const Home = (props: any) => {
{/* SidebySide section*/}
Join our Slack to ask questions, get feedback on your
@@ -346,10 +393,17 @@ const Home = (props: any) => {
href='https://json-schema.org/slack'
className='flex items-center '
>
-
+ {isClient && (
+ <>
+
Explore the JSON Schema Ecosystem
@@ -329,12 +358,30 @@ const Home = (props: any) => {
Join the JSON Schema Slack Workspace!
-
+ {isClient && (
+ <>
+
-
+ {isClient && (
+ <>
+ Event
*/}
The JSON Schema Blog
-
+ {isClient && (
+ <>
+
{' '}
{blogPosts[0].frontmatter.title}
@@ -604,54 +665,154 @@ const Home = (props: any) => {
target='_blank'
rel='noreferrer'
>
-
+ {isClient && (
+ <>
+
@@ -199,9 +203,12 @@ export default function ToolingPage({ target='_blank' rel='noreferrer' > -