diff --git a/apps/web/i18n b/apps/web/i18n index b1ae5306..19ebfeef 160000 --- a/apps/web/i18n +++ b/apps/web/i18n @@ -1 +1 @@ -Subproject commit b1ae5306b3852206a8a5febc0ff5cc947d79fba3 +Subproject commit 19ebfeef40cff35eaf748f3210990c74a1cb2470 diff --git a/apps/web/public/images/home/news/8en.png b/apps/web/public/images/home/news/8en.png new file mode 100644 index 00000000..fc2e9d78 Binary files /dev/null and b/apps/web/public/images/home/news/8en.png differ diff --git a/apps/web/public/images/home/news/9en.png b/apps/web/public/images/home/news/9en.png new file mode 100644 index 00000000..92c71cfd Binary files /dev/null and b/apps/web/public/images/home/news/9en.png differ diff --git a/apps/web/src/modules/home/LatestNews/NewsData.json b/apps/web/src/modules/home/LatestNews/NewsData.json index b103d502..8104c43e 100644 --- a/apps/web/src/modules/home/LatestNews/NewsData.json +++ b/apps/web/src/modules/home/LatestNews/NewsData.json @@ -4,20 +4,22 @@ "type": "Blog", "title": "Reflections on the Evaluation and Measurement of Open Source Ecosystem (3) - Dynamics and Statics of Contributors", "title_cn": "开源生态评估与度量的思考(三)——贡献者的动与静", - "img": "/images/home/news/8.png", + "img": "/images/home/news/8en.png", + "img_cn": "/images/home/news/8.png", "url": "/blog/2023/12/09/open-source-eco3/open-source-eco3" }, { "type": "Blog", "title": "Reflections on the Evaluation and Measurement of Open Source Ecosystem (2) - The Multidimensional Space of Evaluation Systems", "title_cn": "开源生态评估与度量的思考(二)——评估体系的多维空间", - "img": "/images/home/news/9.png", + "img": "/images/home/news/9en.png", + "img_cn": "/images/home/news/9.png", "url": "/blog/2023/12/08/open-source-eco2/open-source-eco2" }, { "type": "Event", "title": "OSS Compass Events", - "title_cn": "OSS Compass事件" + "title_cn": "OSS Compass 事件" } ] } diff --git a/apps/web/src/modules/home/LatestNews/index.tsx b/apps/web/src/modules/home/LatestNews/index.tsx index b0302c85..24fb5c97 100644 --- a/apps/web/src/modules/home/LatestNews/index.tsx +++ b/apps/web/src/modules/home/LatestNews/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from 'react'; +import React from 'react'; import classnames from 'classnames'; import { useTranslation } from 'react-i18next'; import jsonData from './NewsData.json'; @@ -12,6 +12,7 @@ const NewsBox = (props: { title: string; titleCn: string; img?: string; + imgCn?: string; url?: string; }) => { const { t, i18n } = useTranslation(); @@ -21,7 +22,7 @@ const NewsBox = (props: { Blog: t('home:blog'), Event: t('home:event'), }; - const { type, title, titleCn, img, url } = props; + const { type, title, titleCn, img, imgCn, url } = props; return (
@@ -54,7 +55,7 @@ const NewsBox = (props: { {''} { >
{t('home:the_latest_from')}
- {data.map(({ type, title, title_cn, img, url }) => { + {data.map(({ type, title, title_cn, img, img_cn, url }) => { return (