From f1e64797d96a10af36bb65e4b6887007d34365d8 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 18 Jan 2025 10:08:42 +0800 Subject: [PATCH 1/2] Migrated Image --- src/pages/learn.tsx | 58 +++++++++++++++++++-------------------------- 1 file changed, 25 insertions(+), 33 deletions(-) diff --git a/src/pages/learn.tsx b/src/pages/learn.tsx index 64dba595f93..2e8592b343e 100644 --- a/src/pages/learn.tsx +++ b/src/pages/learn.tsx @@ -12,7 +12,7 @@ import DocLink from "@/components/DocLink" import FeedbackCard from "@/components/FeedbackCard" import { HubHero } from "@/components/Hero" import type { HubHeroProps } from "@/components/Hero/HubHero" -import { Image, type ImageProps } from "@/components/Image" +import { type ImageProps, TwImage } from "@/components/Image" import LeftNavBar from "@/components/LeftNavBar" import MainArticle from "@/components/MainArticle" import { ContentContainer } from "@/components/MdComponents" @@ -121,6 +121,10 @@ const H3 = ({ children, ...props }: HTMLAttributes) => ( ) +const StandarImage = ({ src, alt }: ImageProps) => ( + +) + export const getStaticProps = (async ({ locale }) => { const requiredNamespaces = getRequiredNamespacesForPage("/learn") @@ -197,11 +201,6 @@ const LearnPage = () => { ], } - const height200: Partial = { - height: 200, - style: { width: "auto", objectFit: "cover" }, - } - return (
{ > <> - {t("what-is-ethereum-card-image-alt")} @@ -253,7 +251,7 @@ const LearnPage = () => { > <> - + {t("what-is-eth-card-title")} @@ -266,7 +264,7 @@ const LearnPage = () => { > <> - + {t("what-is-web3-card-title")} @@ -305,10 +303,9 @@ const LearnPage = () => { > <> - {t("what-is-a-wallet-card-alt")} @@ -322,7 +319,7 @@ const LearnPage = () => { > <> - + {t("find-a-wallet-button")} @@ -335,7 +332,7 @@ const LearnPage = () => { > <> - + {t("ethereum-networks-card-button")} @@ -359,7 +356,7 @@ const LearnPage = () => {
- +
@@ -394,7 +391,7 @@ const LearnPage = () => { > <> - + {t("defi-card-button")} @@ -407,7 +404,7 @@ const LearnPage = () => { > <> - + {t("stablecoins-card-button")} @@ -420,11 +417,7 @@ const LearnPage = () => { > <> - + {t("nft-card-button")} @@ -435,7 +428,7 @@ const LearnPage = () => { > <> - + {t("dao-card-button")} @@ -446,7 +439,7 @@ const LearnPage = () => { > <> - + {t("dapp-card-button")} @@ -509,7 +502,7 @@ const LearnPage = () => { > <> - + {t("staking-ethereum-card-button")} @@ -522,7 +515,7 @@ const LearnPage = () => { > <> - + {t("run-a-node-card-title")} @@ -544,7 +537,7 @@ const LearnPage = () => { > <> - + {t("energy-consumption-card-button")} @@ -557,7 +550,7 @@ const LearnPage = () => { > <> - + {t("ethereum-upgrades-card-button")} @@ -570,7 +563,7 @@ const LearnPage = () => { > <> - + {t("ethereum-whitepaper-card-button")} @@ -616,10 +609,9 @@ const LearnPage = () => { > <> - {t("community-hub-card-alt")} @@ -633,7 +625,7 @@ const LearnPage = () => { > <> - + {t("get-involved-card-title")} @@ -646,7 +638,7 @@ const LearnPage = () => { > <> - + {t("online-communities-card-button")} From 0b960b741ac579b7820927210f6d4314aa630ae7 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Sat, 18 Jan 2025 10:22:29 +0800 Subject: [PATCH 2/2] little changes --- src/pages/learn.tsx | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/src/pages/learn.tsx b/src/pages/learn.tsx index 2e8592b343e..77f3d9e5356 100644 --- a/src/pages/learn.tsx +++ b/src/pages/learn.tsx @@ -121,7 +121,7 @@ const H3 = ({ children, ...props }: HTMLAttributes) => ( ) -const StandarImage = ({ src, alt }: ImageProps) => ( +const ImageHeight200 = ({ src, alt }: ImageProps) => ( ) @@ -235,7 +235,7 @@ const LearnPage = () => { > <> - @@ -251,7 +251,7 @@ const LearnPage = () => { > <> - + {t("what-is-eth-card-title")} @@ -264,7 +264,7 @@ const LearnPage = () => { > <> - + {t("what-is-web3-card-title")} @@ -303,7 +303,7 @@ const LearnPage = () => { > <> - @@ -319,7 +319,7 @@ const LearnPage = () => { > <> - + {t("find-a-wallet-button")} @@ -332,7 +332,7 @@ const LearnPage = () => { > <> - + {t("ethereum-networks-card-button")} @@ -391,7 +391,7 @@ const LearnPage = () => { > <> - + {t("defi-card-button")} @@ -404,7 +404,7 @@ const LearnPage = () => { > <> - + {t("stablecoins-card-button")} @@ -417,7 +417,7 @@ const LearnPage = () => { > <> - + {t("nft-card-button")} @@ -428,7 +428,7 @@ const LearnPage = () => { > <> - + {t("dao-card-button")} @@ -439,7 +439,7 @@ const LearnPage = () => { > <> - + {t("dapp-card-button")} @@ -502,7 +502,7 @@ const LearnPage = () => { > <> - + {t("staking-ethereum-card-button")} @@ -515,7 +515,7 @@ const LearnPage = () => { > <> - + {t("run-a-node-card-title")} @@ -537,7 +537,7 @@ const LearnPage = () => { > <> - + {t("energy-consumption-card-button")} @@ -550,7 +550,7 @@ const LearnPage = () => { > <> - + {t("ethereum-upgrades-card-button")} @@ -563,7 +563,7 @@ const LearnPage = () => { > <> - + {t("ethereum-whitepaper-card-button")} @@ -609,7 +609,7 @@ const LearnPage = () => { > <> - @@ -625,7 +625,7 @@ const LearnPage = () => { > <> - + {t("get-involved-card-title")} @@ -638,7 +638,7 @@ const LearnPage = () => { > <> - + {t("online-communities-card-button")}