Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
31 changes: 28 additions & 3 deletions src/components/Carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,36 @@ const Carousel = () => {
return (
<div className="content-carousel">
<Swiper
modules={[Autoplay, Pagination]} // Carga los módulos aquí
spaceBetween={30}
slidesPerView={1}
modules={[Autoplay, Pagination]}
autoplay={{ delay: 5000, disableOnInteraction: false }}
pagination={{ clickable: true }}

breakpoints={{
480: {
slidesPerView: 1.1,
spaceBetween: 5,
},
768: {
slidesPerView: 1.15,
spaceBetween: 10,
},
1024: {
slidesPerView: 1.3,
spaceBetween: 15,
},
1440: {
slidesPerView: 1.5,
spaceBetween: 20,
},
1920: {
slidesPerView: 1.8,
spaceBetween: 20,
},
2560: {
slidesPerView: 2,
spaceBetween: 40,
}
}}
>
{items.map((item, i) => (
<SwiperSlide key={i}>
Expand Down
8 changes: 6 additions & 2 deletions src/styles/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
}
}
.content-form {
margin-right: 20px;
.title-form {
color: $white1;
font-size: 18px;
Expand Down Expand Up @@ -44,7 +45,6 @@
.faucet-form {
position: relative;
z-index: 0;
margin-right: 200px;
display: flex;
flex-direction: column;
justify-content: space-between;
Expand Down Expand Up @@ -107,7 +107,11 @@

.content-carousel {
position: relative;
width: 450px;
width: 100%;
max-width: 600px;
display: flex;
justify-content: center;
align-items: center;
.rsk-card {
background-color: $bg1-color;
width: 400px;
Expand Down
82 changes: 56 additions & 26 deletions src/styles/_responsive.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@
}
}
.content-form {
margin-right: 20px;
.title-form {
font-size: 14px;
}
.faucet-form {
margin-right: 180px;
}
}
.content-carousel {
width: 410px;
Expand All @@ -40,9 +38,7 @@

@include laptop {
.content-form {
.faucet-form {
margin-right: 90px;
}
margin-right: 20px;
}
.content-carousel {
width: 450px;
Expand All @@ -58,32 +54,42 @@
font-size: 35px;
}
.content-form {
margin: 0 auto;
width: 100%;
max-width: 400px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 0px;
}
.container-faucet {
margin-top: 50px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
align-content: center;
.faucet-form {
margin-right: unset;
}
width: 100%;
max-width: 400px;
margin: 40px auto;
gap: 20px;
}
.content-carousel {
width: 100%;
margin-left: 0px;
max-width: 400px;
display: flex;
align-items: center;
justify-content: center;
}
.swiper {
width: 100% !important;
max-width: 400px !important;
}
.container {
.content-message {
margin: 30px auto 0px auto;
width: 70%;
}
}
.content-carousel {
margin-top: 170px;
margin-bottom: 150px;
width: 100%;
.rsk-card {
width: 340px;
height: 210px;
}
}
footer {
flex-direction: column;
.links {
Expand Down Expand Up @@ -111,12 +117,27 @@
}
}
.content-form {
width: 400px;
margin: 0 auto;
padding: 10px;
width: 100%;
max-width: 400px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 0px;
}
.rsk-card {
width: 280px;
height: 160px;
}
.container-faucet {
margin-top: 40px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
max-width: 350px;
margin: 30px auto;
gap: 15px;
}
.container {
.content-message {
Expand All @@ -125,6 +146,15 @@
}
}
.content-carousel {
display: none;
width: 100%;
max-width: 450px;
margin-left: 0px;
display: flex;
align-items: center;
justify-content: center;
}
.swiper {
width: 100% !important;
max-width: 450px !important;
}
}
Loading