cb9d836227
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
309 lines
7.8 KiB
React
309 lines
7.8 KiB
React
import React from 'react';
|
|
import './DolphinLogo.css';
|
|
|
|
/**
|
|
* Dolphin Logo Component - 海豚动画图标
|
|
* @param {number} size - Logo 大小(像素),默认 32
|
|
* @param {string} className - 额外的 CSS 类名
|
|
* @param {boolean} animated - 是否启用动画,默认 true
|
|
*/
|
|
const DolphinLogo = ({ size = 32, className = '', animated = true }) => {
|
|
return (
|
|
<svg
|
|
viewBox='0 0 100 100'
|
|
xmlns='http://www.w3.org/2000/svg'
|
|
width={size}
|
|
height={size}
|
|
className={`dolphin-logo ${animated ? 'dolphin-animated' : ''} ${className}`}
|
|
>
|
|
<defs>
|
|
{/* 主渐变 - 海洋蓝 */}
|
|
<linearGradient
|
|
id='dolphinGradient'
|
|
x1='0%'
|
|
y1='0%'
|
|
x2='100%'
|
|
y2='100%'
|
|
>
|
|
<stop offset='0%' stopColor='#4facfe'>
|
|
<animate
|
|
attributeName='stop-color'
|
|
values='#4facfe;#00f2fe;#38bdf8;#4facfe'
|
|
dur='4s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</stop>
|
|
<stop offset='50%' stopColor='#00c6fb'>
|
|
<animate
|
|
attributeName='stop-color'
|
|
values='#00c6fb;#4facfe;#00f2fe;#00c6fb'
|
|
dur='4s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</stop>
|
|
<stop offset='100%' stopColor='#005bea'>
|
|
<animate
|
|
attributeName='stop-color'
|
|
values='#005bea;#0083b0;#4facfe;#005bea'
|
|
dur='4s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</stop>
|
|
</linearGradient>
|
|
|
|
{/* 腹部渐变 - 浅色 */}
|
|
<linearGradient id='bellyGradient' x1='0%' y1='0%' x2='0%' y2='100%'>
|
|
<stop offset='0%' stopColor='#e0f7ff' />
|
|
<stop offset='100%' stopColor='#b8e8fc' />
|
|
</linearGradient>
|
|
|
|
{/* 光泽效果 */}
|
|
<linearGradient id='shineGradient' x1='0%' y1='0%' x2='100%' y2='100%'>
|
|
<stop offset='0%' stopColor='#ffffff' stopOpacity='0.6' />
|
|
<stop offset='50%' stopColor='#ffffff' stopOpacity='0.2' />
|
|
<stop offset='100%' stopColor='#ffffff' stopOpacity='0' />
|
|
</linearGradient>
|
|
|
|
{/* 阴影滤镜 */}
|
|
<filter id='dolphinShadow' x='-20%' y='-20%' width='140%' height='140%'>
|
|
<feDropShadow
|
|
dx='0'
|
|
dy='2'
|
|
stdDeviation='2'
|
|
floodColor='#0066cc'
|
|
floodOpacity='0.3'
|
|
/>
|
|
</filter>
|
|
|
|
{/* 水波纹效果 */}
|
|
<filter id='waterRipple'>
|
|
<feTurbulence
|
|
type='fractalNoise'
|
|
baseFrequency='0.02'
|
|
numOctaves='2'
|
|
result='turbulence'
|
|
>
|
|
<animate
|
|
attributeName='baseFrequency'
|
|
values='0.02;0.025;0.02'
|
|
dur='3s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</feTurbulence>
|
|
<feDisplacementMap
|
|
in='SourceGraphic'
|
|
in2='turbulence'
|
|
scale='1'
|
|
xChannelSelector='R'
|
|
yChannelSelector='G'
|
|
/>
|
|
</filter>
|
|
</defs>
|
|
|
|
{/* 海豚主体 */}
|
|
<g className='dolphin-body' filter='url(#dolphinShadow)'>
|
|
{/* 身体 */}
|
|
<path
|
|
className='dolphin-main'
|
|
d='M 75 45
|
|
C 80 35, 78 25, 70 22
|
|
C 62 19, 50 20, 42 25
|
|
C 34 30, 25 38, 20 48
|
|
C 15 58, 18 68, 28 72
|
|
C 38 76, 55 74, 68 65
|
|
C 78 58, 82 50, 75 45
|
|
Z'
|
|
fill='url(#dolphinGradient)'
|
|
/>
|
|
|
|
{/* 腹部 */}
|
|
<path
|
|
className='dolphin-belly'
|
|
d='M 68 52
|
|
C 65 58, 55 65, 42 66
|
|
C 32 67, 25 63, 24 56
|
|
C 23 50, 28 44, 38 42
|
|
C 50 40, 62 44, 68 52
|
|
Z'
|
|
fill='url(#bellyGradient)'
|
|
opacity='0.9'
|
|
/>
|
|
|
|
{/* 嘴巴/吻部 */}
|
|
<path
|
|
className='dolphin-snout'
|
|
d='M 70 22
|
|
C 75 20, 82 22, 88 28
|
|
C 85 30, 78 30, 72 28
|
|
C 70 26, 70 24, 70 22
|
|
Z'
|
|
fill='url(#dolphinGradient)'
|
|
/>
|
|
|
|
{/* 背鳍 */}
|
|
<path
|
|
className='dolphin-fin'
|
|
d='M 45 25
|
|
C 48 18, 52 12, 50 8
|
|
C 48 12, 44 18, 42 25
|
|
Z'
|
|
fill='url(#dolphinGradient)'
|
|
/>
|
|
|
|
{/* 胸鳍 */}
|
|
<path
|
|
className='dolphin-pectoral'
|
|
d='M 38 55
|
|
C 32 58, 25 65, 20 70
|
|
C 22 68, 28 62, 35 58
|
|
C 36 56, 37 55, 38 55
|
|
Z'
|
|
fill='url(#dolphinGradient)'
|
|
/>
|
|
|
|
{/* 尾鳍 */}
|
|
<path
|
|
className='dolphin-tail'
|
|
d='M 20 48
|
|
C 14 42, 8 38, 5 42
|
|
C 8 45, 12 48, 15 52
|
|
M 20 48
|
|
C 14 54, 8 58, 5 54
|
|
C 8 52, 12 50, 15 48
|
|
Z'
|
|
fill='url(#dolphinGradient)'
|
|
/>
|
|
|
|
{/* 眼睛 */}
|
|
<ellipse
|
|
className='dolphin-eye'
|
|
cx='62'
|
|
cy='32'
|
|
rx='3'
|
|
ry='3.5'
|
|
fill='#1a365d'
|
|
/>
|
|
|
|
{/* 眼睛高光 */}
|
|
<ellipse
|
|
className='dolphin-eye-highlight'
|
|
cx='63'
|
|
cy='31'
|
|
rx='1'
|
|
ry='1.2'
|
|
fill='#ffffff'
|
|
/>
|
|
|
|
{/* 身体光泽 */}
|
|
<path
|
|
className='dolphin-shine'
|
|
d='M 55 28
|
|
C 60 26, 65 28, 68 32
|
|
C 65 30, 58 28, 52 30
|
|
C 50 31, 52 29, 55 28
|
|
Z'
|
|
fill='url(#shineGradient)'
|
|
/>
|
|
|
|
{/* 微笑线条 */}
|
|
<path
|
|
className='dolphin-smile'
|
|
d='M 75 28 Q 80 30, 84 28'
|
|
fill='none'
|
|
stroke='#1a365d'
|
|
strokeWidth='1'
|
|
strokeLinecap='round'
|
|
opacity='0.5'
|
|
/>
|
|
</g>
|
|
|
|
{/* 水花气泡 */}
|
|
<g className='bubbles'>
|
|
<circle
|
|
className='bubble bubble-1'
|
|
cx='15'
|
|
cy='75'
|
|
r='2'
|
|
fill='#4facfe'
|
|
opacity='0.6'
|
|
>
|
|
<animate
|
|
attributeName='cy'
|
|
values='75;65;55'
|
|
dur='2s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='opacity'
|
|
values='0.6;0.3;0'
|
|
dur='2s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='r'
|
|
values='2;3;2'
|
|
dur='2s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</circle>
|
|
<circle
|
|
className='bubble bubble-2'
|
|
cx='22'
|
|
cy='80'
|
|
r='1.5'
|
|
fill='#00c6fb'
|
|
opacity='0.5'
|
|
>
|
|
<animate
|
|
attributeName='cy'
|
|
values='80;68;56'
|
|
dur='2.5s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='opacity'
|
|
values='0.5;0.2;0'
|
|
dur='2.5s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='r'
|
|
values='1.5;2.5;1.5'
|
|
dur='2.5s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</circle>
|
|
<circle
|
|
className='bubble bubble-3'
|
|
cx='10'
|
|
cy='82'
|
|
r='1'
|
|
fill='#38bdf8'
|
|
opacity='0.4'
|
|
>
|
|
<animate
|
|
attributeName='cy'
|
|
values='82;72;62'
|
|
dur='3s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='opacity'
|
|
values='0.4;0.2;0'
|
|
dur='3s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
<animate
|
|
attributeName='r'
|
|
values='1;2;1'
|
|
dur='3s'
|
|
repeatCount='indefinite'
|
|
/>
|
|
</circle>
|
|
</g>
|
|
</svg>
|
|
);
|
|
};
|
|
|
|
export default DolphinLogo;
|