Spaces:
Sleeping
Sleeping
axeronis commited on
Commit ·
2ac27a5
1
Parent(s): 2f6cae6
perf: Performance optimizations and Nova voice integration
Browse files- Updated Hero audio to Nova.mp3 greeting voice
- Changed Hero CTA to '👋 Знакомьтесь, это Нова'
- Optimized PricingCard with spring config (stiffness: 150, damping: 15)
- Added GPU hints (willChange: transform) to reduce animation lag
- Simplified trust logos marquee (reduced duplications, added will-change)
- Fixed pricing card interactivity with better spring physics
frontend/app/page.tsx
CHANGED
|
@@ -94,7 +94,7 @@ const T = {
|
|
| 94 |
pain3title: '$0', pain3desc: 'Столько вы заработаете с клиента, которого забыли дожать. AI не забывает никогда.',
|
| 95 |
// Features - value driven
|
| 96 |
solutionFound: 'ЭТО НЕ БОТ. ЭТО ПРОДАВЕЦ.', featuresTitle: 'Как <span class="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-emerald-400">MicroFunnel</span> усиливает ваш бизнес', featuresSubtitle: 'Результат, который можно измерить в деньгах',
|
| 97 |
-
playVoice: '
|
| 98 |
feat1title: 'Деньги на счёт', feat1desc: 'AI ведёт клиента от первого сообщения до оплаты. Без вашего участия, без потери конверсии.',
|
| 99 |
feat2title: 'Умное бронирование', feat2desc: 'AI знает наличие столов, экспертов, квартир или авто. Бронирует ресурсы мгновенно и без ошибок.',
|
| 100 |
feat3title: 'Товар в корзине', feat3desc: 'AI знает ваш каталог наизусть. Рекомендует, сравнивает цены, закрывает возражения.',
|
|
@@ -167,8 +167,8 @@ const PricingCard = ({ plan, monthlyPrice, isYearly, t, i }: any) => {
|
|
| 167 |
const x = useMotionValue(0)
|
| 168 |
const y = useMotionValue(0)
|
| 169 |
|
| 170 |
-
const mouseXSpring = useSpring(x)
|
| 171 |
-
const mouseYSpring = useSpring(y)
|
| 172 |
|
| 173 |
const rotateX = useTransform(mouseYSpring, [-0.5, 0.5], ["10deg", "-10deg"])
|
| 174 |
const rotateY = useTransform(mouseXSpring, [-0.5, 0.5], ["-10deg", "10deg"])
|
|
@@ -198,8 +198,9 @@ const PricingCard = ({ plan, monthlyPrice, isYearly, t, i }: any) => {
|
|
| 198 |
rotateX,
|
| 199 |
rotateY,
|
| 200 |
transformStyle: "preserve-3d",
|
|
|
|
| 201 |
}}
|
| 202 |
-
className={`relative flex-shrink-0 w-[310px] md:w-full p-8 rounded-[40px] border flex flex-col items-center text-center
|
| 203 |
? 'bg-white/[0.08] border-purple-500/40 shadow-[0_20px_50px_-10px_rgba(168,85,247,0.3)] z-20 ring-1 ring-purple-500/20'
|
| 204 |
: 'bg-white/[0.04] border-white/10 shadow-2xl z-10'
|
| 205 |
}`}
|
|
@@ -261,7 +262,7 @@ export default function HomePage() {
|
|
| 261 |
setIsHeroPlaying(false)
|
| 262 |
} else {
|
| 263 |
if (!heroAudioRef.current) {
|
| 264 |
-
heroAudioRef.current = new Audio('/voice-demos/
|
| 265 |
heroAudioRef.current.onended = () => setIsHeroPlaying(false)
|
| 266 |
}
|
| 267 |
heroAudioRef.current.play()
|
|
@@ -460,13 +461,13 @@ export default function HomePage() {
|
|
| 460 |
</div>
|
| 461 |
</section>
|
| 462 |
|
| 463 |
-
{/* 3. COMPANIES MARQUEE -
|
| 464 |
{trustLogos.length > 0 && (
|
| 465 |
<section className="py-10 overflow-hidden">
|
| 466 |
<div className="relative overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_128px,_black_calc(100%-128px),transparent_100%)]">
|
| 467 |
-
<div className="flex w-max animate-marquee-infinite">
|
| 468 |
-
{[...trustLogos, ...trustLogos
|
| 469 |
-
<div key={i} className="mx-8 text-xl font-bold text-slate-600/50 uppercase tracking-[0.2em] whitespace-nowrap
|
| 470 |
{logo}
|
| 471 |
</div>
|
| 472 |
))}
|
|
|
|
| 94 |
pain3title: '$0', pain3desc: 'Столько вы заработаете с клиента, которого забыли дожать. AI не забывает никогда.',
|
| 95 |
// Features - value driven
|
| 96 |
solutionFound: 'ЭТО НЕ БОТ. ЭТО ПРОДАВЕЦ.', featuresTitle: 'Как <span class="text-transparent bg-clip-text bg-gradient-to-r from-cyan-400 to-emerald-400">MicroFunnel</span> усиливает ваш бизнес', featuresSubtitle: 'Результат, который можно измерить в деньгах',
|
| 97 |
+
playVoice: '👋 Знакомьтесь, это Нова', stopVoice: '■ Остановить',
|
| 98 |
feat1title: 'Деньги на счёт', feat1desc: 'AI ведёт клиента от первого сообщения до оплаты. Без вашего участия, без потери конверсии.',
|
| 99 |
feat2title: 'Умное бронирование', feat2desc: 'AI знает наличие столов, экспертов, квартир или авто. Бронирует ресурсы мгновенно и без ошибок.',
|
| 100 |
feat3title: 'Товар в корзине', feat3desc: 'AI знает ваш каталог наизусть. Рекомендует, сравнивает цены, закрывает возражения.',
|
|
|
|
| 167 |
const x = useMotionValue(0)
|
| 168 |
const y = useMotionValue(0)
|
| 169 |
|
| 170 |
+
const mouseXSpring = useSpring(x, { stiffness: 150, damping: 15 })
|
| 171 |
+
const mouseYSpring = useSpring(y, { stiffness: 150, damping: 15 })
|
| 172 |
|
| 173 |
const rotateX = useTransform(mouseYSpring, [-0.5, 0.5], ["10deg", "-10deg"])
|
| 174 |
const rotateY = useTransform(mouseXSpring, [-0.5, 0.5], ["-10deg", "10deg"])
|
|
|
|
| 198 |
rotateX,
|
| 199 |
rotateY,
|
| 200 |
transformStyle: "preserve-3d",
|
| 201 |
+
willChange: "transform",
|
| 202 |
}}
|
| 203 |
+
className={`relative flex-shrink-0 w-[310px] md:w-full p-8 rounded-[40px] border flex flex-col items-center text-center backdrop-blur-xl antialiased cursor-pointer ${plan.popular
|
| 204 |
? 'bg-white/[0.08] border-purple-500/40 shadow-[0_20px_50px_-10px_rgba(168,85,247,0.3)] z-20 ring-1 ring-purple-500/20'
|
| 205 |
: 'bg-white/[0.04] border-white/10 shadow-2xl z-10'
|
| 206 |
}`}
|
|
|
|
| 262 |
setIsHeroPlaying(false)
|
| 263 |
} else {
|
| 264 |
if (!heroAudioRef.current) {
|
| 265 |
+
heroAudioRef.current = new Audio('/voice-demos/Nova.mp3') // Nova greeting voice
|
| 266 |
heroAudioRef.current.onended = () => setIsHeroPlaying(false)
|
| 267 |
}
|
| 268 |
heroAudioRef.current.play()
|
|
|
|
| 461 |
</div>
|
| 462 |
</section>
|
| 463 |
|
| 464 |
+
{/* 3. COMPANIES MARQUEE - Optimized Infinite Scroll */}
|
| 465 |
{trustLogos.length > 0 && (
|
| 466 |
<section className="py-10 overflow-hidden">
|
| 467 |
<div className="relative overflow-hidden [mask-image:_linear-gradient(to_right,transparent_0,_black_128px,_black_calc(100%-128px),transparent_100%)]">
|
| 468 |
+
<div className="flex w-max animate-marquee-infinite will-change-transform">
|
| 469 |
+
{[...trustLogos, ...trustLogos].map((logo, i) => (
|
| 470 |
+
<div key={i} className="mx-8 text-xl font-bold text-slate-600/50 uppercase tracking-[0.2em] whitespace-nowrap">
|
| 471 |
{logo}
|
| 472 |
</div>
|
| 473 |
))}
|
frontend/public/voice-demos/Nova.mp3
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3965bc26d808e7b1205a22c0c98da08da74476dbe6af8e87654804101b7ed7a
|
| 3 |
+
size 402013
|