From afdd7a5456ffde6cfd5a57e3bcba0fdcc360a7fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=BF=94?= Date: Mon, 23 Feb 2026 00:07:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E6=9B=B4=E6=96=B0=E6=B8=90?= =?UTF-8?q?=E5=8F=98=E5=AE=9A=E4=B9=89=E4=B8=BA=E5=8C=BB=E7=96=97=E5=81=A5?= =?UTF-8?q?=E5=BA=B7=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/gradients.ts | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lib/gradients.ts b/src/lib/gradients.ts index 300c9ac..2487a05 100644 --- a/src/lib/gradients.ts +++ b/src/lib/gradients.ts @@ -6,8 +6,12 @@ export const getGradientStyle = (type: keyof typeof gradients) => { }; }; -export const getGlowStyle = (color: 'blue' | 'purple', opacity: number = 0.15) => { - const colorValue = color === 'blue' ? '0, 217, 255' : '168, 85, 247'; +export const getGlowStyle = (color: 'primary' | 'brand', opacity: number = 0.1) => { + const colorMap = { + primary: '0, 94, 184', + brand: '196, 30, 58', + }; + const colorValue = colorMap[color]; return { background: `radial-gradient(circle, rgba(${colorValue}, ${opacity}) 0%, transparent 70%)`, }; @@ -19,11 +23,23 @@ export const getBorderGradientStyle = () => { }; }; -export const getTextGradientStyle = () => { +export const getTextGradientStyle = (type: 'primary' | 'brand' = 'primary') => { return { - background: gradients.primary, + background: gradients[type], WebkitBackgroundClip: 'text', WebkitTextFillColor: 'transparent', backgroundClip: 'text', }; }; + +export const getHeroGradientStyle = () => { + return { + background: gradients.hero, + }; +}; + +export const getCTAGradientStyle = () => { + return { + background: gradients.cta, + }; +};