chore: 更新素材和组件优化

- 更新展品图片(鲁迅/毛泽东/孙中山/黄炎培/聂耳/张乐平故居)
- 新增点击查看图标、报纸素材
- 优化视频组件、拼图组件、展品组件
- 更新陈云音频资源
- 新增输入验证文档和工具函数
- 组件布局和动画优化

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyidianandClaude Opus 4.8 committed 2026-06-21 21:50:40 +08:00
1 parent 73d02eb62d
commit 73f6df92ce
130 files changed
+2345 -759

No files matched your search

+9 -3
View File
@@ -8,6 +8,8 @@ export interface PuzzlePieceDisplayProps {
pieceId: number
/** 是否显示发光动画 */
showGlow?: boolean
/** 在容器内按真实比例等比贴边展示 */
fitContain?: boolean
/** 自定义类名 */
className?: string
}
@@ -19,14 +21,14 @@ export interface PuzzlePieceDisplayProps {
* - 可以被 ref 引用,用于飞行动画
*/
const PuzzlePieceDisplay = forwardRef<HTMLDivElement, PuzzlePieceDisplayProps>(
({ residence, pieceId, showGlow = true, className = '' }, ref) => {
({ residence, pieceId, showGlow = true, fitContain = false, className = '' }, ref) => {
// 碎片图片路径
const pieceImage = getStaticImage(`puzzle/${residence}/${pieceId}`)
return (
<div
ref={ref}
className={`relative inline-block ${className}`}
className={`relative ${fitContain ? 'h-full w-full overflow-visible' : 'inline-block'} ${className}`}
style={{
animation: showGlow ? 'puzzleGlow 1s ease-in-out infinite' : 'none',
}}
@@ -41,7 +43,11 @@ const PuzzlePieceDisplay = forwardRef<HTMLDivElement, PuzzlePieceDisplayProps>(
}
}
`}</style>
<img src={pieceImage} alt={`碎片 ${pieceId}`} className="w-full" />
<img
src={pieceImage}
alt={`碎片 ${pieceId}`}
className={fitContain ? 'absolute inset-0 block h-full w-full object-contain' : 'w-full'}
/>
</div>
)
}