libreria-astro-lefebvre 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -46
- package/package.json +30 -30
- package/src/carbins/AstroButton.ts +34 -34
- package/src/carbins/CTA_2025_Formentera.ts +47 -47
- package/src/carbins/Cabecera_2025_Barcelona.ts +34 -34
- package/src/carbins/Cabecera_2025_Madrid.ts +34 -34
- package/src/carbins/Contenido_2025_Alcorcon.ts +76 -76
- package/src/carbins/Contenido_2025_Cordoba.ts +59 -59
- package/src/carbins/Contenido_2025_Granada.ts +67 -67
- package/src/carbins/Contenido_2025_Malaga.ts +100 -100
- package/src/carbins/Contenido_2025_Montevideo.ts +56 -56
- package/src/carbins/Footer_2025_Napoles.ts +12 -12
- package/src/carbins/Formulario_2025_Seul.ts +56 -56
- package/src/carbins/Imagen_2025_Bogota.ts +76 -76
- package/src/carbins/ReactButton.ts +32 -32
- package/src/carbins/Repetidor_2025_Cabra.ts +12 -12
- package/src/carbins/Repetidor_2025_Dubai.ts +48 -48
- package/src/carbins/Repetidor_2025_Estocolmo.ts +12 -12
- package/src/carbins/Repetidor_2025_Mallorca.ts +75 -75
- package/src/carbins/Repetidor_2025_Menorca.ts +75 -75
- package/src/carbins/Repetidor_2025_Michigan.ts +21 -21
- package/src/carbins/Repetidor_2025_Orcasitas.ts +34 -34
- package/src/carbins/Repetidor_2025_Oslo.ts +12 -12
- package/src/carbins/Repetidor_2025_Quito.ts +20 -20
- package/src/carbins/Repetidor_2025_Seattle.ts +12 -12
- package/src/carbins/Repetidor_2025_Tokyo.ts +48 -48
- package/src/carbins/Repetidor_2025_Ubeda.ts +12 -12
- package/src/carbins/Repetidor_2025_Yakarta.ts +12 -12
- package/src/carbins/SEO_Head_Section.ts +49 -49
- package/src/carbins/Separador_2025_Reinosa.ts +12 -12
- package/src/carbins/Titulo_2025_Algeciras.ts +51 -51
- package/src/carbins/Titulo_2025_Santorini.ts +20 -20
- package/src/carbins/Video_2025_Valencia.ts +12 -12
- package/src/carbins/VueButton.ts +35 -35
- package/src/components/Astro/Button.astro +5 -5
- package/src/components/Astro/CTA_2025_Formentera.astro +38 -38
- package/src/components/Astro/Cabecera_2025_Barcelona.astro +55 -55
- package/src/components/Astro/Cabecera_2025_Madrid.astro +176 -176
- package/src/components/Astro/Contenido_2025_Alcorcon.astro +48 -78
- package/src/components/Astro/Contenido_2025_Granada.astro +239 -239
- package/src/components/Astro/Contenido_2025_Malaga.astro +162 -162
- package/src/components/Astro/Contenido_2025_Montevideo.astro +35 -35
- package/src/components/Astro/Footer_2025_Napoles.astro +134 -134
- package/src/components/Astro/Formulario_2025_Seul.astro +91 -91
- package/src/components/Astro/Imagen_2025_Bogota.astro +61 -61
- package/src/components/Astro/Repetidor_2025_Cabra.astro +152 -152
- package/src/components/Astro/Repetidor_2025_Cordoba.astro +132 -132
- package/src/components/Astro/Repetidor_2025_Dubai.astro +29 -29
- package/src/components/Astro/Repetidor_2025_Estocolmo.astro +22 -22
- package/src/components/Astro/Repetidor_2025_Mallorca.astro +42 -42
- package/src/components/Astro/Repetidor_2025_Menorca.astro +43 -43
- package/src/components/Astro/Repetidor_2025_Michigan.astro +45 -45
- package/src/components/Astro/Repetidor_2025_Orcasitas.astro +2 -0
- package/src/components/Astro/Repetidor_2025_Oslo.astro +76 -76
- package/src/components/Astro/Repetidor_2025_Quito.astro +61 -61
- package/src/components/Astro/Repetidor_2025_Seattle.astro +22 -22
- package/src/components/Astro/Repetidor_2025_Tokyo.astro +56 -56
- package/src/components/Astro/Repetidor_2025_Ubeda.astro +39 -39
- package/src/components/Astro/Repetidor_2025_Yakarta.astro +203 -203
- package/src/components/Astro/SEO_Head_Section.astro +32 -32
- package/src/components/Astro/Separador_2025_Reinosa.astro +3 -3
- package/src/components/Astro/Titulo_2025_Algeciras.astro +57 -57
- package/src/components/Astro/Titulo_2025_Santorini.astro +8 -8
- package/src/components/Astro/Video_2025_Valencia.astro +0 -1
- package/src/generated/componentRegistry.ts +96 -96
- package/src/index.ts +123 -123
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
---
|
|
2
|
-
const {
|
|
3
|
-
title,
|
|
4
|
-
description,
|
|
5
|
-
buttonText,
|
|
6
|
-
buttonUrl,
|
|
7
|
-
showBtn,
|
|
8
|
-
items
|
|
9
|
-
} = Astro.props;
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
<article class="w-full flex flex-col md:flex-row text-center items-center justify-center p-6 md:p-12 bg-cover bg-[url(https://assets.lefebvre.es/media/icons-2/png/icon-shield-228x248.png)] bg-[#F5F6FA] bg-no-repeat bg-position-[center_center] md:bg-auto md:bg-position-[-60px_center] rounded-2xl">
|
|
13
|
-
<div class="w-full md:w-2/3 flex flex-col text-left p-0 mb-4 md:pl-[140px]">
|
|
14
|
-
<h2 class="text-[28px] md:text-[2em] leading-[36px] md:leading-[46px] mb-[16px] font-poppins text-[#262626] font-normal">{title}</h2>
|
|
15
|
-
<div class="max-w-[900px] text-[#363942] font-inter font-normal text-base not-italic leading-[24px] flex flex-col gap-4 mb-8">
|
|
16
|
-
<p set:html={description}></p>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="w-full flex">
|
|
19
|
-
{showBtn ? (
|
|
20
|
-
<div class="flex justify-center gap-2">
|
|
21
|
-
<a href={buttonUrl} class="pl-0 lg:pl-[20px] font-inter font-semibold text-base text-[#001978] hover:text-[#262626] transition-all duration-300 cursor-pointer">{buttonText}</a>
|
|
22
|
-
<div class="flex justify-center">
|
|
23
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
24
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.7455 20.8049C7.43901 20.5263 7.41642 20.052 7.69505 19.7455L14.7364 12L7.69505 4.2545C7.41642 3.94801 7.43901 3.47367 7.7455 3.19504C8.05199 2.91641 8.52633 2.939 8.80496 3.24549L16.305 11.4955C16.565 11.7816 16.565 12.2184 16.305 12.5045L8.80496 20.7545C8.52633 21.061 8.05199 21.0836 7.7455 20.8049Z" fill="#001978"/>
|
|
25
|
-
</svg>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
) : (
|
|
30
|
-
<div class="flex justify-center"></div>
|
|
31
|
-
)}
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="w-full max-w-7xl flex flex-wrap p-0 lg:flex-nowrap md:p-4 justify-center lg:justify-end items-start ">
|
|
35
|
-
{items.map(item => (
|
|
36
|
-
<article class="w-1/3 flex-wrap md:w-1/3 md:flex-nowrap lg:w-1/2 p-1 py-[16px] md:p-[16px]">
|
|
37
|
-
<div class="w-full flex flex-col">
|
|
38
|
-
<div class="w-full">
|
|
39
|
-
{item.link ? (
|
|
40
|
-
<a href={item.link} class="w-full flex flex-col flex-1 justify-center items-center">
|
|
41
|
-
<img class="max-w-[80px] w-fit mb-4" src={item.image} alt={item.altImage} />
|
|
42
|
-
<p class="text-[14px] text-[#363942]" set:html={item.descriptionImage}></p>
|
|
43
|
-
</a>
|
|
44
|
-
) : (
|
|
45
|
-
<div class="w-full flex flex-col flex-1 justify-center items-center max-h-[94px]">
|
|
46
|
-
<img class="max-w-[80px] w-fit mb-4" src={item.image} alt={item.altImage} />
|
|
47
|
-
</div>
|
|
48
|
-
<div class="w-full flex flex-col flex-1 justify-center items-center">
|
|
49
|
-
<p class="text-[14px] text-[#363942]" set:html={item.descriptionImage}></p>
|
|
50
|
-
</div>
|
|
51
|
-
)}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</article>
|
|
55
|
-
))}
|
|
56
|
-
</div>
|
|
1
|
+
---
|
|
2
|
+
const {
|
|
3
|
+
title,
|
|
4
|
+
description,
|
|
5
|
+
buttonText,
|
|
6
|
+
buttonUrl,
|
|
7
|
+
showBtn,
|
|
8
|
+
items
|
|
9
|
+
} = Astro.props;
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
<article class="w-full flex flex-col md:flex-row text-center items-center justify-center p-6 md:p-12 bg-cover bg-[url(https://assets.lefebvre.es/media/icons-2/png/icon-shield-228x248.png)] bg-[#F5F6FA] bg-no-repeat bg-position-[center_center] md:bg-auto md:bg-position-[-60px_center] rounded-2xl">
|
|
13
|
+
<div class="w-full md:w-2/3 flex flex-col text-left p-0 mb-4 md:pl-[140px]">
|
|
14
|
+
<h2 class="text-[28px] md:text-[2em] leading-[36px] md:leading-[46px] mb-[16px] font-poppins text-[#262626] font-normal">{title}</h2>
|
|
15
|
+
<div class="max-w-[900px] text-[#363942] font-inter font-normal text-base not-italic leading-[24px] flex flex-col gap-4 mb-8">
|
|
16
|
+
<p set:html={description}></p>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="w-full flex">
|
|
19
|
+
{showBtn ? (
|
|
20
|
+
<div class="flex justify-center gap-2">
|
|
21
|
+
<a href={buttonUrl} class="pl-0 lg:pl-[20px] font-inter font-semibold text-base text-[#001978] hover:text-[#262626] transition-all duration-300 cursor-pointer">{buttonText}</a>
|
|
22
|
+
<div class="flex justify-center">
|
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
|
24
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.7455 20.8049C7.43901 20.5263 7.41642 20.052 7.69505 19.7455L14.7364 12L7.69505 4.2545C7.41642 3.94801 7.43901 3.47367 7.7455 3.19504C8.05199 2.91641 8.52633 2.939 8.80496 3.24549L16.305 11.4955C16.565 11.7816 16.565 12.2184 16.305 12.5045L8.80496 20.7545C8.52633 21.061 8.05199 21.0836 7.7455 20.8049Z" fill="#001978"/>
|
|
25
|
+
</svg>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
) : (
|
|
30
|
+
<div class="flex justify-center"></div>
|
|
31
|
+
)}
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="w-full max-w-7xl flex flex-wrap p-0 lg:flex-nowrap md:p-4 justify-center lg:justify-end items-start ">
|
|
35
|
+
{items.map(item => (
|
|
36
|
+
<article class="w-1/3 flex-wrap md:w-1/3 md:flex-nowrap lg:w-1/2 p-1 py-[16px] md:p-[16px]">
|
|
37
|
+
<div class="w-full flex flex-col">
|
|
38
|
+
<div class="w-full">
|
|
39
|
+
{item.link ? (
|
|
40
|
+
<a href={item.link} class="w-full flex flex-col flex-1 justify-center items-center">
|
|
41
|
+
<img class="max-w-[80px] w-fit mb-4" src={item.image} alt={item.altImage} />
|
|
42
|
+
<p class="text-[14px] text-[#363942]" set:html={item.descriptionImage}></p>
|
|
43
|
+
</a>
|
|
44
|
+
) : (
|
|
45
|
+
<div class="w-full flex flex-col flex-1 justify-center items-center max-h-[94px]">
|
|
46
|
+
<img class="max-w-[80px] w-fit mb-4" src={item.image} alt={item.altImage} />
|
|
47
|
+
</div>
|
|
48
|
+
<div class="w-full flex flex-col flex-1 justify-center items-center">
|
|
49
|
+
<p class="text-[14px] text-[#363942]" set:html={item.descriptionImage}></p>
|
|
50
|
+
</div>
|
|
51
|
+
)}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</article>
|
|
55
|
+
))}
|
|
56
|
+
</div>
|
|
57
57
|
</article>
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
const {
|
|
3
|
-
items = [],
|
|
4
|
-
} = Astro.props;
|
|
5
|
-
|
|
6
|
-
const structuredData = `<script type="application/ld+json">
|
|
7
|
-
{
|
|
8
|
-
"@context": "https://schema.org",
|
|
9
|
-
"@type": "ItemList",
|
|
10
|
-
"numberOfItems": ${items.length},
|
|
11
|
-
"itemListElement": [
|
|
12
|
-
${items.map((item, index) => `{
|
|
13
|
-
"@type": "ListItem",
|
|
14
|
-
"position": ${index + 1},
|
|
15
|
-
"item": {
|
|
16
|
-
"@type": "Thing",
|
|
17
|
-
"name": "${item.title}",
|
|
18
|
-
"description": "${item.description.replace(/"/g, '\\"').replace(/<[^>]*>/g, '')}"
|
|
19
|
-
}
|
|
20
|
-
}`).join(',')}
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
</script>`;
|
|
24
|
-
---
|
|
25
|
-
<section class="w-full flex items-center justify-center bg-[#001978]/4 py-[48px]">
|
|
26
|
-
<article class="flex flex-col items-center justify-center p-4">
|
|
27
|
-
<div class="flex flex-col md:flex-row items-center gap-4">
|
|
28
|
-
{items.map(item => (
|
|
29
|
-
<div class="w-full md:w-1/3 content-center flex flex-col flex-wrap h-full text-[#262626] nth-of-type-2:p-4 nth-of-type-2:border nth-of-type-2:border-y-1 nth-of-type-2:border-x-0 md:nth-of-type-2:border md:nth-of-type-2:border-x-1 md:nth-of-type-2:border-y-0 ">
|
|
30
|
-
<p class="text-[40px] md:text-[56px] text-center leading-[48px] md:leading-[64px] mb-[16px] font-poppins font-semibold">{item.title}</p>
|
|
31
|
-
<p
|
|
32
|
-
class="text-xl text-center font-inter font-normal leading-[28px] flex flex-col gap-4"
|
|
33
|
-
set:html={item.description}></p>
|
|
34
|
-
</div>
|
|
35
|
-
))}
|
|
36
|
-
</div>
|
|
37
|
-
</article>
|
|
38
|
-
</section>
|
|
39
|
-
|
|
1
|
+
---
|
|
2
|
+
const {
|
|
3
|
+
items = [],
|
|
4
|
+
} = Astro.props;
|
|
5
|
+
|
|
6
|
+
const structuredData = `<script type="application/ld+json">
|
|
7
|
+
{
|
|
8
|
+
"@context": "https://schema.org",
|
|
9
|
+
"@type": "ItemList",
|
|
10
|
+
"numberOfItems": ${items.length},
|
|
11
|
+
"itemListElement": [
|
|
12
|
+
${items.map((item, index) => `{
|
|
13
|
+
"@type": "ListItem",
|
|
14
|
+
"position": ${index + 1},
|
|
15
|
+
"item": {
|
|
16
|
+
"@type": "Thing",
|
|
17
|
+
"name": "${item.title}",
|
|
18
|
+
"description": "${item.description.replace(/"/g, '\\"').replace(/<[^>]*>/g, '')}"
|
|
19
|
+
}
|
|
20
|
+
}`).join(',')}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
</script>`;
|
|
24
|
+
---
|
|
25
|
+
<section class="w-full flex items-center justify-center bg-[#001978]/4 py-[48px]">
|
|
26
|
+
<article class="flex flex-col items-center justify-center p-4">
|
|
27
|
+
<div class="flex flex-col md:flex-row items-center gap-4">
|
|
28
|
+
{items.map(item => (
|
|
29
|
+
<div class="w-full md:w-1/3 content-center flex flex-col flex-wrap h-full text-[#262626] nth-of-type-2:p-4 nth-of-type-2:border nth-of-type-2:border-y-1 nth-of-type-2:border-x-0 md:nth-of-type-2:border md:nth-of-type-2:border-x-1 md:nth-of-type-2:border-y-0 ">
|
|
30
|
+
<p class="text-[40px] md:text-[56px] text-center leading-[48px] md:leading-[64px] mb-[16px] font-poppins font-semibold">{item.title}</p>
|
|
31
|
+
<p
|
|
32
|
+
class="text-xl text-center font-inter font-normal leading-[28px] flex flex-col gap-4"
|
|
33
|
+
set:html={item.description}></p>
|
|
34
|
+
</div>
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
</article>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
40
|
<Fragment set:html={structuredData} />
|
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
const {
|
|
4
|
-
items = [],
|
|
5
|
-
iframeSrc
|
|
6
|
-
} = Astro.props;
|
|
7
|
-
|
|
8
|
-
const idAccordion = 'js-acordeon-' + Math.random().toString(36).substring(2, 15);
|
|
9
|
-
|
|
10
|
-
const structuredData = `<script type="application/ld+json">
|
|
11
|
-
{
|
|
12
|
-
"@context": "https://schema.org",
|
|
13
|
-
"@type": "WebPageElement",
|
|
14
|
-
"name": "Interactive Content Carousel",
|
|
15
|
-
"description": "A rotating carousel component displaying multiple content items with videos",
|
|
16
|
-
"mainEntity": {
|
|
17
|
-
"@type": "ItemList",
|
|
18
|
-
"numberOfItems": ${items.length},
|
|
19
|
-
"itemListElement": [
|
|
20
|
-
${items.map((item, index) => `{
|
|
21
|
-
"@type": "ListItem",
|
|
22
|
-
"position": ${index + 1},
|
|
23
|
-
"item": {
|
|
24
|
-
"@type": "VideoObject",
|
|
25
|
-
"thumbnailUrl": "${item.thumbnailUrl || ''}",
|
|
26
|
-
"duration": "${item.duration || 'PT0M'}",
|
|
27
|
-
"name": "${item.title || ''}",
|
|
28
|
-
"description": "${item.description ? item.description.replace(/<[^>]*>/g, '').replace(/"/g, '\\"') : ''}",
|
|
29
|
-
"contentUrl": "${item.iframeSrc || ''}",
|
|
30
|
-
"embedUrl": "${item.iframeSrc || ''}",
|
|
31
|
-
"uploadDate": "${new Date().toISOString()}",
|
|
32
|
-
"duration": "PT0M",
|
|
33
|
-
"interactionStatistic": {
|
|
34
|
-
"@type": "InteractionCounter",
|
|
35
|
-
"interactionType": "https://schema.org/WatchAction",
|
|
36
|
-
"userInteractionCount": 0
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}`).join(',\n ')}
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
"interactionStatistic": {
|
|
43
|
-
"@type": "InteractionCounter",
|
|
44
|
-
"interactionType": "https://schema.org/ViewAction",
|
|
45
|
-
"userInteractionCount": 0
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
</script>`;
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<section class="w-full flex items-center justify-center py-2 md:py-[80px]">
|
|
53
|
-
<article class="w-full flex flex-col items-center justify-center">
|
|
54
|
-
<div class="w-2/5 flex justify-center items-center relative text-[56px] text-center font-poppins font-normal leading-[64px] mb-0 md:mb-[48px]">
|
|
55
|
-
<!-- <div class="flex bg-[#001978]/4 border border-[#B6B7BB] rounded-lg"> -->
|
|
56
|
-
<div class="flex gap-1 md:gap-8 items-center">
|
|
57
|
-
{items.map((item, index) => (
|
|
58
|
-
<p class="text-base">
|
|
59
|
-
{/* <a href={`#accordion${index + 1}`} class="btn py-[20px] px-[16px]">{item}</a> */}
|
|
60
|
-
<button data-linkedto={`${idAccordion}${index + 1}`}
|
|
61
|
-
class={`
|
|
62
|
-
btn py-[12px] px-[20px] leading-[24px] font-inter
|
|
63
|
-
cursor-pointer border border-transparent bg-F2F3F8
|
|
64
|
-
hover:border hover:border-[#5F6168]
|
|
65
|
-
hover:bg-white rounded-lg ${idAccordion}button
|
|
66
|
-
${item.default ? 'active' : ''}
|
|
67
|
-
text-gray-100 max-w-[40px] max-h-[20px] text-[0px]
|
|
68
|
-
md:bg-gray-50 md:text-black md:max-w-none md:max-h-none md:text-[16px]
|
|
69
|
-
`}
|
|
70
|
-
>{item.name}</button>
|
|
71
|
-
</p>
|
|
72
|
-
))}
|
|
73
|
-
</div>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="w-full px-6 md:w-3/5 md:px-[0] col my-[40px]">
|
|
76
|
-
{items.map((item, index) => (
|
|
77
|
-
<div id={`${idAccordion}${index + 1}`} class={`${item.default ? '' : 'hidden'} collapse-arrow ${idAccordion}item`}>
|
|
78
|
-
<div class="collapse-title" id={`accordion${index + 1}`}>
|
|
79
|
-
<div class="w-full flex flex-col lg:flex-row flex-1 gap-[48px]">
|
|
80
|
-
<div class="w-full flex flex-col justify-start">
|
|
81
|
-
<h3 class="text-[28px] md:text-[32px] leading-[36px] mb-[8px] text-[#363942] font-semibold not-italic font-poppins">{item.title}</h3>
|
|
82
|
-
<p class="text-[#363942] font-poppins font-normal text-[20px] not-italic leading-[28px]" set:html={item.description}></p>
|
|
83
|
-
</div>
|
|
84
|
-
<div class="w-full lg:w-2/2 flex items-start">
|
|
85
|
-
{/* <img src="/assets/images/genial/gradient-bg.webp" alt="Imagen" class="w-full h-auto rounded-xl" /> */}
|
|
86
|
-
<video autoplay loop muted playsinline class="w-full h-auto rounded-xl">
|
|
87
|
-
<source src={item.iframeSrc} type="video/mp4" />
|
|
88
|
-
</video>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
))}
|
|
94
|
-
</div>
|
|
95
|
-
</article>
|
|
96
|
-
</section>
|
|
97
|
-
|
|
98
|
-
<style>
|
|
99
|
-
.bg-F2F3F8 {
|
|
100
|
-
background-color: #F2F3F8;
|
|
101
|
-
}
|
|
102
|
-
.active{
|
|
103
|
-
background-color: #ffffff;
|
|
104
|
-
border: 1px solid #5F6168;
|
|
105
|
-
color: black;
|
|
106
|
-
max-width: none;
|
|
107
|
-
max-height: none;
|
|
108
|
-
font-size: 16px;
|
|
109
|
-
|
|
110
|
-
&:hover{
|
|
111
|
-
background-color: #ffffff;
|
|
112
|
-
border: 1px solid #5F6168;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
</style>
|
|
116
|
-
|
|
117
|
-
<script is:inline define:vars={{ idAccordion }}>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
let rotationInterval = null;
|
|
121
|
-
let currentIndex = 0;
|
|
122
|
-
let seconds = 4;
|
|
123
|
-
|
|
124
|
-
const buttons = document.querySelectorAll(`.${idAccordion}button`);
|
|
125
|
-
|
|
126
|
-
function startRotation() {
|
|
127
|
-
if (rotationInterval) return; // Already running
|
|
128
|
-
|
|
129
|
-
rotationInterval = setInterval(() => {
|
|
130
|
-
if (buttons.length > 0) {
|
|
131
|
-
// Always move to next index first
|
|
132
|
-
currentIndex = (currentIndex + 1) % buttons.length;
|
|
133
|
-
// Nota David: Comentamos el click y liamos el chocho de debajo porque manda eventos en GTM
|
|
134
|
-
// buttons[currentIndex].click();
|
|
135
|
-
// Reemplaza lo de arriba
|
|
136
|
-
const btn = buttons[currentIndex];
|
|
137
|
-
const linkedId = btn.getAttribute('data-linkedto');
|
|
138
|
-
const targetItem = document.getElementById(linkedId);
|
|
139
|
-
|
|
140
|
-
if (targetItem) {
|
|
141
|
-
const collapseCount = document.querySelectorAll(`.${idAccordion}item.collapse`).length;
|
|
142
|
-
const hiddenCount = document.querySelectorAll(`.${idAccordion}item.hidden`).length;
|
|
143
|
-
const desiredClass = collapseCount > hiddenCount ? 'collapse' : 'hidden';
|
|
144
|
-
|
|
145
|
-
document.querySelectorAll(`.${idAccordion}item`).forEach(item => {
|
|
146
|
-
if (item === targetItem) return;
|
|
147
|
-
if (item.classList.contains(desiredClass)) return;
|
|
148
|
-
item.classList.add(desiredClass);
|
|
149
|
-
});
|
|
150
|
-
targetItem.classList.toggle(desiredClass);
|
|
151
|
-
|
|
152
|
-
document.querySelectorAll(`.${idAccordion}button`).forEach(item => {
|
|
153
|
-
if (item === btn) return;
|
|
154
|
-
item.classList.remove('active');
|
|
155
|
-
});
|
|
156
|
-
btn.classList.toggle('active');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
}, seconds * 3000);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
function stopRotation() {
|
|
164
|
-
if (rotationInterval) {
|
|
165
|
-
clearInterval(rotationInterval);
|
|
166
|
-
rotationInterval = null;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Start automatic rotation
|
|
171
|
-
startRotation();
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
document.querySelectorAll(`.${idAccordion}button`).forEach(btn => {
|
|
175
|
-
btn.addEventListener('mouseenter', stopRotation);
|
|
176
|
-
|
|
177
|
-
btn.addEventListener('click', (e) => {
|
|
178
|
-
const linkedId = btn.getAttribute('data-linkedto');
|
|
179
|
-
const targetItem = document.getElementById(linkedId);
|
|
180
|
-
if (targetItem) {
|
|
181
|
-
|
|
182
|
-
const collapseCount = document.querySelectorAll(`.${idAccordion}item.collapse`).length;
|
|
183
|
-
const hiddenCount = document.querySelectorAll(`.${idAccordion}item.hidden`).length;
|
|
184
|
-
const desiredClass = collapseCount > hiddenCount ? 'collapse' : 'hidden';
|
|
185
|
-
|
|
186
|
-
document.querySelectorAll(`.${idAccordion}item`).forEach(item => {
|
|
187
|
-
if (item === targetItem) return;
|
|
188
|
-
if (item.classList.contains(desiredClass)) return;
|
|
189
|
-
item.classList.add(desiredClass);
|
|
190
|
-
});
|
|
191
|
-
targetItem.classList.toggle(desiredClass);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
document.querySelectorAll(`.${idAccordion}button`).forEach(item => {
|
|
195
|
-
if (item === btn) return;
|
|
196
|
-
item.classList.remove('active');
|
|
197
|
-
});
|
|
198
|
-
btn.classList.toggle('active');
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
});
|
|
202
|
-
</script>
|
|
203
|
-
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
items = [],
|
|
5
|
+
iframeSrc
|
|
6
|
+
} = Astro.props;
|
|
7
|
+
|
|
8
|
+
const idAccordion = 'js-acordeon-' + Math.random().toString(36).substring(2, 15);
|
|
9
|
+
|
|
10
|
+
const structuredData = `<script type="application/ld+json">
|
|
11
|
+
{
|
|
12
|
+
"@context": "https://schema.org",
|
|
13
|
+
"@type": "WebPageElement",
|
|
14
|
+
"name": "Interactive Content Carousel",
|
|
15
|
+
"description": "A rotating carousel component displaying multiple content items with videos",
|
|
16
|
+
"mainEntity": {
|
|
17
|
+
"@type": "ItemList",
|
|
18
|
+
"numberOfItems": ${items.length},
|
|
19
|
+
"itemListElement": [
|
|
20
|
+
${items.map((item, index) => `{
|
|
21
|
+
"@type": "ListItem",
|
|
22
|
+
"position": ${index + 1},
|
|
23
|
+
"item": {
|
|
24
|
+
"@type": "VideoObject",
|
|
25
|
+
"thumbnailUrl": "${item.thumbnailUrl || ''}",
|
|
26
|
+
"duration": "${item.duration || 'PT0M'}",
|
|
27
|
+
"name": "${item.title || ''}",
|
|
28
|
+
"description": "${item.description ? item.description.replace(/<[^>]*>/g, '').replace(/"/g, '\\"') : ''}",
|
|
29
|
+
"contentUrl": "${item.iframeSrc || ''}",
|
|
30
|
+
"embedUrl": "${item.iframeSrc || ''}",
|
|
31
|
+
"uploadDate": "${new Date().toISOString()}",
|
|
32
|
+
"duration": "PT0M",
|
|
33
|
+
"interactionStatistic": {
|
|
34
|
+
"@type": "InteractionCounter",
|
|
35
|
+
"interactionType": "https://schema.org/WatchAction",
|
|
36
|
+
"userInteractionCount": 0
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}`).join(',\n ')}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
"interactionStatistic": {
|
|
43
|
+
"@type": "InteractionCounter",
|
|
44
|
+
"interactionType": "https://schema.org/ViewAction",
|
|
45
|
+
"userInteractionCount": 0
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
</script>`;
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
<section class="w-full flex items-center justify-center py-2 md:py-[80px]">
|
|
53
|
+
<article class="w-full flex flex-col items-center justify-center">
|
|
54
|
+
<div class="w-2/5 flex justify-center items-center relative text-[56px] text-center font-poppins font-normal leading-[64px] mb-0 md:mb-[48px]">
|
|
55
|
+
<!-- <div class="flex bg-[#001978]/4 border border-[#B6B7BB] rounded-lg"> -->
|
|
56
|
+
<div class="flex gap-1 md:gap-8 items-center">
|
|
57
|
+
{items.map((item, index) => (
|
|
58
|
+
<p class="text-base">
|
|
59
|
+
{/* <a href={`#accordion${index + 1}`} class="btn py-[20px] px-[16px]">{item}</a> */}
|
|
60
|
+
<button data-linkedto={`${idAccordion}${index + 1}`}
|
|
61
|
+
class={`
|
|
62
|
+
btn py-[12px] px-[20px] leading-[24px] font-inter
|
|
63
|
+
cursor-pointer border border-transparent bg-F2F3F8
|
|
64
|
+
hover:border hover:border-[#5F6168]
|
|
65
|
+
hover:bg-white rounded-lg ${idAccordion}button
|
|
66
|
+
${item.default ? 'active' : ''}
|
|
67
|
+
text-gray-100 max-w-[40px] max-h-[20px] text-[0px]
|
|
68
|
+
md:bg-gray-50 md:text-black md:max-w-none md:max-h-none md:text-[16px]
|
|
69
|
+
`}
|
|
70
|
+
>{item.name}</button>
|
|
71
|
+
</p>
|
|
72
|
+
))}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="w-full px-6 md:w-3/5 md:px-[0] col my-[40px]">
|
|
76
|
+
{items.map((item, index) => (
|
|
77
|
+
<div id={`${idAccordion}${index + 1}`} class={`${item.default ? '' : 'hidden'} collapse-arrow ${idAccordion}item`}>
|
|
78
|
+
<div class="collapse-title" id={`accordion${index + 1}`}>
|
|
79
|
+
<div class="w-full flex flex-col lg:flex-row flex-1 gap-[48px]">
|
|
80
|
+
<div class="w-full flex flex-col justify-start">
|
|
81
|
+
<h3 class="text-[28px] md:text-[32px] leading-[36px] mb-[8px] text-[#363942] font-semibold not-italic font-poppins">{item.title}</h3>
|
|
82
|
+
<p class="text-[#363942] font-poppins font-normal text-[20px] not-italic leading-[28px]" set:html={item.description}></p>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="w-full lg:w-2/2 flex items-start">
|
|
85
|
+
{/* <img src="/assets/images/genial/gradient-bg.webp" alt="Imagen" class="w-full h-auto rounded-xl" /> */}
|
|
86
|
+
<video autoplay loop muted playsinline class="w-full h-auto rounded-xl">
|
|
87
|
+
<source src={item.iframeSrc} type="video/mp4" />
|
|
88
|
+
</video>
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
))}
|
|
94
|
+
</div>
|
|
95
|
+
</article>
|
|
96
|
+
</section>
|
|
97
|
+
|
|
98
|
+
<style>
|
|
99
|
+
.bg-F2F3F8 {
|
|
100
|
+
background-color: #F2F3F8;
|
|
101
|
+
}
|
|
102
|
+
.active{
|
|
103
|
+
background-color: #ffffff;
|
|
104
|
+
border: 1px solid #5F6168;
|
|
105
|
+
color: black;
|
|
106
|
+
max-width: none;
|
|
107
|
+
max-height: none;
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
|
|
110
|
+
&:hover{
|
|
111
|
+
background-color: #ffffff;
|
|
112
|
+
border: 1px solid #5F6168;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
</style>
|
|
116
|
+
|
|
117
|
+
<script is:inline define:vars={{ idAccordion }}>
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
let rotationInterval = null;
|
|
121
|
+
let currentIndex = 0;
|
|
122
|
+
let seconds = 4;
|
|
123
|
+
|
|
124
|
+
const buttons = document.querySelectorAll(`.${idAccordion}button`);
|
|
125
|
+
|
|
126
|
+
function startRotation() {
|
|
127
|
+
if (rotationInterval) return; // Already running
|
|
128
|
+
|
|
129
|
+
rotationInterval = setInterval(() => {
|
|
130
|
+
if (buttons.length > 0) {
|
|
131
|
+
// Always move to next index first
|
|
132
|
+
currentIndex = (currentIndex + 1) % buttons.length;
|
|
133
|
+
// Nota David: Comentamos el click y liamos el chocho de debajo porque manda eventos en GTM
|
|
134
|
+
// buttons[currentIndex].click();
|
|
135
|
+
// Reemplaza lo de arriba
|
|
136
|
+
const btn = buttons[currentIndex];
|
|
137
|
+
const linkedId = btn.getAttribute('data-linkedto');
|
|
138
|
+
const targetItem = document.getElementById(linkedId);
|
|
139
|
+
|
|
140
|
+
if (targetItem) {
|
|
141
|
+
const collapseCount = document.querySelectorAll(`.${idAccordion}item.collapse`).length;
|
|
142
|
+
const hiddenCount = document.querySelectorAll(`.${idAccordion}item.hidden`).length;
|
|
143
|
+
const desiredClass = collapseCount > hiddenCount ? 'collapse' : 'hidden';
|
|
144
|
+
|
|
145
|
+
document.querySelectorAll(`.${idAccordion}item`).forEach(item => {
|
|
146
|
+
if (item === targetItem) return;
|
|
147
|
+
if (item.classList.contains(desiredClass)) return;
|
|
148
|
+
item.classList.add(desiredClass);
|
|
149
|
+
});
|
|
150
|
+
targetItem.classList.toggle(desiredClass);
|
|
151
|
+
|
|
152
|
+
document.querySelectorAll(`.${idAccordion}button`).forEach(item => {
|
|
153
|
+
if (item === btn) return;
|
|
154
|
+
item.classList.remove('active');
|
|
155
|
+
});
|
|
156
|
+
btn.classList.toggle('active');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
}, seconds * 3000);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function stopRotation() {
|
|
164
|
+
if (rotationInterval) {
|
|
165
|
+
clearInterval(rotationInterval);
|
|
166
|
+
rotationInterval = null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Start automatic rotation
|
|
171
|
+
startRotation();
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
document.querySelectorAll(`.${idAccordion}button`).forEach(btn => {
|
|
175
|
+
btn.addEventListener('mouseenter', stopRotation);
|
|
176
|
+
|
|
177
|
+
btn.addEventListener('click', (e) => {
|
|
178
|
+
const linkedId = btn.getAttribute('data-linkedto');
|
|
179
|
+
const targetItem = document.getElementById(linkedId);
|
|
180
|
+
if (targetItem) {
|
|
181
|
+
|
|
182
|
+
const collapseCount = document.querySelectorAll(`.${idAccordion}item.collapse`).length;
|
|
183
|
+
const hiddenCount = document.querySelectorAll(`.${idAccordion}item.hidden`).length;
|
|
184
|
+
const desiredClass = collapseCount > hiddenCount ? 'collapse' : 'hidden';
|
|
185
|
+
|
|
186
|
+
document.querySelectorAll(`.${idAccordion}item`).forEach(item => {
|
|
187
|
+
if (item === targetItem) return;
|
|
188
|
+
if (item.classList.contains(desiredClass)) return;
|
|
189
|
+
item.classList.add(desiredClass);
|
|
190
|
+
});
|
|
191
|
+
targetItem.classList.toggle(desiredClass);
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
document.querySelectorAll(`.${idAccordion}button`).forEach(item => {
|
|
195
|
+
if (item === btn) return;
|
|
196
|
+
item.classList.remove('active');
|
|
197
|
+
});
|
|
198
|
+
btn.classList.toggle('active');
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
});
|
|
202
|
+
</script>
|
|
203
|
+
|
|
204
204
|
<Fragment set:html={structuredData} />
|