Skip to content

Commit

Permalink
feat: implement logo thicker animation
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-akbarzadeh committed Feb 4, 2025
1 parent 9cbcf04 commit 5cb8970
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 37 deletions.
34 changes: 22 additions & 12 deletions components/sections/logo-thicker.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client';
import {
AcmeLogo,
ApexLogo,
Expand All @@ -6,7 +7,7 @@ import {
PulseLogo,
QuantumLogo,
} from '@/assets';
import Image from 'next/image';
import { motion } from 'motion/react';

const COMPANY_LOGOS = [
{ src: AcmeLogo, name: 'Acme Corporation' },
Expand All @@ -15,6 +16,12 @@ const COMPANY_LOGOS = [
{ src: EchoLogo, name: 'Echo Innovations' },
{ src: PulseLogo, name: 'Pulse Digital' },
{ src: QuantumLogo, name: 'Quantum Solutions' },
{ src: AcmeLogo, name: 'Acme Corporation' },
{ src: ApexLogo, name: 'Apex Technologies' },
{ src: CelestialLogo, name: 'Celestial Systems' },
{ src: EchoLogo, name: 'Echo Innovations' },
{ src: PulseLogo, name: 'Pulse Digital' },
{ src: QuantumLogo, name: 'Quantum Solutions' },
];

export function LogoThicker() {
Expand All @@ -36,19 +43,22 @@ export function LogoThicker() {
role="group"
aria-label="Partner company logos"
>
<div className="flex gap-6">
<motion.div
initial={{ translate: '-50%' }}
animate={{ translate: '0' }}
transition={{ repeat: Infinity, ease: 'linear', duration: 30 }}
className="flex flex-none -translate-x-1/2 flex-row gap-14 pr-14"
>
{COMPANY_LOGOS.map((logo) => (
<div key={logo.name} className="relative aspect-square w-full">
<Image
src={logo.src.src}
alt={`${logo.name} logo`}
fill
sizes="(max-width: 768px) 60vw, 60vw"
className="object-contain"
/>
</div>
// eslint-disable-next-line @next/next/no-img-element
<img
key={logo.name}
src={logo.src.src}
alt={`${logo.name} logo`}
className="h-6 w-auto flex-none"
/>
))}
</div>
</motion.div>
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"concurrently": "^8.2.2",
"contentlayer": "^0.3.4",
"date-fns": "^3.6.0",
"framer-motion": "^12.0.6",
"lint-staged": "15.2.2",
"lucide-react": "^0.372.0",
"motion": "^12.0.8",
Expand Down
24 changes: 0 additions & 24 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5cb8970

Please sign in to comment.