-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: testimonials #42
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[ | ||
{ | ||
"comment": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", | ||
"name": "Ms. Emily Anderson", | ||
"position": "UX Designer at Globex ", | ||
"styles": { | ||
"wrapper": "from-black/30 to-red-200" | ||
} | ||
}, | ||
{ | ||
"comment": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", | ||
"name": "Ms. Emily Anderson", | ||
"position": "UX Designer at Globex ", | ||
"styles": { | ||
"wrapper": "from-black/30 to-red-200" | ||
} | ||
}, | ||
{ | ||
"comment": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", | ||
"name": "Ms. Emily Anderson", | ||
"position": "UX Designer at Globex ", | ||
"styles": { | ||
"wrapper": "from-black/30 to-red-200" | ||
} | ||
}, | ||
{ | ||
"comment": "It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.", | ||
"name": "Ms. Emily Anderson", | ||
"position": "UX Designer at Globex ", | ||
"styles": { | ||
"wrapper": "from-black/30 to-red-200" | ||
} | ||
} | ||
] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* eslint-disable react/no-unknown-property */ | ||
import { twMerge } from 'tailwind-merge'; | ||
import { SectionBadge } from '@/components/common/badges'; | ||
import testimonials from './data.json'; | ||
|
||
const Testimonials = () => { | ||
return ( | ||
<div className="w-full flex flex-col py-6 px-10 lg:px-36 gap-y-10 overflow-hidden"> | ||
<SectionBadge id="sponsors">Testimonials</SectionBadge> | ||
<div | ||
className="grid grid-flow-col auto-cols-[33%] gap-8" | ||
style={{ | ||
display: 'grid', | ||
gridAutoFlow: 'column', | ||
gridTemplateColumns: 'repeat(auto-fill, minmax(33%, 1fr))', // 3 boxes per row | ||
animation: 'scroll-reel 20s linear infinite' | ||
}}> | ||
{testimonials.concat(testimonials).map((testimonial, index) => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we use concat here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason for adding concat? |
||
<div | ||
key={index} | ||
className={twMerge( | ||
'relative bg-white aspect-rectangle flex flex-col justify-center rounded-2xl p-6 text-black shadow-md', | ||
testimonial.styles?.wrapper | ||
)} | ||
style={{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we use tailwind classes for this? |
||
width: '100%', // Make each item take up the full width of the grid column | ||
height: '200px', | ||
whiteSpace: 'normal' | ||
}}> | ||
<p className="text-lg font-semibold mb-2 text-left">{testimonial.comment}</p> | ||
<span className="font-bold text-blue-600 mt-4 text-left">{testimonial.name}</span> | ||
<span className="text-gray-500 text-sm text-left">{testimonial.position}</span> | ||
</div> | ||
))} | ||
</div> | ||
|
||
{/* Inline keyframes for the scroll animation */} | ||
<style jsx>{` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tailwind for these styles too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SandalikaAriyrathna style tag is still here. |
||
@keyframes scroll-reel { | ||
0% { | ||
transform: translateX(0); | ||
} | ||
100% { | ||
transform: translateX(-100%); | ||
} | ||
} | ||
`}</style> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Testimonials; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we replace these also with tailwind