libreria-astro-lefebvre 0.0.27 → 0.0.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -41,11 +41,14 @@ const {
41
41
  ---
42
42
 
43
43
  <section class="w-full flex pb-2">
44
- <div class="max-w-7xl w-full mx-auto flex gap-2 bg-white text-[#363942] px-6 md:px-2 py-2 text-[14px]">
45
- <a href={subdirectory + '/'}><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
46
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.607 2.26475C11.1639 2.32582 10.6509 2.48899 10.1624 2.72428C9.60055 2.99492 9.00859 3.34706 6.66084 4.80718C4.31852 6.26394 3.93572 6.53182 3.40193 7.08788C2.90464 7.60592 2.64374 8.07514 2.46575 8.77158C2.28122 9.49354 2.26758 9.74391 2.2535 12.6665C2.24172 15.1104 2.25893 16.3111 2.31649 17.061C2.44485 18.7333 2.80188 19.7175 3.55237 20.4678C4.28974 21.2051 5.2235 21.5501 6.83418 21.6806C7.50612 21.735 8.61888 21.75 11.9999 21.75C15.3809 21.75 16.4937 21.735 17.1656 21.6806C18.7575 21.5516 19.699 21.2081 20.4254 20.4911C20.9976 19.9264 21.341 19.2288 21.5307 18.2464C21.724 17.2457 21.7637 16.2126 21.7463 12.6447C21.7321 9.7458 21.7182 9.49232 21.534 8.77158C21.356 8.07514 21.0951 7.60592 20.5979 7.08788C20.0641 6.53182 19.6813 6.26394 17.3389 4.80718C14.9942 3.34893 14.4021 2.99663 13.8362 2.72324C13.4707 2.54669 13.003 2.3831 12.6586 2.3114C12.3947 2.25643 11.8444 2.23204 11.607 2.26475ZM11.6269 3.73267C11.5426 3.74947 11.3777 3.79614 11.2605 3.83636C10.6997 4.02896 10.2326 4.29571 7.66624 5.88901C5.52292 7.21964 5.04514 7.53681 4.65608 7.88712C3.98123 8.49478 3.78607 9.00003 3.72514 10.2972C3.69616 10.9139 3.69657 15.5359 3.72565 16.2378C3.80342 18.1147 4.03097 18.9336 4.63227 19.501C5.0201 19.867 5.59984 20.0807 6.49905 20.189C7.24869 20.2793 7.46553 20.283 11.9999 20.283C16.5343 20.283 16.7511 20.2793 17.5007 20.189C19.2668 19.9762 19.925 19.3378 20.1684 17.6016C20.2815 16.7945 20.3028 15.9639 20.291 12.8283C20.284 10.9976 20.272 10.0331 20.254 9.86956C20.1456 8.88351 19.9347 8.41609 19.3684 7.90674C18.9506 7.53089 18.535 7.25522 16.2312 5.82558C13.7693 4.29779 13.2896 4.02434 12.7476 3.83985C12.3354 3.69954 11.9691 3.6645 11.6269 3.73267Z" fill="#363942"/>
47
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10.5553 14.1632C10.1564 14.1632 9.83307 14.4866 9.83307 14.8856V20.6644C9.83307 21.0634 9.50969 21.3868 9.11079 21.3868C8.71189 21.3868 8.38852 21.0634 8.38852 20.6644V14.8856C8.38852 13.6888 9.35864 12.7185 10.5553 12.7185H13.4444C14.6411 12.7185 15.6113 13.6888 15.6113 14.8856V20.6644C15.6113 21.0634 15.2879 21.3868 14.889 21.3868C14.4901 21.3868 14.1667 21.0634 14.1667 20.6644V14.8856C14.1667 14.4866 13.8433 14.1632 13.4444 14.1632H10.5553Z" fill="#363942"/>
48
- </svg></a> / <a href={link}><span class="text-[#363942] font-normal" set:html={text}></span></a>
44
+ <div class="max-w-7xl w-full mx-auto flex gap-2 bg-white text-[#363942] px-6 md:px-2 py-2 text-[14px] items-center">
45
+ <a href={subdirectory + '/'} class="flex items-center gap-2">
46
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
47
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M11.607 2.26475C11.1639 2.32582 10.6509 2.48899 10.1624 2.72428C9.60055 2.99492 9.00859 3.34706 6.66084 4.80718C4.31852 6.26394 3.93572 6.53182 3.40193 7.08788C2.90464 7.60592 2.64374 8.07514 2.46575 8.77158C2.28122 9.49354 2.26758 9.74391 2.2535 12.6665C2.24172 15.1104 2.25893 16.3111 2.31649 17.061C2.44485 18.7333 2.80188 19.7175 3.55237 20.4678C4.28974 21.2051 5.2235 21.5501 6.83418 21.6806C7.50612 21.735 8.61888 21.75 11.9999 21.75C15.3809 21.75 16.4937 21.735 17.1656 21.6806C18.7575 21.5516 19.699 21.2081 20.4254 20.4911C20.9976 19.9264 21.341 19.2288 21.5307 18.2464C21.724 17.2457 21.7637 16.2126 21.7463 12.6447C21.7321 9.7458 21.7182 9.49232 21.534 8.77158C21.356 8.07514 21.0951 7.60592 20.5979 7.08788C20.0641 6.53182 19.6813 6.26394 17.3389 4.80718C14.9942 3.34893 14.4021 2.99663 13.8362 2.72324C13.4707 2.54669 13.003 2.3831 12.6586 2.3114C12.3947 2.25643 11.8444 2.23204 11.607 2.26475ZM11.6269 3.73267C11.5426 3.74947 11.3777 3.79614 11.2605 3.83636C10.6997 4.02896 10.2326 4.29571 7.66624 5.88901C5.52292 7.21964 5.04514 7.53681 4.65608 7.88712C3.98123 8.49478 3.78607 9.00003 3.72514 10.2972C3.69616 10.9139 3.69657 15.5359 3.72565 16.2378C3.80342 18.1147 4.03097 18.9336 4.63227 19.501C5.0201 19.867 5.59984 20.0807 6.49905 20.189C7.24869 20.2793 7.46553 20.283 11.9999 20.283C16.5343 20.283 16.7511 20.2793 17.5007 20.189C19.2668 19.9762 19.925 19.3378 20.1684 17.6016C20.2815 16.7945 20.3028 15.9639 20.291 12.8283C20.284 10.9976 20.272 10.0331 20.254 9.86956C20.1456 8.88351 19.9347 8.41609 19.3684 7.90674C18.9506 7.53089 18.535 7.25522 16.2312 5.82558C13.7693 4.29779 13.2896 4.02434 12.7476 3.83985C12.3354 3.69954 11.9691 3.6645 11.6269 3.73267Z" fill="#363942"/>
48
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.5553 14.1632C10.1564 14.1632 9.83307 14.4866 9.83307 14.8856V20.6644C9.83307 21.0634 9.50969 21.3868 9.11079 21.3868C8.71189 21.3868 8.38852 21.0634 8.38852 20.6644V14.8856C8.38852 13.6888 9.35864 12.7185 10.5553 12.7185H13.4444C14.6411 12.7185 15.6113 13.6888 15.6113 14.8856V20.6644C15.6113 21.0634 15.2879 21.3868 14.889 21.3868C14.4901 21.3868 14.1667 21.0634 14.1667 20.6644V14.8856C14.1667 14.4866 13.8433 14.1632 13.4444 14.1632H10.5553Z" fill="#363942"/>
49
+ </svg>
50
+ <span>GenIA-L</span>
51
+ </a> / <a href={link}><span class="text-[#363942] font-normal" set:html={text}></span></a>
49
52
  </div>
50
53
  </section>
51
54
 
@@ -89,13 +89,9 @@ const categories = [
89
89
  <nav class="px-4 py-3 w-full">
90
90
 
91
91
  <div class="max-w-7xl flex items-center justify-between mx-auto">
92
- <a href={subdirectory + '/'} class="hidden md:flex items-center">
93
- <img src="https://assets.lefebvre.es/media/logos-2/svg/lefebvre.svg" class="h-[40px]" alt="Logo Lefebvre">
92
+ <a href={subdirectory + '/'} class="flex items-center">
93
+ <img src="https://assets.lefebvre.es/media/logos-2/svg/lefebvre.svg" class="h-[40px]" alt="GenIA-L Lefebvre">
94
94
  </a>
95
- <a href="#" class="flex md:hidden items-center">
96
- <img src="https://assets.lefebvre.es/media/logos-2/svg/lefebvre.svg" class="h-[40px]" alt="Logo Lefebvre">
97
- </a>
98
-
99
95
  <div class="flex items-center gap-4">
100
96
  <div class="flex items-center gap-4">
101
97
  <a href={url} class="h-[48px] max-[375px]:px-2 px-5 py-3 font-inter font-semibold max-[375px]:text-sm text-base border-1 border-[#2134F1] text-[#2134F1] hover:text-[#ffffff] hover:border-[#2134F1] hover:bg-[#2134F1] transition-all duration-300 rounded-lg cursor-pointer shadow-sm">{label}</a>
@@ -130,8 +130,32 @@ function startRotation() {
130
130
  if (buttons.length > 0) {
131
131
  // Always move to next index first
132
132
  currentIndex = (currentIndex + 1) % buttons.length;
133
- // Then click the button at the new index
134
- buttons[currentIndex].click();
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
+
135
159
  }
136
160
  }, seconds * 3000);
137
161
  }