Skip to content
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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/2024/src/components/landing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { default as Partners } from './partners';
export { default as Prizes } from './prizes';
export { default as Rules } from './rules';
export { default as Sponsors } from './sponsors';
export { default as Testimonials } from './testimonials';
export { default as Timeline } from './timeline';
export { default as KnowledgePartners } from './knowledge-partners';
export { default as CountDown } from './countdown';
34 changes: 34 additions & 0 deletions apps/2024/src/components/landing/testimonials/data.json
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"
}
}
]
52 changes: 52 additions & 0 deletions apps/2024/src/components/landing/testimonials/index.jsx
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={{
Copy link
Collaborator

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

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) => (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use concat here?

Copy link
Collaborator

Choose a reason for hiding this comment

The 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={{
Copy link
Collaborator

Choose a reason for hiding this comment

The 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>{`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tailwind for these styles too

Copy link
Collaborator

Choose a reason for hiding this comment

The 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;
2 changes: 2 additions & 0 deletions apps/2024/src/pages/landing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
Prizes,
Rules,
Sponsors,
Testimonials,
Timeline
} from '@/components/landing';

Expand All @@ -26,6 +27,7 @@ const Landing = () => {
<ContributionBanner />
<Prizes />
<Sponsors />
<Testimonials />
<KnowledgePartners />
<PastEvents />
<Gallery />
Expand Down
Loading