chore: 更新素材和组件优化
- 更新展品图片(鲁迅/毛泽东/孙中山/黄炎培/聂耳/张乐平故居) - 新增点击查看图标、报纸素材 - 优化视频组件、拼图组件、展品组件 - 更新陈云音频资源 - 新增输入验证文档和工具函数 - 组件布局和动画优化 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
73d02eb62d
commit
73f6df92ce
130 files changed
+2345
-759
No files matched your search
+22
-5
@@ -4,9 +4,22 @@ import { getBackgroundImage, getPublicPath, getStaticImage } from '@/lib/utils'
|
||||
import { Image, Video } from '@/components'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
|
||||
const INTRO_VIEWED_KEY = 'home-intro-viewed'
|
||||
|
||||
const Home = () => {
|
||||
const navigate = useNavigate()
|
||||
const [showIntroVideo, setShowIntroVideo] = useState(false)
|
||||
const [introViewed, setIntroViewed] = useState(
|
||||
() => localStorage.getItem(INTRO_VIEWED_KEY) === 'true'
|
||||
)
|
||||
|
||||
const handleIntroClick = () => {
|
||||
setShowIntroVideo(true)
|
||||
if (!introViewed) {
|
||||
setIntroViewed(true)
|
||||
localStorage.setItem(INTRO_VIEWED_KEY, 'true')
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -23,11 +36,15 @@ const Home = () => {
|
||||
exit={{ opacity: 0, scale: 0.92, x: 24 }}
|
||||
transition={{ duration: 0.22, ease: 'easeOut' }}
|
||||
>
|
||||
<Image
|
||||
src={getStaticImage('home/课程简介')}
|
||||
button
|
||||
onClick={() => setShowIntroVideo(true)}
|
||||
/>
|
||||
<div className="relative">
|
||||
<Image src={getStaticImage('home/课程简介')} button onClick={handleIntroClick} />
|
||||
{!introViewed && (
|
||||
<Image
|
||||
className="absolute right-full top-1/2 z-20 mr-2 h-28 w-34 -translate-y-1/2 animate-finger-shake pointer-events-none"
|
||||
src={getStaticImage('components/点击查看')}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
|
||||
Reference in new issue
Block a user