libreria-astro-lefebvre 0.0.27 → 0.0.29

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.
Files changed (65) hide show
  1. package/README.md +46 -46
  2. package/package.json +30 -30
  3. package/src/carbins/AstroButton.ts +34 -34
  4. package/src/carbins/CTA_2025_Formentera.ts +47 -47
  5. package/src/carbins/Cabecera_2025_Barcelona.ts +34 -34
  6. package/src/carbins/Cabecera_2025_Madrid.ts +34 -34
  7. package/src/carbins/Contenido_2025_Alcorcon.ts +76 -76
  8. package/src/carbins/Contenido_2025_Cordoba.ts +59 -59
  9. package/src/carbins/Contenido_2025_Granada.ts +67 -67
  10. package/src/carbins/Contenido_2025_Malaga.ts +100 -100
  11. package/src/carbins/Contenido_2025_Montevideo.ts +56 -56
  12. package/src/carbins/Footer_2025_Napoles.ts +12 -12
  13. package/src/carbins/Formulario_2025_Seul.ts +56 -56
  14. package/src/carbins/Imagen_2025_Bogota.ts +76 -76
  15. package/src/carbins/ReactButton.ts +32 -32
  16. package/src/carbins/Repetidor_2025_Cabra.ts +12 -12
  17. package/src/carbins/Repetidor_2025_Dubai.ts +48 -48
  18. package/src/carbins/Repetidor_2025_Estocolmo.ts +12 -12
  19. package/src/carbins/Repetidor_2025_Mallorca.ts +75 -75
  20. package/src/carbins/Repetidor_2025_Menorca.ts +75 -75
  21. package/src/carbins/Repetidor_2025_Michigan.ts +21 -21
  22. package/src/carbins/Repetidor_2025_Orcasitas.ts +34 -34
  23. package/src/carbins/Repetidor_2025_Oslo.ts +12 -12
  24. package/src/carbins/Repetidor_2025_Quito.ts +20 -20
  25. package/src/carbins/Repetidor_2025_Seattle.ts +12 -12
  26. package/src/carbins/Repetidor_2025_Tokyo.ts +48 -48
  27. package/src/carbins/Repetidor_2025_Ubeda.ts +12 -12
  28. package/src/carbins/Repetidor_2025_Yakarta.ts +12 -12
  29. package/src/carbins/SEO_Head_Section.ts +49 -49
  30. package/src/carbins/Separador_2025_Reinosa.ts +12 -12
  31. package/src/carbins/Titulo_2025_Algeciras.ts +51 -51
  32. package/src/carbins/Titulo_2025_Santorini.ts +20 -20
  33. package/src/carbins/Video_2025_Valencia.ts +12 -12
  34. package/src/carbins/VueButton.ts +35 -35
  35. package/src/components/Astro/Button.astro +5 -5
  36. package/src/components/Astro/CTA_2025_Formentera.astro +38 -38
  37. package/src/components/Astro/Cabecera_2025_Barcelona.astro +55 -52
  38. package/src/components/Astro/Cabecera_2025_Madrid.astro +176 -180
  39. package/src/components/Astro/Contenido_2025_Alcorcon.astro +48 -78
  40. package/src/components/Astro/Contenido_2025_Granada.astro +239 -239
  41. package/src/components/Astro/Contenido_2025_Malaga.astro +162 -162
  42. package/src/components/Astro/Contenido_2025_Montevideo.astro +35 -35
  43. package/src/components/Astro/Footer_2025_Napoles.astro +134 -134
  44. package/src/components/Astro/Formulario_2025_Seul.astro +91 -91
  45. package/src/components/Astro/Imagen_2025_Bogota.astro +61 -61
  46. package/src/components/Astro/Repetidor_2025_Cabra.astro +152 -152
  47. package/src/components/Astro/Repetidor_2025_Cordoba.astro +132 -132
  48. package/src/components/Astro/Repetidor_2025_Dubai.astro +29 -29
  49. package/src/components/Astro/Repetidor_2025_Estocolmo.astro +22 -22
  50. package/src/components/Astro/Repetidor_2025_Mallorca.astro +42 -42
  51. package/src/components/Astro/Repetidor_2025_Menorca.astro +43 -43
  52. package/src/components/Astro/Repetidor_2025_Michigan.astro +45 -45
  53. package/src/components/Astro/Repetidor_2025_Orcasitas.astro +235 -235
  54. package/src/components/Astro/Repetidor_2025_Oslo.astro +76 -76
  55. package/src/components/Astro/Repetidor_2025_Quito.astro +61 -61
  56. package/src/components/Astro/Repetidor_2025_Seattle.astro +22 -22
  57. package/src/components/Astro/Repetidor_2025_Tokyo.astro +56 -56
  58. package/src/components/Astro/Repetidor_2025_Ubeda.astro +39 -39
  59. package/src/components/Astro/Repetidor_2025_Yakarta.astro +203 -179
  60. package/src/components/Astro/SEO_Head_Section.astro +32 -32
  61. package/src/components/Astro/Separador_2025_Reinosa.astro +3 -3
  62. package/src/components/Astro/Titulo_2025_Algeciras.astro +57 -57
  63. package/src/components/Astro/Titulo_2025_Santorini.astro +8 -8
  64. package/src/generated/componentRegistry.ts +96 -96
  65. package/src/index.ts +123 -123
