-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* home page enhancements * storybook builded
- Loading branch information
1 parent
836e0e7
commit 56db0b2
Showing
114 changed files
with
320 additions
and
124 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
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
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
24 changes: 24 additions & 0 deletions
24
src/components/templates/HighlightSection/HighlightSection.module.scss
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,24 @@ | ||
@import "../../../foundations/sass/all"; | ||
|
||
.section { | ||
&__heading { | ||
color: $primary-color; | ||
font-size: $fs-lg; | ||
font-weight: $fw-bold; | ||
line-height: px-to-rem(25); | ||
margin-bottom: px-to-rem(33); | ||
text-align: center; | ||
} | ||
|
||
&__content { | ||
display: flex; | ||
gap: 1rem; | ||
|
||
@include tablet { | ||
align-items: center; | ||
display: flex; | ||
flex-direction: column; | ||
margin: auto; | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
src/components/templates/HighlightSection/HighlightSection.stories.tsx
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,11 @@ | ||
import { Meta } from "@storybook/react"; | ||
import HighlightSection from "./HighlightSection"; | ||
|
||
const highlightSection: Meta<typeof HighlightSection> = { | ||
title: "Templates/HighlightSection", | ||
component: HighlightSection, | ||
}; | ||
|
||
export const Default = {}; | ||
|
||
export default highlightSection; |
36 changes: 36 additions & 0 deletions
36
src/components/templates/HighlightSection/HighlightSection.tsx
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,36 @@ | ||
import HighlightCard from "@/components/atoms/HighlightCard"; | ||
import React from "react"; | ||
import styles from "./HighlightSection.module.scss"; | ||
|
||
const HighlightSection = () => { | ||
return ( | ||
<div className={styles.section}> | ||
<h2 className={styles.section__heading}>Why We are the best</h2> | ||
<div className={styles.section__content}> | ||
<HighlightCard | ||
image="icons/highlight-icon.svg" | ||
title="100 % Fresh Foods" | ||
description="Beguiled and demoralized by all get charms pleasure the moments ever so blinded by desire." | ||
link="/" | ||
mode="secondary" | ||
/> | ||
<HighlightCard | ||
image="icons/highlight-icon.svg" | ||
title="100 % Fresh Foods" | ||
description="Beguiled and demoralized by all get charms pleasure the moments ever so blinded by desire." | ||
link="/" | ||
mode="primary" | ||
/> | ||
<HighlightCard | ||
image="icons/highlight-icon.svg" | ||
title="100 % Fresh Foods" | ||
description="Beguiled and demoralized by all get charms pleasure the moments ever so blinded by desire." | ||
link="/" | ||
mode="secondary" | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HighlightSection; |
11 changes: 11 additions & 0 deletions
11
src/components/templates/testimonialSection/Testimonial.stories.tsx
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,11 @@ | ||
import { Meta } from "@storybook/react"; | ||
import TestimonialSection from "./TestimonialSection"; | ||
|
||
const testimonialSection: Meta<typeof TestimonialSection> = { | ||
title: "Templates/TestimonialSection", | ||
component: TestimonialSection, | ||
}; | ||
|
||
export const Default = {}; | ||
|
||
export default testimonialSection; |
53 changes: 53 additions & 0 deletions
53
src/components/templates/testimonialSection/TestimonialSection.module.scss
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,53 @@ | ||
@import "../../../foundations/sass/all"; | ||
|
||
.testimonial-section { | ||
text-align: center; | ||
|
||
&__name { | ||
color: $testimonial-section-color; | ||
font-size: $fs-lg; | ||
font-weight: $fw-bold; | ||
margin-bottom: px-to-rem(15); | ||
} | ||
|
||
&__heading { | ||
color: $testimonial-section-color; | ||
font-size: $fs-xxl; | ||
font-weight: $fw-bold; | ||
line-height: 1.2; | ||
margin-bottom: px-to-rem(20); | ||
text-align: center; | ||
|
||
span { | ||
color: $testimonial-section-secondary-color; | ||
} | ||
} | ||
|
||
&__swiper { | ||
box-sizing: border-box; | ||
height: fit-content; | ||
max-width: px-to-rem(1220); | ||
min-height: px-to-rem(345); | ||
padding: px-to-rem(10); | ||
text-align: center; | ||
|
||
& > div { | ||
div { | ||
display: flex; | ||
justify-content: center; | ||
} | ||
} | ||
|
||
& > div:last-of-type { | ||
margin: auto; | ||
|
||
& > span { | ||
border: 2px solid $primary-color; | ||
|
||
&.swiper-pagination-bullet-active { | ||
background: $primary-color; | ||
} | ||
} | ||
} | ||
} | ||
} |
69 changes: 69 additions & 0 deletions
69
src/components/templates/testimonialSection/TestimonialSection.tsx
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,69 @@ | ||
"use client"; | ||
import React from "react"; | ||
import { Swiper, SwiperSlide } from "swiper/react"; | ||
import "swiper/css"; | ||
import "swiper/css/pagination"; | ||
import { Pagination } from "swiper/modules"; | ||
import styles from "./TestimonialSection.module.scss"; | ||
import TestimonialCard from "@/components/molecules/TestimonialCard/TestimonialCard"; | ||
const TestimonialSection = () => { | ||
const [currentSlide, setCurrentSlide] = React.useState(0); | ||
return ( | ||
<div className={styles["testimonial-section"]}> | ||
<p className={styles["testimonial-section__name"]}>Testimonial</p> | ||
<h2 className={styles["testimonial-section__heading"]}> | ||
<span>Review</span> form our guests | ||
</h2> | ||
<Swiper | ||
modules={[Pagination]} | ||
spaceBetween={10} | ||
slidesPerView={2.5} | ||
breakpoints={{ | ||
0: { | ||
slidesPerView: 1, | ||
spaceBetween: 10, | ||
}, | ||
640: { | ||
slidesPerView: 2, | ||
spaceBetween: 20, | ||
}, | ||
768: { | ||
slidesPerView: 2, | ||
spaceBetween: 40, | ||
}, | ||
1024: { | ||
slidesPerView: 2.5, | ||
spaceBetween: 50, | ||
}, | ||
}} | ||
centeredSlides={true} | ||
onSlideChange={(swiper) => setCurrentSlide(swiper.realIndex)} | ||
initialSlide={1} | ||
pagination={{ clickable: true }} | ||
loop | ||
onSwiper={(swiper) => console.log(swiper.activeIndex)} | ||
autoplay={{ | ||
delay: 3000, | ||
disableOnInteraction: false, | ||
}} | ||
className={styles["testimonial-section__swiper"]} | ||
> | ||
{Array.from({ length: 10 }).map((_, index) => ( | ||
<SwiperSlide key={index}> | ||
<TestimonialCard | ||
name={"Bernadette R. Martin"} | ||
description={ | ||
"Also very good and so was the service. I had the mushroom risotto with scallops which was awesome. My wife had a burger over greens ..." | ||
} | ||
isActive={index == currentSlide} | ||
rating={3} | ||
image={"/images/man.jpg"} | ||
/> | ||
</SwiperSlide> | ||
))} | ||
</Swiper> | ||
</div> | ||
); | ||
}; | ||
|
||
export default TestimonialSection; |
Oops, something went wrong.