|
1 | 1 | 'use client' |
2 | 2 | import { content } from '@/content/homepage/data' |
3 | | -import Marquee from 'react-fast-marquee' |
4 | 3 | import { motion } from 'motion/react' |
5 | 4 |
|
6 | 5 | const LogoSection = () => { |
| 6 | + const logos = content.logoSection.logos as any[] |
7 | 7 | return ( |
8 | | - <section className={'py-8 md:py-13'}> |
| 8 | + <section className={'py-12 md:py-16'}> |
9 | 9 | <div className={'container'}> |
10 | | - <div className={'w-full flex justify-center'}> |
11 | | - <div> |
12 | | - <motion.h2 |
13 | | - initial={{ opacity: 0 }} |
14 | | - whileInView={{ opacity: 1 }} |
15 | | - transition={{ duration: 0.5, ease: 'easeInOut', delay: 0.2 }} |
16 | | - viewport={{ once: true }} |
17 | | - className={'text-xs! max-lg:text-center max-w-100'}> |
18 | | - {content.logoSection.title} |
19 | | - </motion.h2> |
20 | | - </div> |
21 | | - </div> |
22 | | - </div> |
23 | | - <div className={'w-full pt-8 overflow-hidden'}> |
24 | | - <motion.div |
25 | | - initial={{ opacity: 0 }} |
26 | | - whileInView={{ opacity: 1 }} |
27 | | - transition={{ duration: 0.5, ease: 'easeInOut', delay: 0.2 }} |
28 | | - viewport={{ once: true }}> |
29 | | - <Marquee |
30 | | - autoFill={true} |
31 | | - pauseOnHover={true} |
32 | | - speed={100} |
33 | | - loop={0} |
34 | | - gradient={true} |
35 | | - gradientColor={'#F3F4F4'} |
36 | | - className={'flex'}> |
37 | | - {content.logoSection.logos.map((logo, index) => ( |
38 | | - <div key={index}> |
| 10 | + <div className={'w-full flex flex-col items-center gap-8'}> |
| 11 | + <motion.h2 |
| 12 | + initial={{ opacity: 0 }} |
| 13 | + whileInView={{ opacity: 1 }} |
| 14 | + transition={{ duration: 0.5, ease: 'easeInOut', delay: 0.2 }} |
| 15 | + viewport={{ once: true }} |
| 16 | + className={'text-xs! max-lg:text-center'}> |
| 17 | + {content.logoSection.title} |
| 18 | + </motion.h2> |
| 19 | + <motion.div |
| 20 | + initial={{ opacity: 0 }} |
| 21 | + whileInView={{ opacity: 1 }} |
| 22 | + transition={{ duration: 0.5, ease: 'easeInOut', delay: 0.3 }} |
| 23 | + viewport={{ once: true }} |
| 24 | + className={'flex flex-wrap justify-center gap-10'}> |
| 25 | + {logos.map((logo, index) => ( |
| 26 | + <a |
| 27 | + key={index} |
| 28 | + href={logo.href || '#'} |
| 29 | + target="_blank" |
| 30 | + rel="noopener noreferrer" |
| 31 | + className={'h-10 md:h-12 transition-opacity hover:opacity-70'}> |
39 | 32 | {logo.src && ( |
40 | | - <div className={'h-13 w-20 md:w-32 lg:w-40 px-4'}> |
41 | | - <img |
42 | | - src={logo.src} |
43 | | - alt={logo.alt} |
44 | | - width={300} |
45 | | - height={300} |
46 | | - className={'max-h-full max-w-full object-contain'} |
47 | | - /> |
48 | | - </div> |
| 33 | + <img src={logo.src} alt={logo.alt} className={'h-full w-auto object-contain'} /> |
49 | 34 | )} |
50 | | - </div> |
| 35 | + </a> |
51 | 36 | ))} |
52 | | - </Marquee> |
53 | | - </motion.div> |
| 37 | + </motion.div> |
| 38 | + </div> |
54 | 39 | </div> |
55 | 40 | </section> |
56 | 41 | ) |
|
0 commit comments