Files
monkey-ai-web/src/pages/LogoShowcase/index.jsx
T
zhanjunhao 2aa9d73325 chore(repo): 移除重复版权文件头并纳入共享单测
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
2026-11-20 11:23:49 +08:00

144 lines
5.0 KiB
React

import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
import React from 'react';
import WeeLogo from '../components/common/logo/WeeLogo';
import { Card, Typography } from '@/components/ui';
import { useTranslation } from 'react-i18next';
const { Title, Text } = Typography;
const LogoShowcase = () => {
const { t } = useTranslation();
const logoStyles = [
{
name: 'minimalist',
title: '极简线条',
description: '简洁的线条设计,柔和的渐变动画,适合现代简约界面',
bg: '#f5f5f5',
textColor: '#333',
},
{
name: 'modern',
title: '现代圆润',
description: '圆润的形状设计,浮动动画效果,适合友好亲和的界面',
bg: '#ffffff',
textColor: '#333',
},
{
name: 'tech',
title: '科技未来',
description: '科技感强烈的发光效果,扫描线动画,适合科技创新主题',
bg: '#0a0e27',
textColor: '#5DADE2',
},
{
name: 'wave',
title: '波浪流动',
description: '流畅的波浪效果,液态动画,适合创意动态的界面',
bg: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
textColor: '#ffffff',
},
];
return (
<div className='min-h-screen p-8 bg-gradient-to-br from-slate-50 to-blue-50 dark:from-zinc-900 dark:to-zinc-800'>
<div className='max-w-6xl mx-auto'>
<div className='text-center mb-12'>
<Title heading={1} className='!text-4xl !font-bold !mb-4'>
{t('WeeLogo 风格展示')}
</Title>
<Text className='text-lg text-gray-600 dark:text-gray-300'>
{t('选择最适合你的 Logo 风格')}
</Text>
</div>
<div className='grid grid-cols-1 md:grid-cols-2 gap-8 mb-12'>
{logoStyles.map((style) => (
<Card
key={style.name}
className='overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300 hover:scale-105'
styles={{ body: { padding: 0 } }}
>
<div
className='flex flex-col items-center justify-center p-12'
style={{
background: style.bg,
minHeight: '300px',
}}
>
<WeeLogo style={style.name} size={64} />
</div>
<div className='p-6 bg-white dark:bg-zinc-800'>
<Title heading={3} className='!text-xl !font-semibold !mb-2'>
{t(style.title)}
</Title>
<Text className='text-gray-600 dark:text-gray-300'>
{t(style.description)}
</Text>
<div className='mt-4 p-3 bg-slate-100 dark:bg-zinc-700 rounded font-mono text-sm'>
{'<WeeLogo style="' + style.name + '" size={64} />'}
</div>
</div>
</Card>
))}
</div>
<Card className='p-8 bg-white dark:bg-zinc-800 shadow-lg'>
<Title heading={2} className='!text-2xl !font-bold !mb-6'>
{t('使用方法')}
</Title>
<div className='space-y-6'>
<div>
<Title heading={4} className='!text-lg !font-semibold !mb-3'>
1. {t('导入组件')}
</Title>
<div className='p-4 bg-slate-100 dark:bg-zinc-700 rounded font-mono text-sm overflow-x-auto'>
{I18N_TECHNICAL_TEXT.LOGO_IMPORT_EXAMPLE}
</div>
</div>
<div>
<Title heading={4} className='!text-lg !font-semibold !mb-3'>
2. {t('在 HeaderLogo 中使用')}
</Title>
<div className='p-4 bg-slate-100 dark:bg-zinc-700 rounded font-mono text-sm overflow-x-auto whitespace-pre'>
{`<HeaderLogo
useSvgLogo={true} // 启用 SVG logo
logoStyle="minimalist" // 选择风格
// ... 其他 props
/>`}
</div>
</div>
<div>
<Title heading={4} className='!text-lg !font-semibold !mb-3'>
3. {t('直接使用')}
</Title>
<div className='p-4 bg-slate-100 dark:bg-zinc-700 rounded font-mono text-sm overflow-x-auto'>
{I18N_TECHNICAL_TEXT.LOGO_USAGE_EXAMPLE}
</div>
</div>
</div>
<div className='mt-8 p-4 bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded'>
<Text className='text-blue-800 dark:text-blue-200'>
💡 {t('提示:更多详细信息请查看')}{' '}
<code className='px-2 py-1 bg-blue-100 dark:bg-blue-900 rounded'>
web/src/components/common/logo/README.md
</code>
</Text>
</div>
</Card>
<div className='mt-8 text-center'>
<Text className='text-gray-500 dark:text-gray-400'>
{t('所有 Logo 风格都支持平滑的动画效果和响应式设计')}
</Text>
</div>
</div>
</div>
);
};
export default LogoShowcase;