fix(carousel): responsive carousel

This commit is contained in:
Matthieu Bessat 2024-01-11 08:56:12 +01:00
parent 2277259859
commit 8cd4d0fd39
2 changed files with 23 additions and 7 deletions

View file

@ -123,6 +123,7 @@ $height: 30rem;
font-size: .9rem; font-size: .9rem;
opacity: 0.9; opacity: 0.9;
text-align: center; text-align: center;
margin-top: 1rem;
} }
} }
} }
@ -277,7 +278,7 @@ $height: 30rem;
} }
@media (max-width: $md-breakpoint) { @media (max-width: $md-breakpoint) {
$md-height: 45rem; $md-height: 47rem;
.carousel { .carousel {
height: $md-height !important; height: $md-height !important;
} }
@ -286,7 +287,7 @@ $height: 30rem;
.carousel::after, .carousel::after,
.carousel__prev, .carousel__prev,
.carousel__next { .carousel__next {
transform: translateY($md-height/2 - 2rem) !important; transform: translateY($md-height - 4.5rem) !important;
} }
.carousel::next { .carousel::next {
@ -334,11 +335,17 @@ $height: 30rem;
.image-container { .image-container {
display: flex; display: flex;
justify-content: center; justify-content: center;
padding-top: 2rem; padding-top: 1rem;
}
.slide-content {
.page-container {
padding: 0 1.5rem;
}
} }
.slide-image { .slide-image {
height: 19rem; height: 20rem;
img { img {
width: auto; width: auto;
height: 100%; height: 100%;
@ -346,3 +353,14 @@ $height: 30rem;
} }
} }
} }
@media (max-width: $sm-breakpoint) {
.carousel {
.image-container {
padding-top: 0rem;
}
.slide-image {
height: 13rem;
}
}
}

View file

@ -84,6 +84,7 @@ a:hover {
img { img {
max-width: 100%; max-width: 100%;
object-fit: contain;
} }
.grid { .grid {
@ -93,9 +94,6 @@ img {
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
} }
.btn {
}
.wikipedia-btn { .wikipedia-btn {
margin-top: .5rem; margin-top: .5rem;