@@ -1,180 +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
- // Then click the button at the new index
134
- buttons[currentIndex].click();
135
- }
136
- }, seconds * 3000);
137
- }
138
-
139
- function stopRotation() {
140
- if (rotationInterval) {
141
- clearInterval(rotationInterval);
142
- rotationInterval = null;
143
- }
144
- }
145
-
146
- // Start automatic rotation
147
- startRotation();
148
-
149
-
150
- document.querySelectorAll(`.${idAccordion}button`).forEach(btn => {
151
- btn.addEventListener('mouseenter', stopRotation);
152
-
153
- btn.addEventListener('click', (e) => {
154
- const linkedId = btn.getAttribute('data-linkedto');
155
- const targetItem = document.getElementById(linkedId);
156
- if (targetItem) {
157
-
158
- const collapseCount = document.querySelectorAll(`.${idAccordion}item.collapse`).length;
159
- const hiddenCount = document.querySelectorAll(`.${idAccordion}item.hidden`).length;
160
- const desiredClass = collapseCount > hiddenCount ? 'collapse' : 'hidden';
161
-
162
- document.querySelectorAll(`.${idAccordion}item`).forEach(item => {
163
- if (item === targetItem) return;
164
- if (item.classList.contains(desiredClass)) return;
165
- item.classList.add(desiredClass);
166
- });
167
- targetItem.classList.toggle(desiredClass);
168
-
169
-
170
- document.querySelectorAll(`.${idAccordion}button`).forEach(item => {
171
- if (item === btn) return;
172
- item.classList.remove('active');
173
- });
174
- btn.classList.toggle('active');
175
- }
176
- });
177
- });
178
- </script>
179
-
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
+
180
204
  <Fragment set:html={structuredData} />
@@ -1,32 +1,32 @@
1
- ---
2
- const {
3
- title,
4
- description,
5
- robots = 'index, follow',
6
- canonical = Astro.url.href.endsWith('/') ? Astro.url.href : Astro.url.href + '/',
7
- shareImgSrc,
8
- subdirectory = '',
9
- } = Astro.props;
10
-
11
- const currentUrl = Astro.url.href.replace(/^(https?:\/\/[^\/]+)/, `$1${subdirectory}`);
12
- const normalizedUrl = currentUrl.endsWith('/') ? currentUrl : currentUrl + '/';
13
-
14
- ---
15
- <title>{title}</title>
16
- <meta name="description" content={description} />
17
- <meta name="robots" content={robots} />
18
- <link rel="canonical" href={canonical.replace(/^(https?:\/\/[^\/]+)/, `$1${subdirectory}`)} />
19
-
20
- <!-- Open Graph / Facebook -->
21
- <meta property="og:type" content="website" />
22
- <meta property="og:url" content={normalizedUrl} />
23
- <meta property="og:title" content={title} />
24
- <meta property="og:description" content={description} />
25
- {shareImgSrc && <meta property="og:image" content={shareImgSrc} />}
26
-
27
- <!-- Twitter -->
28
- <meta property="twitter:card" content="summary_large_image" />
29
- <meta property="twitter:url" content={normalizedUrl} />
30
- <meta property="twitter:title" content={title} />
31
- <meta property="twitter:description" content={description} />
32
- {shareImgSrc && <meta property="twitter:image" content={shareImgSrc} />}
1
+ ---
2
+ const {
3
+ title,
4
+ description,
5
+ robots = 'index, follow',
6
+ canonical = Astro.url.href.endsWith('/') ? Astro.url.href : Astro.url.href + '/',
7
+ shareImgSrc,
8
+ subdirectory = '',
9
+ } = Astro.props;
10
+
11
+ const currentUrl = Astro.url.href.replace(/^(https?:\/\/[^\/]+)/, `$1${subdirectory}`);
12
+ const normalizedUrl = currentUrl.endsWith('/') ? currentUrl : currentUrl + '/';
13
+
14
+ ---
15
+ <title>{title}</title>
16
+ <meta name="description" content={description} />
17
+ <meta name="robots" content={robots} />
18
+ <link rel="canonical" href={canonical.replace(/^(https?:\/\/[^\/]+)/, `$1${subdirectory}`)} />
19
+
20
+ <!-- Open Graph / Facebook -->
21
+ <meta property="og:type" content="website" />
22
+ <meta property="og:url" content={normalizedUrl} />
23
+ <meta property="og:title" content={title} />
24
+ <meta property="og:description" content={description} />
25
+ {shareImgSrc && <meta property="og:image" content={shareImgSrc} />}
26
+
27
+ <!-- Twitter -->
28
+ <meta property="twitter:card" content="summary_large_image" />
29
+ <meta property="twitter:url" content={normalizedUrl} />
30
+ <meta property="twitter:title" content={title} />
31
+ <meta property="twitter:description" content={description} />
32
+ {shareImgSrc && <meta property="twitter:image" content={shareImgSrc} />}
@@ -1,4 +1,4 @@
1
- ---
2
- const {} = Astro.props;
3
- ---
1
+ ---
2
+ const {} = Astro.props;
3
+ ---
4
4
  <div class="w-full h-4 bg-gradient-to-r from-indigo-900 via-blue-600 to-pink-500"></div>
