diff --git a/i18n/en/code.json b/i18n/en/code.json index 9df8718..0171d6b 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -293,7 +293,7 @@ "message": "Open Source Analysis Platform" }, "homepage.getStarted": { - "message": "OpenDigger Introduction in 3min ⏱️" + "message": "OpenDigger Introduction in 5 min 🔊" }, "features.richMetrics.title": { "message": "Rich Metrics" diff --git a/i18n/zh/code.json b/i18n/zh/code.json index cbbbeaf..e21051d 100644 --- a/i18n/zh/code.json +++ b/i18n/zh/code.json @@ -293,7 +293,7 @@ "message": "开源数据分析平台" }, "homepage.getStarted": { - "message": "OpenDigger 3 分钟简介 ⏱️" + "message": "OpenDigger 5 分钟简介 🔊" }, "features.richMetrics.title": { "message": "丰富的指标实现" diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 472157c..daef289 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,24 +1,34 @@ +import React, { useRef } from 'react'; import clsx from 'clsx'; -import Link from '@docusaurus/Link'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import HomepageFeatures from '../components/HomepageFeatures'; import Layout from '@theme/Layout'; import Translate, { translate } from '@docusaurus/Translate'; import styles from './index.module.css'; +import Link from '@docusaurus/Link'; function HomepageHeader() { + const audioRef = useRef(null); + + const handleAudioPlay = () => { + if (audioRef.current) { + audioRef.current.play(); + } + }; + return (
Logo {/* 插入图片 */}

{translate({ id: 'homepage.tagLine' })}

-
+
+ onClick={handleAudioPlay}> +
diff --git a/static/audio/intro_en.mp3 b/static/audio/intro_en.mp3 new file mode 100644 index 0000000..165730b Binary files /dev/null and b/static/audio/intro_en.mp3 differ