libreria-astro-lefebvre 0.0.74 → 0.0.76
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 +1 -1
- package/src/components/Astro/Cabecera_2025_Madrid.astro +8 -3
- package/src/components/Astro/Card_2025_Malta.astro +32 -0
- package/src/components/Astro/Contenido_2025_Montevideo.astro +3 -2
- package/src/components/Astro/CorpNavigation.astro +1 -1
- package/src/components/Astro/Paginacion_2025_Paris.astro +95 -0
- package/src/components/Astro/Repetidor_2025_Jaen.astro +2 -1
- package/src/index.ts +5 -1
package/package.json
CHANGED
|
@@ -50,7 +50,12 @@ const categories = [
|
|
|
50
50
|
{
|
|
51
51
|
name: 'Blog',
|
|
52
52
|
link: subdirectory + '/blog/',
|
|
53
|
-
subcategories: [
|
|
53
|
+
subcategories: [
|
|
54
|
+
{ name: 'Automatización Jurídica', link: subdirectory + '/blog-categoria/' },
|
|
55
|
+
{ name: 'Búsqueda y Análisis Jurídico', link: subdirectory + '/blog-categoria/' },
|
|
56
|
+
{ name: 'Asistente Jurídico con IA', link: subdirectory + '/blog-categoria/' },
|
|
57
|
+
{ name: 'Asistente Jurídico con IA', link: subdirectory + '/blog-categoria/' },
|
|
58
|
+
],
|
|
54
59
|
},
|
|
55
60
|
];
|
|
56
61
|
|
|
@@ -125,7 +130,7 @@ const categories = [
|
|
|
125
130
|
)}
|
|
126
131
|
</a>
|
|
127
132
|
{category.subcategories.length > 0 && (
|
|
128
|
-
<ul class="absolute left-0 mt-
|
|
133
|
+
<ul class="absolute left-0 mt-[4px] bg-white border border-gray-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 min-w-[280px]"
|
|
129
134
|
|
|
130
135
|
>
|
|
131
136
|
{category.subcategories.map(sub => (
|
|
@@ -158,7 +163,7 @@ const categories = [
|
|
|
158
163
|
)}
|
|
159
164
|
</a>
|
|
160
165
|
{category.subcategories.length > 0 && (
|
|
161
|
-
<ul class="absolute left-0 mt-
|
|
166
|
+
<ul class="absolute left-0 mt-[4px] bg-white border border-gray-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 min-w-[280px]"
|
|
162
167
|
|
|
163
168
|
>
|
|
164
169
|
{category.subcategories.map(sub => (
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
|
|
3
|
+
const {
|
|
4
|
+
items = []
|
|
5
|
+
} = Astro.props;
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6 w-full px-[32px] md:px-0 md:pb-[48px]">
|
|
10
|
+
{items.map((item) => (
|
|
11
|
+
<a href={item.link || '#'} class="w-full flex flex-col cursor-pointer px-0">
|
|
12
|
+
<article class="w-full h-full flex flex-col rounded-lg border border-gray-200 items-center shadow-article hover:bg-gradient-to-r from-[#001978] via-[#2134F1] to-[#F81BBD] transition-all duration-300 p-[1px]">
|
|
13
|
+
<div class="bg-white mt-[1px] rounded-tl-[7px] rounded-tr-[7px] w-full h-full">
|
|
14
|
+
<div class="p-6 flex-grow flex flex-col">
|
|
15
|
+
<div class="mt-2 flex items-center gap-2 flex-grow">
|
|
16
|
+
<div class="flex flex-col text-[#262626] h-full">
|
|
17
|
+
<h3 class="font-poppins text-[24px] font-semibold leading-[32px] text-[#262626] text-center overflow-hidden text-ellipsis mb-[8px]">{item.title}</h3>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="bg-red-100 h-[12px]"></div>
|
|
23
|
+
</article>
|
|
24
|
+
</a>
|
|
25
|
+
))}
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<style>
|
|
29
|
+
.shadow-article {
|
|
30
|
+
box-shadow: 0 2px 4px -2px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -10,6 +10,7 @@ const {
|
|
|
10
10
|
tag='',
|
|
11
11
|
description='',
|
|
12
12
|
author=''
|
|
13
|
+
authorURL='#',
|
|
13
14
|
} = Astro.props;
|
|
14
15
|
|
|
15
16
|
const imageUrl = extractImageUrl(image);
|
|
@@ -19,7 +20,7 @@ const imageUrl = extractImageUrl(image);
|
|
|
19
20
|
<article class="w-full h-full flex flex-col rounded-lg border border-gray-200 items-center shadow-article hover:bg-gradient-to-r from-[#001978] via-[#2134F1] to-[#F81BBD] transition-all duration-300 p-[1px]">
|
|
20
21
|
<div class="bg-white mt-[1px] rounded-tl-[7px] rounded-tr-[7px] h-full">
|
|
21
22
|
<div class="w-full">
|
|
22
|
-
<img class="cursor-pointer rounded-tr-lg rounded-tl-lg mx-auto h-full" src={imageUrl} alt={altImage} width="400" height="225" loading="lazy" />
|
|
23
|
+
<img class="cursor-pointer rounded-tr-lg rounded-tl-lg mx-auto w-full h-full" src={imageUrl} alt={altImage} width="400" height="225" loading="lazy" />
|
|
23
24
|
</div>
|
|
24
25
|
<div class="p-6 flex-grow flex flex-col">
|
|
25
26
|
{tag && tag !== '' && <Titulo_2025_Santorini description={tag} />}
|
|
@@ -28,7 +29,7 @@ const imageUrl = extractImageUrl(image);
|
|
|
28
29
|
<h3 class="font-poppins text-[20px] font-semibold leading-[28px] text-[#262626] overflow-hidden text-ellipsis mb-[8px]">{title}</h3>
|
|
29
30
|
<p class="font-inter text-[16px] font-normal leading-[24px] text-[#363942] overflow-hidden text-ellipsis mb-[8px]">{description}</p>
|
|
30
31
|
{author && author !== '' &&
|
|
31
|
-
<p class="font-inter text-[16px] font-normal mt-[24px] leading-[24px] text-[#363942] text-left">Por {author}</p>
|
|
32
|
+
<p class="font-inter text-[16px] font-normal mt-[24px] leading-[24px] text-[#363942] text-left"><a href={authorURL} class="text-[#363942]">Por {author}</a></p>
|
|
32
33
|
}
|
|
33
34
|
</div>
|
|
34
35
|
</div>
|
|
@@ -69,7 +69,7 @@ const categories = [
|
|
|
69
69
|
)}
|
|
70
70
|
</a>
|
|
71
71
|
{category.subcategories.length > 0 && (
|
|
72
|
-
<ul class="absolute left-0 mt-
|
|
72
|
+
<ul class="absolute left-0 mt-[4px] bg-white border border-gray-300 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all z-10 min-w-[280px]"
|
|
73
73
|
|
|
74
74
|
>
|
|
75
75
|
{category.subcategories.map(sub => (
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
const {
|
|
3
|
+
currentPage = 1,
|
|
4
|
+
totalPages = 1,
|
|
5
|
+
totalItems = 0,
|
|
6
|
+
itemsPerPage = 10,
|
|
7
|
+
baseUrl = '#',
|
|
8
|
+
} = Astro.props;
|
|
9
|
+
|
|
10
|
+
const page = Number(currentPage);
|
|
11
|
+
const pages = Number(totalPages);
|
|
12
|
+
const total = Number(totalItems);
|
|
13
|
+
const perPage = Number(itemsPerPage);
|
|
14
|
+
|
|
15
|
+
const startItem = (page - 1) * perPage + 1;
|
|
16
|
+
const endItem = Math.min(page * perPage, total);
|
|
17
|
+
|
|
18
|
+
// Generate page numbers with ellipsis
|
|
19
|
+
function getPageNumbers(current: number, total: number): (number | string)[] {
|
|
20
|
+
const items: (number | string)[] = [];
|
|
21
|
+
if (total <= 7) {
|
|
22
|
+
for (let i = 1; i <= total; i++) items.push(i);
|
|
23
|
+
} else {
|
|
24
|
+
items.push(1);
|
|
25
|
+
if (current > 3) items.push('...');
|
|
26
|
+
for (let i = Math.max(2, current - 1); i <= Math.min(total - 1, current + 1); i++) {
|
|
27
|
+
items.push(i);
|
|
28
|
+
}
|
|
29
|
+
if (current < total - 2) items.push('...');
|
|
30
|
+
items.push(total);
|
|
31
|
+
}
|
|
32
|
+
return items;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const pageNumbers = getPageNumbers(page, pages);
|
|
36
|
+
|
|
37
|
+
function pageUrl(p: number): string {
|
|
38
|
+
if (p === 1) return baseUrl;
|
|
39
|
+
return `${baseUrl}${baseUrl.endsWith('/') ? '' : '/'}page/${p}`;
|
|
40
|
+
}
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
<nav class="w-full max-w-7xl mx-auto flex items-center justify-center py-[16px] px-[32px] md:px-0" aria-label="Paginación">
|
|
44
|
+
<div class="flex items-center gap-[8px]">
|
|
45
|
+
{page > 1 ? (
|
|
46
|
+
<a href={pageUrl(page - 1)} class="flex items-center gap-[4px] font-inter text-[14px] font-normal leading-[20px] text-[#363942] hover:underline transition-all duration-300" aria-label="Página anterior">
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
48
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5454 2.66254C13.8008 2.89473 13.8196 3.29001 13.5875 3.54542L7.71966 10L13.5875 16.4546C13.8196 16.71 13.8008 17.1053 13.5454 17.3375C13.29 17.5697 12.8947 17.5508 12.6625 17.2954L6.41253 10.4204C6.19582 10.182 6.19582 9.81797 6.41253 9.57958L12.6625 2.70458C12.8947 2.44917 13.29 2.43035 13.5454 2.66254Z" fill="#363942"/>
|
|
49
|
+
</svg>
|
|
50
|
+
<span>Anterior</span>
|
|
51
|
+
</a>
|
|
52
|
+
) : (
|
|
53
|
+
<span class="flex items-center gap-[4px] font-inter text-[14px] font-normal leading-[20px] text-[#363942] cursor-default" aria-disabled="true">
|
|
54
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
55
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M13.5454 2.66254C13.8008 2.89473 13.8196 3.29001 13.5875 3.54542L7.71966 10L13.5875 16.4546C13.8196 16.71 13.8008 17.1053 13.5454 17.3375C13.29 17.5697 12.8947 17.5508 12.6625 17.2954L6.41253 10.4204C6.19582 10.182 6.19582 9.81797 6.41253 9.57958L12.6625 2.70458C12.8947 2.44917 13.29 2.43035 13.5454 2.66254Z" fill="#363942"/>
|
|
56
|
+
</svg>
|
|
57
|
+
<span>Anterior</span>
|
|
58
|
+
</span>
|
|
59
|
+
)}
|
|
60
|
+
|
|
61
|
+
<div class="flex items-center gap-[4px] ml-[16px]">
|
|
62
|
+
{pageNumbers.map(p => (
|
|
63
|
+
typeof p === 'string' ? (
|
|
64
|
+
<span class="w-[40px] h-[40px] flex items-center justify-center font-inter text-[16px] text-[#363942]">...</span>
|
|
65
|
+
) : p === page ? (
|
|
66
|
+
<span class="w-[40px] h-[40px] flex items-center justify-center font-inter text-[14px] font-normal leading-[20px] text-[#363942] border border-[#363942] rounded-[8px]" aria-current="page">{p}</span>
|
|
67
|
+
) : (
|
|
68
|
+
<a href={pageUrl(p)} class="w-[40px] h-[40px] flex items-center justify-center font-inter text-[16px] font-normal leading-[24px] text-[#363942] hover:bg-[#F2F3F8] rounded-[8px] transition-all duration-300">{p}</a>
|
|
69
|
+
)
|
|
70
|
+
))}
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
{page < pages ? (
|
|
74
|
+
<a href={pageUrl(page + 1)} class="flex items-center gap-[4px] font-inter text-[14px] font-normal leading-[20px] text-[#363942] hover:underline transition-all duration-300 ml-[16px]" aria-label="Página siguiente">
|
|
75
|
+
<span>Siguiente</span>
|
|
76
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
77
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.45458 17.3375C6.19917 17.1053 6.18035 16.71 6.41254 16.4546L12.2803 10L6.41254 3.54542C6.18035 3.29 6.19917 2.89472 6.45458 2.66253C6.71 2.43034 7.10528 2.44916 7.33747 2.70457L13.5875 9.57958C13.8042 9.81796 13.8042 10.182 13.5875 10.4204L7.33747 17.2954C7.10528 17.5508 6.70999 17.5696 6.45458 17.3375Z" fill="#363942"/>
|
|
78
|
+
</svg>
|
|
79
|
+
</a>
|
|
80
|
+
) : (
|
|
81
|
+
<span class="flex items-center gap-[4px] font-inter text-[14px] font-normal leading-[20px] text-[#363942] cursor-default ml-[16px]" aria-disabled="true">
|
|
82
|
+
<span>Siguiente</span>
|
|
83
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
84
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.45458 17.3375C6.19917 17.1053 6.18035 16.71 6.41254 16.4546L12.2803 10L6.41254 3.54542C6.18035 3.29 6.19917 2.89472 6.45458 2.66253C6.71 2.43034 7.10528 2.44916 7.33747 2.70457L13.5875 9.57958C13.8042 9.81796 13.8042 10.182 13.5875 10.4204L7.33747 17.2954C7.10528 17.5508 6.70999 17.5696 6.45458 17.3375Z" fill="#363942"/>
|
|
85
|
+
</svg>
|
|
86
|
+
</span>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
|
|
90
|
+
{total > 0 && (
|
|
91
|
+
<span class="font-inter text-[16px] font-normal leading-[24px] text-[#363942]">
|
|
92
|
+
{startItem} - {endItem} de {total}
|
|
93
|
+
</span>
|
|
94
|
+
)}
|
|
95
|
+
</nav>
|
|
@@ -29,7 +29,8 @@ const structuredData = `<script type="application/ld+json">
|
|
|
29
29
|
|
|
30
30
|
<div class={`w-full flex ${flexJustify === 'justify-center' ? 'justify-center' : 'justify-start'} flex-col px-[32px] md:px-0`}>
|
|
31
31
|
{
|
|
32
|
-
tipo === "
|
|
32
|
+
tipo === "h1-blog-categoria" ? <h1 class="font-poppins text-[#262626] text-[40px] mb-[16px] font-normal text-center leading-[48px] tracking-[-0.5px]" set:html={title}></h1>
|
|
33
|
+
: tipo === "h2-blog" ? <h2 class="font-poppins text-[#262626] text-[28px] md:text-[32px] font-normal text-left leading-[36px] md:leading-[40px] mb-[16px]" set:html={title}></h2>
|
|
33
34
|
: 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>
|
|
34
35
|
: <p>{title}</p>
|
|
35
36
|
}
|
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import Button from './components/Astro/Button.astro';
|
|
|
8
8
|
import CTA_2025_Formentera from './components/Astro/CTA_2025_Formentera.astro';
|
|
9
9
|
import Cabecera_2025_Barcelona from './components/Astro/Cabecera_2025_Barcelona.astro';
|
|
10
10
|
import Cabecera_2025_Madrid from './components/Astro/Cabecera_2025_Madrid.astro';
|
|
11
|
+
import Card_2025_Malta from './components/Astro/Card_2025_Malta.astro';
|
|
11
12
|
import Contenido_2025_Alcorcon from './components/Astro/Contenido_2025_Alcorcon.astro';
|
|
12
13
|
import Contenido_2025_Granada from './components/Astro/Contenido_2025_Granada.astro';
|
|
13
14
|
import Contenido_2025_Malaga from './components/Astro/Contenido_2025_Malaga.astro';
|
|
@@ -27,6 +28,7 @@ import HeaderCorporativo from './components/Astro/HeaderCorporativo.astro';
|
|
|
27
28
|
import ImageTextSimple from './components/Astro/ImageTextSimple.astro';
|
|
28
29
|
import Imagen_2025_Bogota from './components/Astro/Imagen_2025_Bogota.astro';
|
|
29
30
|
import Imagen_2025_Fukushima from './components/Astro/Imagen_2025_Fukushima.astro';
|
|
31
|
+
import Paginacion_2025_Paris from './components/Astro/Paginacion_2025_Paris.astro';
|
|
30
32
|
import Repetidor_2025_Cabra from './components/Astro/Repetidor_2025_Cabra.astro';
|
|
31
33
|
import Repetidor_2025_Cordoba from './components/Astro/Repetidor_2025_Cordoba.astro';
|
|
32
34
|
import Repetidor_2025_Dubai from './components/Astro/Repetidor_2025_Dubai.astro';
|
|
@@ -63,7 +65,7 @@ import ReactButton from './components/React/ReactButton.jsx';
|
|
|
63
65
|
// Exporta todos los componentes uno a uno para que puedan ser usados directamente.
|
|
64
66
|
|
|
65
67
|
|
|
66
|
-
export { VueButton, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Contenido_2025_Alcorcon, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, CorpFooter, CorpHero, CorpNavigation, Enlace_2025_Venecia, FooterCorporativo, Footer_2025_Napoles, Formulario_2025_Nara, Formulario_2025_Seul, Formulario_2025_Teruel, GeometricShape, GeometricShapeCard, HeaderCorporativo, ImageTextSimple, Imagen_2025_Bogota, Imagen_2025_Fukushima, Repetidor_2025_Cabra, Repetidor_2025_Cordoba, Repetidor_2025_Dubai, Repetidor_2025_Estocolmo, Repetidor_2025_Jaen, Repetidor_2025_Mallorca, Repetidor_2025_Menorca, Repetidor_2025_Michigan, Repetidor_2025_Orcasitas, Repetidor_2025_Oslo, Repetidor_2025_Quito, Repetidor_2025_Seattle, Repetidor_2025_Sevilla, Repetidor_2025_Tokyo, Repetidor_2025_Ubeda, Repetidor_2025_Yakarta, SEO_Head_Section, Separador_2025_Reinosa, SpectrumSeparator, TestHijo, TestPadre, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Polop, Video_2025_Valencia, ReactButton };
|
|
68
|
+
export { VueButton, Button, CTA_2025_Formentera, Cabecera_2025_Barcelona, Cabecera_2025_Madrid, Card_2025_Malta, Contenido_2025_Alcorcon, Contenido_2025_Granada, Contenido_2025_Malaga, Contenido_2025_Montevideo, CorpFooter, CorpHero, CorpNavigation, Enlace_2025_Venecia, FooterCorporativo, Footer_2025_Napoles, Formulario_2025_Nara, Formulario_2025_Seul, Formulario_2025_Teruel, GeometricShape, GeometricShapeCard, HeaderCorporativo, ImageTextSimple, Imagen_2025_Bogota, Imagen_2025_Fukushima, Paginacion_2025_Paris, Repetidor_2025_Cabra, Repetidor_2025_Cordoba, Repetidor_2025_Dubai, Repetidor_2025_Estocolmo, Repetidor_2025_Jaen, Repetidor_2025_Mallorca, Repetidor_2025_Menorca, Repetidor_2025_Michigan, Repetidor_2025_Orcasitas, Repetidor_2025_Oslo, Repetidor_2025_Quito, Repetidor_2025_Seattle, Repetidor_2025_Sevilla, Repetidor_2025_Tokyo, Repetidor_2025_Ubeda, Repetidor_2025_Yakarta, SEO_Head_Section, Separador_2025_Reinosa, SpectrumSeparator, TestHijo, TestPadre, TextBox, TextImageBackground, TextImageBlock, TextImageCard, TextImageHeader, Titulo_2025_Algeciras, Titulo_2025_Santorini, VideoAutoplay, Video_2025_Polop, Video_2025_Valencia, ReactButton };
|
|
67
69
|
|
|
68
70
|
|
|
69
71
|
// Exporta la función listComponents para que sea usado en el Pagebuilder en Vue.
|
|
@@ -83,6 +85,7 @@ export const components = {
|
|
|
83
85
|
CTA_2025_Formentera: CTA_2025_Formentera,
|
|
84
86
|
Cabecera_2025_Barcelona: Cabecera_2025_Barcelona,
|
|
85
87
|
Cabecera_2025_Madrid: Cabecera_2025_Madrid,
|
|
88
|
+
Card_2025_Malta: Card_2025_Malta,
|
|
86
89
|
Contenido_2025_Alcorcon: Contenido_2025_Alcorcon,
|
|
87
90
|
Contenido_2025_Granada: Contenido_2025_Granada,
|
|
88
91
|
Contenido_2025_Malaga: Contenido_2025_Malaga,
|
|
@@ -102,6 +105,7 @@ export const components = {
|
|
|
102
105
|
ImageTextSimple: ImageTextSimple,
|
|
103
106
|
Imagen_2025_Bogota: Imagen_2025_Bogota,
|
|
104
107
|
Imagen_2025_Fukushima: Imagen_2025_Fukushima,
|
|
108
|
+
Paginacion_2025_Paris: Paginacion_2025_Paris,
|
|
105
109
|
Repetidor_2025_Cabra: Repetidor_2025_Cabra,
|
|
106
110
|
Repetidor_2025_Cordoba: Repetidor_2025_Cordoba,
|
|
107
111
|
Repetidor_2025_Dubai: Repetidor_2025_Dubai,
|