forked from mohamedsamara/mern-ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: beautify homepage & add carousel
- Loading branch information
1 parent
b380d3b
commit a6194ff
Showing
26 changed files
with
248 additions
and
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
export const responsiveOneItemCarousel = { | ||
desktop: { | ||
breakpoint: { | ||
max: 3000, | ||
min: 1024 | ||
}, | ||
items: 1, | ||
slidesToSlide: 1, | ||
partialVisibilityGutter: 0 | ||
}, | ||
mobile: { | ||
breakpoint: { | ||
max: 464, | ||
min: 0 | ||
}, | ||
items: 1, | ||
slidesToSlide: 1, | ||
partialVisibilityGutter: 0 | ||
}, | ||
tablet: { | ||
breakpoint: { | ||
max: 1024, | ||
min: 200 | ||
}, | ||
items: 1, | ||
slidesToSlide: 1, | ||
partialVisibilityGutter: 0 | ||
} | ||
}; |
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,59 @@ | ||
/** | ||
* | ||
* Carousel | ||
* | ||
*/ | ||
|
||
import React from 'react'; | ||
|
||
import Carousel from 'react-multi-carousel'; | ||
import 'react-multi-carousel/lib/styles.css'; | ||
|
||
const CarouselSlider = props => { | ||
const { | ||
swipeable, | ||
draggable, | ||
showDots, | ||
infinite, | ||
autoPlay, | ||
keyBoardControl, | ||
autoPlaySpeed, | ||
ssr, | ||
responsive, | ||
children | ||
} = props; | ||
|
||
return ( | ||
<Carousel | ||
swipeable={swipeable} | ||
draggable={draggable} | ||
showDots={showDots} | ||
infinite={infinite} | ||
autoPlay={autoPlay} | ||
keyBoardControl={keyBoardControl} | ||
autoPlaySpeed={autoPlaySpeed} | ||
ssr={ssr} | ||
responsive={responsive} | ||
customTransition='all 1s' | ||
transitionDuration={500} | ||
containerClass='carousel-container' | ||
dotListClass='carousel-dot-list-style' | ||
itemClass='carousel-slider-item' | ||
> | ||
{children} | ||
</Carousel> | ||
); | ||
}; | ||
|
||
CarouselSlider.defaultProps = { | ||
swipeable: false, | ||
draggable: false, | ||
showDots: false, | ||
infinite: true, | ||
autoPlay: false, | ||
keyBoardControl: true, | ||
ssr: false, | ||
autoPlaySpeed: 2000 | ||
}; | ||
|
||
export default CarouselSlider; |
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,14 @@ | ||
[ | ||
{ | ||
"imageUrl": "../images/banners/banner-3.jpg", | ||
"link": "", | ||
"title": "", | ||
"content": "<p></p>\n" | ||
}, | ||
{ | ||
"imageUrl": "../images/banners/banner-4.jpg", | ||
"link": "", | ||
"title": "", | ||
"content": "<p></p>\n" | ||
} | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
.homepage { | ||
.title { | ||
font-size: $font-size-heading-x-large !important; | ||
} | ||
} | ||
// .homepage { | ||
// } |
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
Oops, something went wrong.