Carousel Text #6
Binary file not shown.
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 49 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 164 KiB |
|
|
@ -14,7 +14,13 @@ const { images } = Astro.props;
|
||||||
{
|
{
|
||||||
images.map((image) => (
|
images.map((image) => (
|
||||||
<div class="swiper-slide">
|
<div class="swiper-slide">
|
||||||
<Image src={image} alt="" />
|
<div class="flex! flex-col items-center justify-center relative">
|
||||||
|
|
||||||
|
<div class="uppercase text-2xl lg:text-9xl text-white shadow-2xl absolute font-secondary">
|
||||||
|
{image.text}
|
||||||
|
</div>
|
||||||
|
<Image src={image.image} alt="" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
@ -36,23 +42,24 @@ const { images } = Astro.props;
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Swiper from "swiper";
|
import Swiper from "swiper";
|
||||||
import { Navigation, Pagination, Scrollbar } from 'swiper/modules';
|
const swiper = new Swiper(".swiper", {
|
||||||
|
// Optional parameters
|
||||||
const swiper = new Swiper('.swiper', {
|
|
||||||
modules: [Navigation, Pagination, Scrollbar],
|
|
||||||
loop: true,
|
loop: true,
|
||||||
|
|
||||||
navigation: {
|
// If we need pagination
|
||||||
nextEl: '.swiper-button-next',
|
|
||||||
prevEl: '.swiper-button-prev',
|
|
||||||
},
|
|
||||||
|
|
||||||
pagination: {
|
pagination: {
|
||||||
el: '.swiper-pagination',
|
el: ".swiper-pagination",
|
||||||
},
|
},
|
||||||
|
|
||||||
scrollbar: {
|
// Navigation arrows
|
||||||
el: '.swiper-scrollbar',
|
navigation: {
|
||||||
|
nextEl: ".swiper-button-next",
|
||||||
|
prevEl: ".swiper-button-prev",
|
||||||
},
|
},
|
||||||
});
|
|
||||||
|
// And if we need scrollbar
|
||||||
|
scrollbar: {
|
||||||
|
el: ".swiper-scrollbar",
|
||||||
|
},
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,33 @@ import FormationSection from "../components/section/FormationSection.astro";
|
||||||
import FooterSection from "../components/section/FooterSection.astro";
|
import FooterSection from "../components/section/FooterSection.astro";
|
||||||
|
|
||||||
const carouselImages2 = [
|
const carouselImages2 = [
|
||||||
"https://picsum.photos/1920/800?random=1&grayscale",
|
{
|
||||||
"https://picsum.photos/1920/800?random=2&grayscale",
|
image: "https://picsum.photos/1920/800?random=1&grayscale",
|
||||||
"https://picsum.photos/1920/800?random=3&grayscale",
|
text: "Justicia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: "https://picsum.photos/1920/800?random=2&grayscale",
|
||||||
|
text: "Paz",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: "https://picsum.photos/1920/800?random=3&grayscale",
|
||||||
|
text: "",
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
const carouselImages3 = [
|
const carouselImages3 = [
|
||||||
"https://picsum.photos/1920/800?random=1&grayscale",
|
{
|
||||||
"https://picsum.photos/1920/800?random=2&grayscale",
|
image: "https://picsum.photos/1920/800?random=1&grayscale",
|
||||||
"https://picsum.photos/1920/800?random=3&grayscale",
|
text: "Justicia",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: "https://picsum.photos/1920/800?random=2&grayscale",
|
||||||
|
text: "Paz",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
image: "https://picsum.photos/1920/800?random=3&grayscale",
|
||||||
|
text: "",
|
||||||
|
}
|
||||||
];
|
];
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue