Spaces:
Running
Running
Update src/components/logo/Logo.scss
Browse files- src/components/logo/Logo.scss +18 -56
src/components/logo/Logo.scss
CHANGED
|
@@ -1,60 +1,22 @@
|
|
| 1 |
-
// src/components/logo/Logo.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
isAi: boolean;
|
| 11 |
-
isActive: boolean;
|
| 12 |
-
speakingVolume?: number;
|
| 13 |
-
isUserSpeaking?: boolean;
|
| 14 |
}
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
// رنگ بخش انسان در حالت عادی کمی خاکستری و در هنگام صحبت سفید کامل است
|
| 23 |
-
const humanColor = isUserSpeaking ? "#FFFFFF" : "#E2E8F0";
|
| 24 |
-
const aiColor = "#FFFFFF";
|
| 25 |
-
|
| 26 |
-
return (
|
| 27 |
-
<div className={cn("w-fit flex items-center justify-center")}>
|
| 28 |
-
<div className={"hidden bg-green-200 bg-green-300 bg-green-400 bg-blue-200 bg-blue-300 bg-blue-400 dark:bg-green-700 dark:bg-green-600 dark:bg-green-500 dark:bg-blue-700 dark:bg-blue-600 dark:bg-blue-500"}>
|
| 29 |
-
color pre-loader
|
| 30 |
-
</div>
|
| 31 |
-
|
| 32 |
-
<div className={cn("relative", isMini ? "w-[80px] h-[80px]" : "w-[200px] h-[200px]")}>
|
| 33 |
-
<>
|
| 34 |
-
<div
|
| 35 |
-
className={cn(
|
| 36 |
-
"absolute rounded-full opacity-50",
|
| 37 |
-
"ai-speaking-ripple", // کلاس انیمیشن موج AI
|
| 38 |
-
isAi ? "bg-green-200 dark:bg-green-700" : "bg-blue-200 dark:bg-blue-700",
|
| 39 |
-
isMini ? "inset-[10px]" : "inset-[40px]",
|
| 40 |
-
)}
|
| 41 |
-
style={{ '--ai-voice-scale': aiVoiceScale } as React.CSSProperties}
|
| 42 |
-
/>
|
| 43 |
-
|
| 44 |
-
<div className={cn("absolute inset-0 rounded-full opacity-50", isAi ? "bg-green-200 dark:bg-green-700" : "bg-blue-200 dark:bg-blue-700")} />
|
| 45 |
-
<div className={cn("absolute rounded-full opacity-50", isAi ? "bg-green-300 dark:bg-green-600" : "bg-blue-300 dark:bg-blue-600", isMini ? "inset-[5px]" : "inset-[20px]")} />
|
| 46 |
-
<div className={cn("absolute rounded-full opacity-50", isAi ? "bg-green-400 dark:bg-green-500" : "bg-blue-400 dark:bg-blue-500", isMini ? "inset-[12px]" : "inset-[50px]")} />
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
className: cn({ 'user-speaking': isUserSpeaking }), // اعمال کلاس انیمیشن
|
| 52 |
-
humanColor: humanColor, // ارسال رنگ برای بخش انسان
|
| 53 |
-
aiColor: aiColor, // ارسال رنگ برای بخش ربات
|
| 54 |
-
})}
|
| 55 |
-
</div>
|
| 56 |
-
</>
|
| 57 |
-
</div>
|
| 58 |
-
</div>
|
| 59 |
-
);
|
| 60 |
}
|
|
|
|
| 1 |
+
// src/components/logo/Logo.scss
|
| 2 |
+
|
| 3 |
+
@keyframes user-pulse-animation {
|
| 4 |
+
0%, 100% {
|
| 5 |
+
transform: scale(1);
|
| 6 |
+
}
|
| 7 |
+
50% {
|
| 8 |
+
transform: scale(1.1);
|
| 9 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
}
|
| 11 |
|
| 12 |
+
.user-speaking {
|
| 13 |
+
.human-part {
|
| 14 |
+
animation: user-pulse-animation 1.5s infinite ease-in-out;
|
| 15 |
+
transform-origin: center;
|
| 16 |
+
}
|
| 17 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
.ai-speaking-ripple {
|
| 20 |
+
transform: scale(var(--ai-voice-scale, 1));
|
| 21 |
+
transition: transform 0.15s ease-out;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
}
|