From c604b76a965bedf6afe1731a98516985bfbf0576 Mon Sep 17 00:00:00 2001 From: YNazymko12 Date: Sun, 1 Feb 2026 18:42:51 +0100 Subject: [PATCH] refactor(home): update button, cards, and online counter UI Improve primary button styles Fix card overflow and add subtle highlights Redesign online users counter and reduce font size --- frontend/app/globals.css | 95 +--------- frontend/components/home/CodeCard.tsx | 25 ++- frontend/components/home/HeroCodeCards.tsx | 4 +- frontend/components/home/HeroSection.tsx | 8 +- .../components/home/InteractiveCTAButton.tsx | 178 ++++++++++++++---- .../components/shared/OnlineCounterPopup.tsx | 124 +++++++----- 6 files changed, 252 insertions(+), 182 deletions(-) diff --git a/frontend/app/globals.css b/frontend/app/globals.css index 2743a7c1..ccc119f9 100644 --- a/frontend/app/globals.css +++ b/frontend/app/globals.css @@ -210,71 +210,6 @@ } } -@keyframes wave-slide-up { - 0% { - clip-path: polygon( - 0% 100%, - 10% 100%, - 20% 100%, - 30% 100%, - 40% 100%, - 50% 100%, - 60% 100%, - 70% 100%, - 80% 100%, - 90% 100%, - 100% 100%, - 100% 100%, - 0% 100% - ); - } - 50% { - clip-path: polygon( - 0% 60%, - 10% 50%, - 20% 45%, - 30% 48%, - 40% 55%, - 50% 50%, - 60% 45%, - 70% 48%, - 80% 52%, - 90% 50%, - 100% 55%, - 100% 100%, - 0% 100% - ); - } - 100% { - clip-path: polygon( - 0% 0%, - 10% 0%, - 20% 0%, - 30% 0%, - 40% 0%, - 50% 0%, - 60% 0%, - 70% 0%, - 80% 0%, - 90% 0%, - 100% 0%, - 100% 100%, - 0% 100% - ); - } -} - -@keyframes text-fade-in { - 0% { - opacity: 0; - transform: translateY(4px); - } - 100% { - opacity: 1; - transform: translateY(0); - } -} - @keyframes card-breathe { 0% { transform: translate(0, 0) scale(1) rotate(var(--card-rotate, 0deg)); @@ -297,36 +232,24 @@ animation: slide-up-gradient 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; } - .animate-wave-slide-up { - animation: wave-slide-up 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; - } - - .animate-text-fade-in { - animation: text-fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; - } - .animate-card-breathe { animation: card-breathe 6s ease-in-out infinite; will-change: transform; } - .left-4 .animate-card-breathe, - .md\:left-6 .animate-card-breathe, - .lg\:left-8 .animate-card-breathe, - .xl\:left-12 .animate-card-breathe { - --card-x: -30px; - --card-y: -25px; + .lg\:left-16.animate-card-breathe { + transform: rotate(-10deg); + --card-x: -20px; + --card-y: -15px; --card-rotate: -10deg; --card-rotate-offset: -3deg; animation-delay: 0s; } - .right-4 .animate-card-breathe, - .md\:right-6 .animate-card-breathe, - .lg\:right-8 .animate-card-breathe, - .xl\:right-12 .animate-card-breathe { - --card-x: 30px; - --card-y: 25px; + .lg\:right-20.animate-card-breathe { + transform: rotate(8deg); + --card-x: 20px; + --card-y: 15px; --card-rotate: 8deg; --card-rotate-offset: 3deg; animation-delay: 0.8s; @@ -376,7 +299,7 @@ .shop-scope { /* keep shop rounding slightly tighter than platform */ --radius: calc(var(--radius-base) - 2px); - + /* Shop header/button accent in LIGHT: no platform blue */ --accent-primary: var(--foreground); --accent-hover: color-mix(in oklab, var(--foreground) 92%, white); diff --git a/frontend/components/home/CodeCard.tsx b/frontend/components/home/CodeCard.tsx index 6f3b1157..f66efbf2 100644 --- a/frontend/components/home/CodeCard.tsx +++ b/frontend/components/home/CodeCard.tsx @@ -9,19 +9,26 @@ interface CodeCardProps { export function CodeCard({ fileName, snippet, className }: CodeCardProps) { return (