libreria-astro-lefebvre 0.1.2 → 0.1.4
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
|
@@ -20,10 +20,10 @@ export const metadata: ComponentMetadata = {
|
|
|
20
20
|
{
|
|
21
21
|
name: 'tipo',
|
|
22
22
|
type: 'select',
|
|
23
|
-
help: 'Controla etiqueta HTML Y tamaño del título (van ligados). Todos los tipos usan Poppins semibold color #262626. "Sin título" NO muestra el título aunque "Texto del título" tenga valor. "H1" → <h1> a 40px / line-height 48px. "H2 32px" → <h2> a 32px / line-height 40px. "H2" → <h2> a 24px / line-height 32px. "H3 24px" → <h3> a 24px / line-height 32px (mismo tamaño visual que "H2" pero etiqueta HTML distinta). "H3" → <h3> a 20px / line-height 28px. "H4" → <h4> a 20px / line-height 28px (mismo tamaño visual que "H3" pero etiqueta HTML distinta)',
|
|
23
|
+
help: 'Controla etiqueta HTML Y tamaño del título (van ligados). Todos los tipos usan Poppins semibold color #262626. "Sin título" NO muestra el título aunque "Texto del título" tenga valor. "H1" → <h1> a 40px / line-height 48px. "H2 32px" → <h2> a 32px / line-height 40px. "H2 32px Normal" → <h2> a 32px / line-height 40px con peso normal. "H2" → <h2> a 24px / line-height 32px. "H3 24px" → <h3> a 24px / line-height 32px (mismo tamaño visual que "H2" pero etiqueta HTML distinta). "H3" → <h3> a 20px / line-height 28px. "H4" → <h4> a 20px / line-height 28px (mismo tamaño visual que "H3" pero etiqueta HTML distinta)',
|
|
24
24
|
label: 'Etiqueta del título',
|
|
25
|
-
options: ['none', 'h1', 'h2-40', 'h2-32', 'h2', 'h3-24', 'h3', 'h4'],
|
|
26
|
-
options_labels: ['Sin título', 'H1', 'H2 40px', 'H2 32px', 'H2', 'H3 24px', 'H3', 'H4'],
|
|
25
|
+
options: ['none', 'h1', 'h2-40', 'h2-32', 'h2-32-normal', 'h2', 'h3-24', 'h3', 'h4'],
|
|
26
|
+
options_labels: ['Sin título', 'H1', 'H2 40px', 'H2 32px', 'H2 32px Normal', 'H2', 'H3 24px', 'H3', 'H4'],
|
|
27
27
|
example_value: 'h2'
|
|
28
28
|
},
|
|
29
29
|
{
|
|
@@ -20,7 +20,7 @@ export const metadata: ComponentMetadata = {
|
|
|
20
20
|
{
|
|
21
21
|
name: 'title',
|
|
22
22
|
type: 'text',
|
|
23
|
-
help: 'Título principal. Admite HTML. La etiqueta HTML
|
|
23
|
+
help: 'Título principal. Admite HTML. La etiqueta HTML y su estilo visual se eligen en el campo "Etiqueta del título" (cada variante tiene su propio tamaño, leading y márgenes).',
|
|
24
24
|
label: 'Texto del título',
|
|
25
25
|
mandatory: true,
|
|
26
26
|
example_value: 'Inteligencia artificial al servicio del Derecho'
|
|
@@ -37,7 +37,7 @@ export const metadata: ComponentMetadata = {
|
|
|
37
37
|
{
|
|
38
38
|
name: 'titleAlign',
|
|
39
39
|
type: 'select',
|
|
40
|
-
help: 'Alineación horizontal del pretítulo, del título y del botón. La descripción siempre
|
|
40
|
+
help: 'Alineación horizontal del pretítulo, del título, de la descripción y del botón. La descripción mantiene siempre ancho completo (w-full); solo cambia la alineación de su texto interno.',
|
|
41
41
|
label: 'Alineación del título',
|
|
42
42
|
options: ['left', 'center', 'right'],
|
|
43
43
|
options_labels: ['Izquierda', 'Centro', 'Derecha'],
|
|
@@ -46,7 +46,7 @@ export const metadata: ComponentMetadata = {
|
|
|
46
46
|
{
|
|
47
47
|
name: 'description',
|
|
48
48
|
type: 'textArea',
|
|
49
|
-
help: 'Descripción a ancho completo del contenedor padre. Admite HTML (editor enriquecido). Solo se muestra si tiene valor.',
|
|
49
|
+
help: 'Descripción a ancho completo del contenedor padre. Admite HTML (editor enriquecido). La alineación del texto interno sigue el campo "Alineación del título". Solo se muestra si tiene valor.',
|
|
50
50
|
label: 'Descripción',
|
|
51
51
|
mandatory: false,
|
|
52
52
|
example_value: '<p>Descubre cómo la IA jurídica transforma el trabajo diario de los despachos de abogados.</p>'
|
|
@@ -14,7 +14,8 @@ const {
|
|
|
14
14
|
{title && tipo === "h1" && <h1 class={`font-poppins text-[${color}] text-[40px] font-semibold leading-[48px] mb-4`} set:html={title}></h1>}
|
|
15
15
|
{title && tipo === "h2-40" && <h2 class={`font-poppins text-[${color}] text-[36px] md:text-[40px] font-normal text-center leading-[48px] my-8`} set:html={title}></h2>}
|
|
16
16
|
{title && tipo === "h2-32" && <h2 class={`font-poppins text-[${color}] text-[32px] font-semibold leading-10 mb-4`} set:html={title}></h2>}
|
|
17
|
-
{title && tipo === "h2" && <h2 class={`font-poppins text-[${color}] text-[
|
|
17
|
+
{title && tipo === "h2-32-normal" && <h2 class={`font-poppins text-[${color}] text-[32px] font-semibold leading-10 mb-4`} set:html={title}></h2>}
|
|
18
|
+
{title && tipo === "h2" && <h2 class={`font-poppins text-[${color}] text-[24px] font-normal leading-8 mb-4`} set:html={title}></h2>}
|
|
18
19
|
{title && tipo === "h3-24" && <h3 class={`font-poppins text-[${color}] text-[24px] font-semibold leading-8 mb-4`} set:html={title}></h3>}
|
|
19
20
|
{title && tipo === "h3" && <h3 class={`font-poppins text-[${color}] text-[20px] font-semibold leading-7 mb-4`} set:html={title}></h3>}
|
|
20
21
|
{title && tipo === "h4" && <h4 class={`font-poppins text-[${color}] text-[20px] font-semibold leading-7 mb-4`} set:html={title}></h4>}
|
|
@@ -12,10 +12,15 @@ const {
|
|
|
12
12
|
|
|
13
13
|
const alignClass = titleAlign === 'center' ? 'text-center' : titleAlign === 'right' ? 'text-right' : 'text-left';
|
|
14
14
|
const btnSelf = titleAlign === 'center' ? 'self-center' : titleAlign === 'right' ? 'self-end' : 'self-start';
|
|
15
|
+
const pretitleMargin = titleAlign === 'center' ? 'mx-auto' : titleAlign === 'right' ? 'ml-auto' : '';
|
|
15
16
|
---
|
|
16
17
|
|
|
17
18
|
<section class="w-full flex flex-col gap-4">
|
|
18
|
-
{pretitle &&
|
|
19
|
+
{pretitle && (
|
|
20
|
+
<div class={`w-auto w-fit ${pretitleMargin}`}>
|
|
21
|
+
<span class="block font-inter text-[#363942] text-sm md:text-base font-normal rounded-sm bg-[#F2F3F8] py-2 px-3" set:html={pretitle}></span>
|
|
22
|
+
</div>
|
|
23
|
+
)}
|
|
19
24
|
|
|
20
25
|
{title && titleTag === 'h1' && <h1 class={`font-poppins text-[#262626] text-[36px] md:text-[56px] font-normal ${alignClass} leading-[44px] md:leading-[64px] px-6 md:my-12`} set:html={title}></h1>}
|
|
21
26
|
{title && titleTag === 'h1-40' && <h1 class={`font-poppins text-[#262626] text-[40px] font-normal ${alignClass} leading-[48px] mb-8`} set:html={title}></h1>}
|
|
@@ -25,7 +30,7 @@ const btnSelf = titleAlign === 'center' ? 'self-center' : titleAlign === 'right'
|
|
|
25
30
|
{title && titleTag === 'h5' && <h5 class={`font-poppins text-[#262626] ${alignClass}`} set:html={title}></h5>}
|
|
26
31
|
{title && titleTag === 'h6' && <h6 class={`font-poppins text-[#262626] ${alignClass}`} set:html={title}></h6>}
|
|
27
32
|
|
|
28
|
-
{description && <div class=
|
|
33
|
+
{description && <div class={`w-full font-inter text-[#363942] text-base font-normal leading-7 ${alignClass}`} set:html={description}></div>}
|
|
29
34
|
|
|
30
35
|
{showBtn && btnLabel && (
|
|
31
36
|
<a href={btnSrc} class={`${btnSelf} text-white font-inter font-normal bg-[#2134F1] px-5 py-3 border border-[#2134F1] rounded-xl hover:bg-white hover:text-[#2134F1] transition-all duration-300`}>{btnLabel}</a>
|