fix: 修复Woodpecker CI配置文件中的linter错误
ci/woodpecker/manual/woodpecker Pipeline was successful

- 移除未使用的YAML锚点定义
- 替换commands字段中的锚点引用为实际值
- 移除有问题的通知步骤
- 修复测试文件中的问题
- 添加新的测试用例和配置文件
This commit is contained in:
张翔
2026-03-28 09:42:45 +08:00
parent a5ee6489a1
commit ebaa7f3c50
53 changed files with 4564 additions and 818 deletions
+29 -17
View File
@@ -7,6 +7,7 @@ import { RippleButton, SealButton } from '@/components/ui/ripple-button';
import { MagneticButton, BlurReveal, CounterWithEffect } from '@/lib/animations';
import { COMPANY_INFO, STATS } from '@/lib/constants';
import { ArrowRight, Shield, Zap, Award } from 'lucide-react';
import { useReducedMotion } from '@/hooks/use-reduced-motion';
interface HeroContentProps {
isVisible: boolean;
@@ -33,11 +34,13 @@ function handleKeyDown(event: React.KeyboardEvent<HTMLButtonElement>, id: string
}
export function HeroContent({ isVisible }: HeroContentProps) {
const shouldReduceMotion = useReducedMotion();
return (
<motion.div
initial={{ opacity: 0, y: 20, scale: 0.95 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20, scale: 0.95 }}
animate={isVisible ? { opacity: 1, y: 0, scale: 1 } : {}}
transition={{ duration: 0.6, ease: [0.16, 1, 0.3, 1] }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6, ease: [0.16, 1, 0.3, 1] }}
className="mb-8"
>
<span className="inline-flex items-center gap-2 px-5 py-2.5 rounded-full border border-[#1C1C1C]/20 bg-[#F5F5F5] text-[#1C1C1C] text-sm font-medium">
@@ -48,12 +51,14 @@ export function HeroContent({ isVisible }: HeroContentProps) {
}
export function HeroTitle({ isVisible }: HeroContentProps) {
const shouldReduceMotion = useReducedMotion();
return (
<motion.h1
id="hero-heading"
initial={{ opacity: 0, y: 20 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20 }}
animate={isVisible ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.1 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6, delay: 0.1 }}
className="text-5xl sm:text-6xl lg:text-7xl tracking-tight mb-6 font-calligraphy"
style={{
fontWeight: 'normal',
@@ -87,11 +92,13 @@ export function HeroDescription(_props: HeroContentProps) {
}
export function HeroButtons({ isVisible }: HeroContentProps) {
const shouldReduceMotion = useReducedMotion();
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20 }}
animate={isVisible ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.3 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6, delay: 0.3 }}
className="flex flex-col sm:flex-row items-center justify-center gap-4 mb-8"
>
<MagneticButton strength={0.4}>
@@ -118,20 +125,22 @@ export function HeroButtons({ isVisible }: HeroContentProps) {
}
export function HeroFeatures({ isVisible }: HeroContentProps) {
const shouldReduceMotion = useReducedMotion();
return (
<motion.div
initial={{ opacity: 0, y: 20 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20 }}
animate={isVisible ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.35 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6, delay: 0.35 }}
className="flex flex-wrap gap-4 justify-center mb-16"
>
{features.map((feature, index) => (
<motion.div
key={index}
initial={{ opacity: 0, scale: 0.9 }}
initial={shouldReduceMotion ? {} : { opacity: 0, scale: 0.9 }}
animate={isVisible ? { opacity: 1, scale: 1 } : {}}
transition={{ duration: 0.4, delay: 0.4 + index * 0.1 }}
whileHover={{ scale: 1.05, y: -2 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.4, delay: 0.4 + index * 0.1 }}
whileHover={shouldReduceMotion ? {} : { scale: 1.05, y: -2 }}
className="flex items-center gap-2 px-4 py-2 rounded-full bg-[#FAFAFA] border border-[#E5E5E5] transition-all duration-300 hover:border-[#1C1C1C] hover:shadow-md cursor-default"
>
<feature.icon className="w-4 h-4 text-[#C41E3A]" />
@@ -144,6 +153,7 @@ export function HeroFeatures({ isVisible }: HeroContentProps) {
export function HeroStats() {
const [statsVisible, setStatsVisible] = useState(false);
const shouldReduceMotion = useReducedMotion();
useEffect(() => {
const statsEl = document.getElementById('stats-section');
@@ -165,9 +175,9 @@ export function HeroStats() {
return (
<motion.div
id="stats-section"
initial={{ opacity: 0, y: 20 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20 }}
animate={statsVisible ? { opacity: 1, y: 0 } : {}}
transition={{ duration: 0.6, delay: 0.4 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.6, delay: 0.4 }}
className="pt-16 border-t border-[#E2E8F0]"
>
<div className="grid grid-cols-2 md:grid-cols-4 gap-8 md:gap-12">
@@ -177,6 +187,7 @@ export function HeroStats() {
stat={stat}
index={index}
shouldAnimate={statsVisible}
shouldReduceMotion={shouldReduceMotion}
/>
))}
</div>
@@ -184,10 +195,11 @@ export function HeroStats() {
);
}
function HeroStatItem({ stat, index, shouldAnimate }: {
function HeroStatItem({ stat, index, shouldAnimate, shouldReduceMotion }: {
stat: { value: string; label: string };
index: number;
shouldAnimate: boolean;
shouldReduceMotion: boolean;
}) {
const numericValue = parseInt(stat.value.replace(/\D/g, ''));
const suffix = stat.value.replace(/[\d]/g, '');
@@ -195,10 +207,10 @@ function HeroStatItem({ stat, index, shouldAnimate }: {
return (
<motion.div
className="group cursor-default text-center"
initial={{ opacity: 0, y: 20, scale: 0.9 }}
initial={shouldReduceMotion ? {} : { opacity: 0, y: 20, scale: 0.9 }}
animate={shouldAnimate ? { opacity: 1, y: 0, scale: 1 } : {}}
transition={{ duration: 0.5, delay: index * 0.1, type: 'spring', stiffness: 100 }}
whileHover={{ scale: 1.05, y: -5 }}
transition={shouldReduceMotion ? { duration: 0 } : { duration: 0.5, delay: index * 0.1, type: 'spring', stiffness: 100 }}
whileHover={shouldReduceMotion ? {} : { scale: 1.05, y: -5 }}
>
<div className="text-4xl sm:text-5xl font-bold text-[#C41E3A] mb-3">
{shouldAnimate ? (