@@ -1,58 +1,58 @@
1
- ---
2
-
3
- const {
4
- title,
5
- h1Subtitle,
6
- description = "",
7
- tipo = "",
8
- descriptionWidth = "1/3", // 1/3 3/5 full
9
- flexJustify = "justify-center"
10
- } = Astro.props;
11
-
12
- const structuredData = `<script type="application/ld+json">
13
- {
14
- "@context": "https://schema.org",
15
- "@type": "WebPageElement",
16
- "name": "${title}",
17
- "description": "${description}",
18
- "headline": "${title}",
19
- "mainEntityOfPage": {
20
- "@type": "WebPage"
21
- },
22
- "author": {
23
- "@type": "Organization",
24
- "name": "Lefebvre"
25
- }
26
- }
27
- </script>`;
28
-
29
- ---
30
-
31
- <div class={`w-full md:w-3/5 max-w-auto md:w-full flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col px-4`}>
32
- {h1Subtitle && h1Subtitle.trim() !== "" && (
33
- tipo === "h1" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-[48px]" set:html={h1Subtitle}></h2>
34
- : tipo === "h1-home" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0px] mt-[32px] md:mt-[80px]" set:html={h1Subtitle}></h2>
35
- : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={h1Subtitle}></h2>
36
- : null
37
- )}
38
- {
39
- h1Subtitle && h1Subtitle.trim() !== ""
40
- ? <h1 class="font-poppins text-[#262626] text-[20px] md:text-[24px] font-normal text-center leading-[24px] my-[32px] md:mb-[32px]" set:html={title}></h1>
41
- : tipo === "h1" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:my-[48px]" set:html={title}></h1>
42
- : tipo === "h1-home" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0] md:mb-[64px] mt-[32px] md:mt-[80px]" set:html={title}></h1>
43
- : tipo === "h1-40" ? <h1 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={title}></h1>
44
- : tipo === "h2" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-[32px] md:mb-[32px]" set:html={title}></h2>
45
- : tipo === "h2-mb64" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-[0]" set:html={title}></h2>
46
- : tipo === "h3" ? <h3 class="font-poppins text-[#262626] text-[24px] font-semibold text-center leading-[32px] mb-[8px]" set:html={title}></h3>
47
- : tipo === "h3-mb32" ? <h3 class="font-poppins text-[#262626] text-[32px] font-normal text-left leading-[40px] mb-[32px]" set:html={title}></h3>
48
- : tipo === "h4" ? <h4 class="font-poppins text-[#262626] text-center" set:html={title}></h4>
49
- : tipo === "h5" ? <h5 class="font-poppins text-[#262626] text-center" set:html={title}></h5>
50
- : tipo === "h6" ? <h6 class="font-poppins text-[#262626] text-center" set:html={title}></h6>
51
- : <p>{title}</p>
52
- }
53
- {description && description.trim() !== "" && (
54
- <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto font-inter text-base font-normal leading-[28px] mb-8 text-center`} set:html={description}></div>
55
- )}
56
- </div>
57
-
1
+ ---
2
+
3
+ const {
4
+ title,
5
+ h1Subtitle,
6
+ description = "",
7
+ tipo = "",
8
+ descriptionWidth = "1/3", // 1/3 3/5 full
9
+ flexJustify = "justify-center"
10
+ } = Astro.props;
11
+
12
+ const structuredData = `<script type="application/ld+json">
13
+ {
14
+ "@context": "https://schema.org",
15
+ "@type": "WebPageElement",
16
+ "name": "${title}",
17
+ "description": "${description}",
18
+ "headline": "${title}",
19
+ "mainEntityOfPage": {
20
+ "@type": "WebPage"
21
+ },
22
+ "author": {
23
+ "@type": "Organization",
24
+ "name": "Lefebvre"
25
+ }
26
+ }
27
+ </script>`;
28
+
29
+ ---
30
+
31
+ <div class={`w-full md:w-3/5 max-w-auto md:w-full flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col`}>
32
+ {h1Subtitle && h1Subtitle.trim() !== "" && (
33
+ tipo === "h1" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:mb-[48px]" set:html={h1Subtitle}></h2>
34
+ : tipo === "h1-home" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0px] mt-[32px] md:mt-[80px]" set:html={h1Subtitle}></h2>
35
+ : tipo === "h1-40" ? <h2 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={h1Subtitle}></h2>
36
+ : null
37
+ )}
38
+ {
39
+ h1Subtitle && h1Subtitle.trim() !== ""
40
+ ? <h1 class="font-poppins text-[#262626] text-[20px] md:text-[24px] font-normal text-center leading-[24px] my-[32px] md:mb-[32px]" set:html={title}></h1>
41
+ : tipo === "h1" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] px-6 md:my-[48px]" set:html={title}></h1>
42
+ : tipo === "h1-home" ? <h1 class="font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal text-center leading-[44px] md:leading-[64px] mb-[0] md:mb-[64px] mt-[32px] md:mt-[80px]" set:html={title}></h1>
43
+ : tipo === "h1-40" ? <h1 class="font-poppins text-[#262626] text-[40px] font-normal text-center leading-[48px] mb-[0] md:mb-[32px]" set:html={title}></h1>
44
+ : tipo === "h2" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-[32px] md:mb-[32px]" set:html={title}></h2>
45
+ : tipo === "h2-mb64" ? <h2 class="font-poppins text-[#262626] text-[36px] md:text-[40px] font-normal text-center leading-[44px] md:leading-[48px] p-6 md:p-2 md:pb-6 mb-[0]" set:html={title}></h2>
46
+ : tipo === "h3" ? <h3 class="font-poppins text-[#262626] text-[24px] font-semibold text-center leading-[32px] mb-[8px]" set:html={title}></h3>
47
+ : tipo === "h3-mb32" ? <h3 class="font-poppins text-[#262626] text-[32px] font-normal text-left leading-[40px] mb-[32px]" set:html={title}></h3>
48
+ : tipo === "h4" ? <h4 class="font-poppins text-[#262626] text-center" set:html={title}></h4>
49
+ : tipo === "h5" ? <h5 class="font-poppins text-[#262626] text-center" set:html={title}></h5>
50
+ : tipo === "h6" ? <h6 class="font-poppins text-[#262626] text-center" set:html={title}></h6>
51
+ : <p>{title}</p>
52
+ }
53
+ {description && description.trim() !== "" && (
54
+ <div class={`w-full md:w-${descriptionWidth} text-[#363942] mx-auto font-inter text-base font-normal leading-[28px] mb-8 text-center`} set:html={description}></div>
55
+ )}
56
+ </div>
57
+
58
58
  <Fragment set:html={structuredData} />
@@ -1,9 +1,9 @@
1
- ---
2
-
3
- const {
4
- description = "",
5
- } = Astro.props;
6
-
7
- ---
8
-
1
+ ---
2
+
3
+ const {
4
+ description = "",
5
+ } = Astro.props;
6
+
7
+ ---
8
+
9
9
  <p class="font-poppins text-[#001978] text-[14px] font-semibold text-left leading-[20px] tracking-[2px] uppercase mb-[4px]">{description}</p>