feat(ui): redesign free browser trial tag, optimize phone/tablet responsiveness, integrate lenis smooth scroll, and focus copy strictly on effects & mobile apps
This commit is contained in:
@@ -170,20 +170,6 @@ export function BeforeAfterSlider({
|
||||
<span>{afterLabel}</span>
|
||||
</div>
|
||||
|
||||
{/* Animated Sliding Status Pill */}
|
||||
<div className="absolute bottom-3 left-1/2 -translate-x-1/2 bg-slate-900/85 backdrop-blur-md px-3.5 py-1 rounded-full text-[10px] font-mono font-semibold text-white pointer-events-none border border-white/10 shadow-sm flex items-center gap-1.5">
|
||||
{autoSlide && !isUserInteracting ? (
|
||||
<>
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-cyan-400 animate-pulse" />
|
||||
<span>Auto-Scanning Difference (Hover to Drag)</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<span className="w-1.5 h-1.5 rounded-full bg-blue-400" />
|
||||
<span>Interactive Drag Mode</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{caption && (
|
||||
|
||||
@@ -27,7 +27,7 @@ export function Footer({ config, currentLocale }: FooterProps) {
|
||||
<div className="flex flex-wrap items-center gap-3 pt-2">
|
||||
<div className="inline-flex items-center gap-2 text-xs text-emerald-800 bg-emerald-100/70 border border-emerald-300 px-3.5 py-1.5 rounded-full font-mono">
|
||||
<ShieldCheck className="w-4 h-4 text-emerald-700" />
|
||||
<span>Zero-Storage Policy: Ephemeral RAM Streaming Only</span>
|
||||
<span>Enterprise-Grade Photo Privacy Guarantee</span>
|
||||
</div>
|
||||
|
||||
<div className="inline-flex items-center gap-2 text-xs text-blue-800 bg-blue-100/70 border border-blue-300 px-3 py-1.5 rounded-full font-mono">
|
||||
|
||||
@@ -65,12 +65,12 @@ export function Navbar({ config, currentLocale }: NavbarProps) {
|
||||
</nav>
|
||||
|
||||
{/* Right CTA Button */}
|
||||
<div className="hidden lg:flex items-center space-x-3">
|
||||
<div className="hidden md:flex items-center space-x-3">
|
||||
<Link
|
||||
href={config.nav.cta.href}
|
||||
className="group relative inline-flex items-center gap-2 px-5 py-2.5 rounded-full text-xs font-bold text-white bg-gradient-to-r from-blue-600 via-indigo-600 to-blue-600 hover:from-blue-700 hover:to-indigo-700 shadow-md shadow-blue-500/25 hover:shadow-lg hover:shadow-blue-500/35 transition-all duration-300 hover:scale-105 active:scale-95"
|
||||
className="group relative inline-flex items-center gap-1.5 lg:gap-2 px-3.5 py-2 lg:px-5 lg:py-2.5 rounded-full text-xs font-bold text-white bg-gradient-to-r from-blue-600 via-indigo-600 to-blue-600 hover:from-blue-700 hover:to-indigo-700 shadow-md shadow-blue-500/25 hover:shadow-lg hover:shadow-blue-500/35 transition-all duration-300 hover:scale-105 active:scale-95"
|
||||
>
|
||||
<Smartphone className="w-4 h-4 text-white group-hover:rotate-6 transition-transform" />
|
||||
<Smartphone className="w-3.5 h-3.5 lg:w-4 lg:h-4 text-white group-hover:rotate-6 transition-transform" />
|
||||
<span>{resolveLocalised(config.nav.cta.label, currentLocale)}</span>
|
||||
<ArrowUpRight className="w-3.5 h-3.5 opacity-80 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform" />
|
||||
</Link>
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect } from 'react';
|
||||
import Lenis from 'lenis';
|
||||
|
||||
export function SmoothScroll() {
|
||||
useEffect(() => {
|
||||
// Check prefers-reduced-motion
|
||||
if (window.matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
||||
|
||||
const lenis = new Lenis({
|
||||
duration: 1.2,
|
||||
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
|
||||
orientation: 'vertical',
|
||||
gestureOrientation: 'vertical',
|
||||
smoothWheel: true,
|
||||
wheelMultiplier: 0.95,
|
||||
touchMultiplier: 1.5,
|
||||
});
|
||||
|
||||
let rafId: number;
|
||||
function raf(time: number) {
|
||||
lenis.raf(time);
|
||||
rafId = requestAnimationFrame(raf);
|
||||
}
|
||||
|
||||
rafId = requestAnimationFrame(raf);
|
||||
|
||||
// Smooth scroll for anchor clicks (e.g. #studio-suite, #flagship-models)
|
||||
const handleAnchorClick = (e: MouseEvent) => {
|
||||
const target = e.target as HTMLElement;
|
||||
const anchor = target.closest('a');
|
||||
if (!anchor) return;
|
||||
const href = anchor.getAttribute('href');
|
||||
if (href && href.startsWith('#') && href.length > 1) {
|
||||
const targetEl = document.querySelector(href);
|
||||
if (targetEl) {
|
||||
e.preventDefault();
|
||||
lenis.scrollTo(targetEl as HTMLElement, { offset: -90, duration: 1.2 });
|
||||
}
|
||||
}
|
||||
};
|
||||
document.addEventListener('click', handleAnchorClick);
|
||||
|
||||
// Expose lenis to window for external triggers
|
||||
(window as any).lenis = lenis;
|
||||
|
||||
return () => {
|
||||
cancelAnimationFrame(rafId);
|
||||
document.removeEventListener('click', handleAnchorClick);
|
||||
lenis.destroy();
|
||||
delete (window as any).lenis;
|
||||
};
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
Reference in New Issue
Block a user