-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from NegativE333/testimonial-slider
Testimonial slider added in website with swiper js.
- Loading branch information
Showing
9 changed files
with
163 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
images: { | ||
domains: ['images.unsplash.com'], | ||
}, | ||
} | ||
|
||
module.exports = nextConfig |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import React from "react"; | ||
import Image from "next/image"; | ||
import { AiFillStar } from "react-icons/ai"; | ||
|
||
// Import Swiper React components | ||
import { Swiper, SwiperSlide } from "swiper/react"; | ||
|
||
// Import Swiper styles | ||
import "swiper/css"; | ||
import "swiper/css/pagination"; | ||
|
||
// import required modules | ||
import { Pagination } from "swiper/modules"; | ||
|
||
import { loremMessage, profiles } from "./TestimonialData"; | ||
|
||
const Testimonial = () => { | ||
return ( | ||
<> | ||
<div className="h-[90vh] flex flex-col items-center justify-center bg-[#fbfafe]"> | ||
<div className="text-4xl text-secondary text-[#23263b] font-semibold"> | ||
What our members say | ||
</div> | ||
<Swiper | ||
slidesPerView={3} | ||
spaceBetween={150} | ||
autoplay={{ | ||
delay: 2500, | ||
disableOnInteraction: false, | ||
}} | ||
pagination={{ | ||
clickable: true, | ||
}} | ||
modules={[Pagination]} | ||
className="mySwiper" | ||
> | ||
{profiles.map((profile, i) => ( | ||
<SwiperSlide key={i}> | ||
<div className="flex items-center justify-center flex-col gap-4 #23263b"> | ||
<div className="text-[#fb4a6e] flex gap-1"> | ||
<AiFillStar /> | ||
<AiFillStar /> | ||
<AiFillStar /> | ||
<AiFillStar /> | ||
<AiFillStar /> | ||
</div> | ||
<div className="font-medium text-secondary text-xl"> | ||
{loremMessage} | ||
</div> | ||
<div className="flex justify-center items-center gap-4"> | ||
<div className="h-10 w-10"> | ||
<Image | ||
className="rounded-full" | ||
width={100} | ||
height={100} | ||
src={profile.profilePictureUrl} | ||
alt="prifle" | ||
/> | ||
</div> | ||
{profile.name} | ||
</div> | ||
</div> | ||
</SwiperSlide> | ||
))} | ||
</Swiper> | ||
</div> | ||
</> | ||
|
||
); | ||
}; | ||
|
||
export default Testimonial; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const loremMessage = "Lorem ipsum dolor sit amet consectetur. In at sed sit tempor. Sed venenatis sodales Maurice bibendum blanket condiments curses."; | ||
|
||
const profiles = []; | ||
|
||
for (let i = 0; i < 6; i++) { | ||
profiles.push({ | ||
name: `Brooklyn Simmons`, | ||
profilePictureUrl: `https://images.unsplash.com/photo-1573497019236-17f8177b81e8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NXx8cHJvZmVzc2lvbmFsJTIwd29tZW58ZW58MHwwfDB8fHww&auto=format&fit=crop&w=500&q=60`, | ||
}); | ||
} | ||
|
||
module.exports = { loremMessage, profiles }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.swiper { | ||
width: 100%; | ||
height: 100%; | ||
} | ||
|
||
.swiper-slide { | ||
text-align: center; | ||
font-size: 18px; | ||
background: #fff; | ||
|
||
/* Center slide text vertically */ | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.swiper-slide img { | ||
display: block; | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters